-
Notifications
You must be signed in to change notification settings - Fork 11
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
Python 3.11 #139
Python 3.11 #139
Conversation
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: lovetox <8661218+lovetox@users.noreply.github.com>
52b419e
to
bc28269
Compare
Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
This is used throughout the Python code but is not defined when compiling with Mingw-w64 compilers, so define it. Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Largefile is supported on Windows. Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Also, build `nt` module instead of `posix` when compiling with MINGW. Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
`ws2_32` is required when building that module
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
a6df75c
to
8384a0f
Compare
c35dd6a
to
8242fdf
Compare
Thanks, will cherry-pick and squash it. Also, I don't they will succeed since it requires a "build python" for cross-compiling now https://docs.python.org/3/using/configure.html#cross-compiling-options. edit: will squash later, probably all the CI config into a single commit |
I think there is already provision for providing a compatible python version for the build system (the deadsnakes ppa thing), it'd probably just need to add the configure option. |
hopefully we won't need to set |
15923c9
to
e887ad9
Compare
Python/pathconfig.c
Outdated
#endif | ||
return SEP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having trouble wrapping my head around this, but I think that this could return the "wrong" slash on the first call in __MINGW32__
case. Maybe something like
#endif | |
return SEP; | |
#else | |
sep = SEP; | |
#endif | |
return sep; |
Also, there used to be a rule some C compilers enforced about variable definitions coming before other statements, I don't know if the Python .c files still follow this rule, but that char* msystem
would now violate it where it didn't before. The only compiler I ever dealt with that normally rejected such code was an ancient version of MSVC though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having trouble wrapping my head around this, but I think that this could return the "wrong" slash on the first call in MINGW32 case. Maybe something like
I'll update it, thanks!
Also, there used to be a rule some C compilers enforced about variable definitions coming before other statements, I don't know if the Python .c files still follow this rule, but that char* msystem would now violate it where it didn't before. The only compiler I ever dealt with that normally rejected such code was an ancient version of MSVC though.
I don't think we need to care about that, since this is specific to msys2.
… one Up until now this didn't really happen when calling from cygwin because empty env vars were removed before Python would run. But msys2/msys2-runtime#101 changed that. To avoid breaking users that did something like MSYSTEM= python ... not only check that MSYSTEM isn't set but also that it isn't empty when deciding if os.sep/os.altsep should be switched. Also, guard the msystem env check to execute only on MINGW Co-authored-by: Naveen M K <naveen521kk@gmail.com>
it's declared in headers but defined as static here, remove it also run `_Py_CheckPython3` only when using MSVC
it's required for regen-modules
opendir is detected by configure on mingw-w64, and for some reason things don't work as expected. For example, os.listdir always returns the cwd's directory listing instead of the one specified. By un-defining, this, os.listdir will use the one which uses native windows API.
- always normalize the PREFIX to an absolute path - use `/` when MSYSTEM is defined
also move `gethostname` to that check
while building `_multiprocessing` extension also, always build that module on win32
they are guarded by dlopen being present, but if module loading is enabled is more correct.
this is required for venv to work properly
they don't seems to handle `/` as path separator correctly
- Use function available in original msvcrt.dll _wdupenv_s -> _wgetenv_s fread_s -> fread - Add a test for checking the new launchers
also, fix finding prefix when in a venv
e8f495e
to
158aa09
Compare
fyi, I tried to rebase on top of 3.11.4: there are no conflicts, but python@09ce8c3 is needed to make the tests pass. maybe it helps. |
I'll merge this and then work on 3.11.4 on a new PR. |
https://gist.github.com/naveen521kk/19d01c3841a98bd7890aaaa94f6657b2
git range-diff v3.10.12...mingw-v3.10.12 v3.11.2...wip-mingw-v3.11.2