bpo-28459: Fix _pyio on Cygwin where the msvcrt module is not built#14013
bpo-28459: Fix _pyio on Cygwin where the msvcrt module is not built#14013embray wants to merge 4 commits into
Conversation
Allow the UnixCCompiler.find_library_file to correctly find DLL import libs (.dll.a).
Instead use ctypes to access the setmode function provided by Cygwin.
|
Pinging core devs on this and #4153. Also I fixed the networking problems with my Cygwin buildbot worker so it's actually producing meaningful results again, and this will fix a number of tests. |
Sorry, something went wrong.
benjaminp
left a comment
There was a problem hiding this comment.
There seems to be an extra distutils change mixed in here.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
Thank you for looking at this issue, though #4153 is the one that really needs attention from a core dev. |
Sorry, something went wrong.
|
This bug does not seem exist any longer. At least I could not replicate it with 3.9 on Cygwin 10.0. $ uname -a
CYGWIN_NT-10.0-22631 xps-ne 3.5.4-1.x86_64 2024-08-25 16:52 UTC x86_64 Cygwin
$ python pyio-example.py
io from '/usr/lib/python3.9/_pyio.py'
Hello, world!
import _pyio as io
with io.StringIO() as f:
f.write("Hello, world!")
f.seek(0)
content = f.read()
print(f"io from '{io.__file__}'")
print(content) # Output: Hello, world! |
Sorry, something went wrong.
Patch for bpo-28459, a long-standing issue on Cygwin especially for running some of the test suite since it uses
_pyio.This PR is based on top of #4153 which needs to be merged before this issue can be fixed, as the fix relies on ctypes, and the ctypes module can't be built without #4153.
https://bugs.python.org/issue28459