You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good catch. I think we also need to define the variable for the other kind of launcher, too, which lives in _msbuild.py in the top level directory. Want to take a look at that?
The _msbuild.py file in the top of the repo is our build script, and it's where Py_WINDOWED is defined. But it's not been defined for the launcherw.exe (template that gets renamed for generating shortcuts), which means these ones won't benefit from this fix.
I can get to it when I get a chance, but it'd be good to fix it all in one PR.
launcherw.exe appears to work correctly even without PY_WINDOWED. I just installed Python 3.14 using the released pymanager v26.1 and dragged my .pyzw file onto pythonw3.14.exe. The cursor behaves as expected. Using Process Explorer, I examined the process tree and found that there are no child processes under this pythonw3.14.exe. Additionally, the window it creates is exactly the one generated by my .pyzw file. This seems to differ from how pymanager works.
For runtimes with a compatible python3.dll, yes, we bypass the child process for speed (and can't do it for py.exe because that's already loaded one Python runtime). But if python3.dll is missing, or too old, then it'll launch the executable and we're in the same state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a regression where the cursor remains stuck in a busy state.
The
_WINDOWSmacro is not defined in thepymanagerproject; it should bePY_WINDOWED. Therefore, I replaceddefined(_WINDOWS)withPY_WINDOWED.This resolves a previously fixed issue that has resurfaced: python/cpython#61492
Update: Relocated code to maintain a continuous cursor busy state during the pymanager-to-interpreter startup sequence.