CI: Add Linux workflow to test on free-threaded Python builds#20822
CI: Add Linux workflow to test on free-threaded Python builds#20822rgommers merged 6 commits intoscipy:mainfrom
Conversation
7d95043 to
fcf5ee1
Compare
b8f20ab to
a1f0674
Compare
4b5daa2 to
796fef1
Compare
|
This looks close to right already, thanks @andfoy. Note that if you need to iterate on a CI job, it's usually best to do that on your own fork, to avoid running a ton of other jobs over and over. If you include a debug commit like rgommers/numpy@9e45f73, you'll trigger just this new job on your fork. |
796fef1 to
6a942cd
Compare
(on a new branch from which you didn't already make a PR) |
That makes sense, I'll do that then! |
11352a6 to
6a942cd
Compare
| env: | ||
| PYTHON_GIL: 0 | ||
| # TODO: For some reason the Meson installation path points to | ||
| # python3/site-packages as opposed to python3.13/site-packages, |
There was a problem hiding this comment.
This sounds like a CPython issue to me (in sysconfig), since path handling shouldn't depend on --disable-gil yes or no. And all we're doing in dev.py I think is sysconfig.get_path('platlib').
Okay to ignore here for now.
|
Regarding the test failure at def test_decorator():
with suppress_warnings() as sup:
...
@decorator
def func():
""" Docstring
%(strtest3)s
"""# Python 3.12
(Pdb) f.__doc__
' Docstring\n %(strtest3)s\n '
# Python 3.13
(Pdb) f.__doc__
'Docstring\n%(strtest3)s\n'I don't know if this is an expected change or a regression in CPython, I took a look at the Changelog, but there is no mention to multiline strings besides python/cpython#112943. However, that issue doesn't seems to be the culprit here, since those changes were also backported into 3.12.2 (the output trace comes from a 3.12.3 instance) |
|
From https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes: "Compiler now strip indents from docstrings." I bet that that's the culprit Please feel to skip that test here and open a new issue about it, marked for 0.14.0 |
|
#19572 x-ref |
rgommers
left a comment
There was a problem hiding this comment.
Everything seems to be in order here now. It's installing or building the cp313t flavors for all build and runtime dependencies that use the Python C API. For SciPy:
Created wheel for scipy: filename=scipy-1.15.0.dev0-cp313-cp313t-linux_x86_64.whl size=27954025
Let's give this a go, thanks @andfoy!
|
Great to see the progress on this! Does that mean that there will be a development free-threaded wheel in https://anaconda.org/scientific-python-nightly-wheels/scipy/files at one point? Asking mostly and out of curiosity and also with the goal one day of setting up a similar build for scikit-learn. |
|
Yes, we should start building nightly wheels, at least for Linux x86-64. @andfoy could you have a go at doing that as the next step here? I think it should look very similar to numpy/numpy#26512; if you start from copying SciPy's |
|
|
||
|
|
||
| @pytest.mark.skipif(DOCSTRINGS_STRIPPED, reason="docstrings stripped") | ||
| @pytest.mark.skipif(sys.version_info >= (3, 13), reason='it fails on Py3.13') |
Reference issue
See #20669
What does this implement/fix?
This PR enables testing SciPy against newer Python free-threaded builds
Additional information
Equivalent NumPy PRs: numpy/numpy#26512, numpy/numpy#26463