-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Support for Python 3.13.2 free-threading version #60972
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
import pandas
failed in Python 3.13 free-threading version
import pandas
failed in Python 3.13 free-threading versionimport pandas
failed in Python 3.13.2 free-threading version
Thanks for the report. Cython is still working on support (but it seems 3.1 is getting close). pandas cannot support free-threading until after Cython is ready. Even then, it's not clear to me what the level of effort it will take to support free-threading. Work on this is certainly appreciated! Reworking this issue as an enhancement. |
import pandas
failed in Python 3.13.2 free-threading version
Cython 3.1.0 is available, so this should now work fine. Also, nightly Windows wheels for free-threaded CPython are available at https://anaconda.org/scientific-python-nightly-wheels/pandas, so there's no longer a need to build from source. They pass all tests, so I think this issue can be closed. |
Thanks @rgommers - I plan to close this issue after updating our dev environment to use Cython 3.1. Want to run the full ASV suite first. |
Sounds good, thanks @rhshadrach |
Now
The same segmentation fault: C:\Users\admin>py313t
Python 3.13.3 experimental free-threading build (tags/v3.13.3:6280bb5, Apr 8 2025, 14:53:12) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
<Segmentation fault caused there> |
@qfcy - what version of cython are you using to build? |
The default Cython version 3.0.5 in |
Cython 3.0.5 will not work with freethreading, you need to compile with Cython >= 3.1 |
Did two runs on main and with bumping Cython, benchmarks above a 5% cutoff are below. Looks like noise to me, will put up a PR to bump Cython in the next day or two.
|
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Firstly, use
python3.13t -m pip install pandas
to build and installpandas
on VS 16.11.43 and MSVC 19.29.30158.Then try to import it:
Issue Description
The line
import pandas
failed in Python 3.13 free-threading version on x64 Windows.As I tried to execute it, a segmentation fault caused because I've seen
werfault.exe
appeared in the task manager.Expected Behavior
The line
import pandas
successfully be executed.Installed Versions
Additionally, this is the output during compiling pandas that contains the MSVC version:
The text was updated successfully, but these errors were encountered: