Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename of type alias defined with PEP 695 fails #4696

Closed
erictraut opened this issue Aug 7, 2023 · 1 comment
Closed

Rename of type alias defined with PEP 695 fails #4696

erictraut opened this issue Aug 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@erictraut
Copy link
Contributor

PEP 695 (introduced in Python 3.12) introduces a new type statement to define type aliases. If you use the language server "rename" feature to attempt to rename the type alias, it fails with an error message:

Screenshot 2023-08-07 at 2 57 27 PM

To repro:

  1. Install the latest Python 3.12 rc1. Alternatively, set the pylance/pyright "pythonVersion" to "3.12".
  2. Create a new file with the following contents.
type TA1 = int

x: TA1 = 1
  1. Position the mouse cursor over either instance of TA1 and run the "Rename Symbol" command.
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 7, 2023
@judej judej added bug Something isn't working and removed needs repro Issue has not been reproduced yet labels Aug 31, 2023
@StellaHuang95 StellaHuang95 added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Sep 5, 2023
@rchiodo
Copy link
Contributor

rchiodo commented Sep 6, 2023

This issue has been fixed in prerelease version 2023.9.11, which we've just released. You can find the changelog here: CHANGELOG.md

@rchiodo rchiodo closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants