-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix OSError when running on MinGW64 with MSYS2 #1393
Conversation
2c3910f
to
49b77a6
Compare
Thanks for the awesome library! ❤️ Any interest in merging these changes or will we need to fix this downstream? |
Thanks for working on this, sorry I didn't comment sooner. This check seems like it could cause false positives. Is there no better way to detect that MinGW is used? |
@davidism I am not sure how you could have GCC on a Windows platform without using MINGW. Was there a false positive you had in mind? Downstream, MINGW patches sysconfig, so we could do something like:
This seems kind of messy compared to the solution I used though. 😄 |
I'm not super familiar with these types of tools, but what about others like Cygwin, MSYS2, or WSL? Do they require the same fix? Or do they get picked up incorrectly by this check? |
@davidism I ended up installing Cygwin to test this out. You are correct in that Python installed in Cygwin is compiled with GCC as well. However, I think my changes might be a little more clear if I did: and then remove my changes from the |
Yes, WSL is Linux as far as userspace is concerned (and |
I like the suggested more specific version. |
@davidism I have updated the PR with the discussed changes 👍 |
Fixes pallets#1338. In version 6.0, echo and prompt functions were modified to work with full unicode in the windows console by emulating an output stream. Since MSYS2 uses a bash console it was creating an OSError to apply these modifications when running in this environment.
aa4bfa9
to
0be3b61
Compare
Thanks @davidism |
It appears that this fixed #1065, so I need to figure out if I should merge #1135 too. cc @segevfiner |
Fixes #1338.
In version 6.0, echo and prompt functions were modified to work with full unicode in the windows console by emulating an output stream. Since MSYS2 uses a bash console it was creating an OSError to apply these modifications when running in this environment.
This PR changes these modifications to only apply them if not running in a MSYS2 environment.