-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Remove new pyrepl "warning" on Windows #118628
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
Comments
I agree, this will cause a lot of confusion among devs. |
Could someone point me to the PEP or discussion for this change?
Attempts to use |
Sorry for the rough initial experience, y'all!
The issue is #111201, it's still open. As for "a PEP", this is not an API nor a language feature. This needs a PEP in the same sense that rewriting output of The Steering Council was aware this change was coming and didn’t suggest a PEP before. Of course, if they change their mind, we’ll provide one.
@eryksun, there's plenty of other libraries distributed on Windows that are specific to another platform like asyncio.unix_events, pty, posixpath, shutil.chown, tty, and so on. Here, we want to remove our reliance on readline and curses during the sprints in Pittsburgh, possibly unblocking Windows support in beta 2. If that won't work, we will make sure the Windows experience is no worse than it was on Python 3.12. In any case, this is now solved with GH-118665 landed so we can close this. |
I never said it needed a PEP. I was just looking for the discussion about this change, so I could understand the rational for implementing this in a way that requires distributing and attempting to use the
I've never understood why tty and pty are distributed on Windows since trying to import them immediately fails for lack of termios, and there's pretty much no chance that anyone will ever step up to support the termios module in the standard library on Windows, though I'd love to be proven wrong there. |
"Windows 10 TH2 or later required" is a different message message from the one I reported. I have no idea of what win10 TH2 is, but if it is an early version, and the repl requires a feature added later (to color without readline, for instance), the statement would be true and unavoidable. |
It' interesting that sys.getwindowsversion() call made in embedded python reported invalid Windows version. At the same time "normal" python correctly reported Windows version it's running on That is the main cause why warning mentioned above is reported. |
This is because the assemblies need a value for Windows 10 in the <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 / Windows 11 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility> Some of the contents of the manifest in a nutshell. |
Bug report
Whenever I start the REPL on Windows, it now prints a new statement: "warning: can't use pyrepl: No module named 'readline'" and as things now, it will continue to do so indefinitely. This is obnoxious. This is not a warning, not something I can or should do anything about (other than switch to Linux), but a statement of fact. Please kill it at least on Windows. And Mac if the situation is the same (never available). It seems useless on *nix too, though I don't care. Just document its availability in appropriate places like we do with other things that are not available everythere.
If desired to make its use obvious, color the splash message in places.
Linked PRs
The text was updated successfully, but these errors were encountered: