Refactoring seems to be broken in 2025.2.x and 2025.3.x
I think the refactoring feature is broken in recent versions as I am seeing at least two issues.
- When I rename a variable, the updated name only sticks for the currently selected instance. As soon as I press Enter, the variable reverts to its original name everywhere else. I have to click elsewhere in order for the renaming to go through. Otherwise, I have to do a manual search and replace.
- PyCharm would try to rename all variables with the same name across the entire project and not just in the current scope.
Both issues occurred in version 2025.2.5 for me. Upgrading to 2025.3.3 seems to have resolved the second issue, but the first one remains.
Environment information:
PyCharm version: 2025.3.3
OS: Windows 11
I have no plug-ins installed (other than the default ones) besides Classic UI.
请先登录再写评论。
Hi Danny
Thank you for this report,
I tried with a simple snippet and cannot replicate this.
Would you please provide me a minimal snippet where you can replicate the issue (with exact instructions which variable to refactor)
May I ask if using a new test project you can replicate the issue also ?
Could you please try to do File | Invalidate caches and let me know if the situation changes?
Kind regards,
Yes, I've already tried File > Invalidate Caches…
I did some more testing and found that the issue only seems to affect specific files. It definitely affects even a file consisting of a simple function:
For example, I use Rename to change
footobar. The other instance initially changes tobaras well, but reverts tofoowhen I press Enter.I do have a file not affected by this issue, but I'm unable to share it as it contains confidential information. :-(
Hi Danny
Thank you for the snippet.
Would such snippet only be broken in a specific file ?
What if you create a new test project and use the same snippet, would you get the same problem?
I am unable to replicate using PyCharm 2025.3.3 w. classic UI and this snippet.
If the problem seem to affect a certain project I would advise to reset the project by doing this operations:
If the issue still persists in a new project would you please provide me a screenshot of the rename selected options
Also please let me know which python version you are using and if any tools to manage your python environments (such as conda/uv..)
Kind regards,
I've recorded two videos.
Renaming fails: https://drive.google.com/file/d/1fgqY73_rnmm4GyxW24bsljDtD3S_jEJ2/view?usp=sharing
Renaming succeeds: https://drive.google.com/file/d/1iGFM3Fos76wMv9MunHVa07J73uMUlhSs/view?usp=sharing
Hi Danny
Thank you for the video, I tried to replicate using a similar python file to the one in the video however no luck so far.
May I ask if you have done the .idea folder reset?
As I can see the project files are showing in yellow background so maybe files are excluded from the project which could point to a .idea folder corruption (or is this a custom theme configuration ? )
Kind regards,
This fails for as well
Hi Ekurilina
Could you please also follow the steps advised above and let me know if it helps?
Also would you please provide a screenshot/screenrecording showing the full IDE and the error?
Same thing happens for me, both in PyCharm as well as IntelliJ Ultimate 2025.3.3 with python plugin. Consistently reproducible inside Jupyterlab notebook files in a UV managed environment.
Python 3.13, JupyterLab 4.5.6 in pyproject.toml
Shift-F6 to rename variable, preview works normally over all instances of the variable, press Enter to finalize, and only the variable having the focus will get renamed.
Invalidating caches as well as removing all intelliJ artifacts from the project and reloading make no difference.
Hi N Van Klaveren
As we have not bee able to replicate this, may I ask if it is possible for you to share a full minimal project where the issue can be replicated?
If so would be great to upload it to our cloud drive : https://uploads.jetbrains.com/ and provide me the upload ID (Only JetBrains members have access)
A screen capture and IDE Logs would be helpful as well.
The logs can be provided from Help -> Collect Logs and diagnostics data
Kind regards,