-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: Try installing older Cython for windows free threading build #61249
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
Conversation
mroeschke
commented
Apr 7, 2025
- closes No Windows free-threaded wheel available in scientific-python-nightly-wheels #61242 (Replace xxxx with the GitHub issue number)
Note: Older ninja or numpy failures versions are exhibiting the same failures. I suspect a Cython change might be the culprit |
The traceback showing up in the test suite is suspicious: 2025-04-08T19:28:28.2539512Z Traceback (most recent call last):
2025-04-08T19:28:28.2554584Z File "pandas/_libs/tslibs/tzconversion.pyx", line 128, in pandas._libs.tslibs.tzconversion.Localizer.utc_val_to_local_val
2025-04-08T19:28:28.2555644Z File "pandas/_libs/tslibs/tzconversion.pyx", line 759, in pandas._libs.tslibs.tzconversion._tz_localize_using_tzinfo_api
2025-04-08T19:28:28.2556397Z File "pandas/_libs/tslibs/tzconversion.pyx", line 791, in pandas._libs.tslibs.tzconversion._astimezone
2025-04-08T19:28:28.2557288Z File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-t5af6k12\cp313t-win_amd64\venv-test\Lib\site-packages\dateutil\tz\_common.py", line 144, in fromutc
2025-04-08T19:28:28.2557899Z return f(self, dt)
2025-04-08T19:28:28.2558668Z File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-t5af6k12\cp313t-win_amd64\venv-test\Lib\site-packages\dateutil\tz\_common.py", line 261, in fromutc
2025-04-08T19:28:28.2559658Z _fold = self._fold_status(dt, dt_wall)
2025-04-08T19:28:28.2560385Z File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-t5af6k12\cp313t-win_amd64\venv-test\Lib\site-packages\dateutil\tz\_common.py", line 196, in _fold_status
2025-04-08T19:28:28.2561049Z if self.is_ambiguous(dt_wall):
2025-04-08T19:28:28.2561335Z ~~~~~~~~~~~~~~~~~^^^^^^^^^
2025-04-08T19:28:28.2561988Z File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-t5af6k12\cp313t-win_amd64\venv-test\Lib\site-packages\dateutil\tz\tz.py", line 254, in is_ambiguous
2025-04-08T19:28:28.2562646Z naive_dst = self._naive_is_dst(dt)
2025-04-08T19:28:28.2563346Z File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-t5af6k12\cp313t-win_amd64\venv-test\Lib\site-packages\dateutil\tz\tz.py", line 260, in _naive_is_dst
2025-04-08T19:28:28.2564061Z return time.localtime(timestamp + time.timezone).tm_isdst
2025-04-08T19:28:28.2564432Z ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-08T19:28:28.2564754Z OSError: [Errno 22] Invalid argument I wonder if this is an issue with the container itself and not necessarily any of the Python packages |
That traceback goes back to this dateutil issue: dateutil/dateutil#197 |
Hmm possibly - but wouldn't that show up on the other Windows builds? My other guess would be a bug in CPython - the datetime modules have historically used a global singleton for storing datetime state. On the free-threaded build that may be a likely issue area (assuming it hasn't changed upstream - I have not looked at all) |
Yup, we do e.g. https://github.com/pandas-dev/pandas/actions/runs/14319739950/job/40133986072 but they get swallowed somewhere My poor-man's git bisect here I think is pointing to a Cython bug (5016bf7 shows that an earlier Cython commit does not fail the Python 3.13t Windows tests). My uneducated guess might be due to cython/cython#6726 |
I also found this note in CPython about needing to define Certainly possible I am overlooking, but I don't see that anywhere in our current setup. Might be worth adding: add_project_arguments('-DPy_GIL_DISABLED', language : 'c') To our current Meson configuration |
Ah OK cool. Ignore what I said then - nice find |
Ah that would be good to add. I think I saw some warnings in the logs about some free threading option not being set, not sure if it was Windows specific |
It is possible that Meson already sets it for us in Windows. One way to check would be to add |
I think I've narrowed it down to this Cython change cython/cython#6717 |
Wow nice find. From an initial glance that seems really tangential - I wonder how we can form an MRE out of that for a bug report (just thinking out loud - haven't looked deeply) |
Going to merge as the Windows Python 3.13t builds are passing now. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
I think it might be easier if I manually do this backport as opposed to cherry picking this commit |
Wow, really nice debugging, thanks! |