Skip to content
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

CI: Add CI to release nightly wheels against free-threaded Python 3.13 #756

Merged
merged 7 commits into from
Jun 27, 2024

Conversation

andfoy
Copy link
Contributor

@andfoy andfoy commented Jun 27, 2024

This PR adds a CI workflow to produce nightly PyWavelets releases that are compatible with the free-threaded Python 3.13 distribution.

@andfoy
Copy link
Contributor Author

andfoy commented Jun 27, 2024

Right now, this CI is failing when trying to build on musllinux_1_2. The flagged compilation error comes from one of the CPython header files, internal/pycore_backoff.h, which fails with the following traceback (available on this log trace)

cc -Ipywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p -Ipywt/_extensions -I../pywt/_extensions -I../pywt/_extensions/c -Ipywt -I/opt/_internal/cpython-3.13.0b2-nogil/lib/python3.13/site-packages/numpy/_core/include -I/opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O3 -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_22_API_VERSION -DPY_EXTENSION -DHAVE_C99_COMPLEX -DCYTHON_CCOMPLEX=1 -MD -MQ pywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p/meson-generated__cwt.c.o -MF pywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p/meson-generated__cwt.c.o.d -o pywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p/meson-generated__cwt.c.o -c pywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p/_cwt.c
    In file included from /opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t/internal/pycore_code.h:474,
                     from /opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t/internal/pycore_frame.h:13,
                     from pywt/_extensions/_cwt.cpython-313t-x86_64-linux-musl.so.p/_cwt.c:30813:
    /opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t/internal/pycore_backoff.h:113:33: error: expected declaration specifiers or '...' before numeric constant
      113 | #define COLD_EXIT_INITIAL_VALUE 64
          |                                 ^~
    /opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t/internal/pycore_code.h:493:15: note: in expansion of macro 'COLD_EXIT_INITIAL_VALUE'
      493 | static_assert(COLD_EXIT_INITIAL_VALUE > ADAPTIVE_COOLDOWN_VALUE,
          |               ^~~~~~~~~~~~~~~~~~~~~~~
    /opt/_internal/cpython-3.13.0b2-nogil/include/python3.13t/internal/pycore_code.h:494:5: error: expected declaration specifiers or '...' before string constant
      494 |     "Cold exit value should be larger than adaptive cooldown value");
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

According to the internet, the expected declaration error seems to be caused to a syntax error, however, after inspecting the header file in question, there are no syntax errors available. Also this issue is not occurring under glibc builds

@rgommers rgommers added the CI Continuous integration label Jun 27, 2024
@rgommers
Copy link
Member

Thanks @andfoy. Looks like the problem was that we were still building with C99 (hat tip to @ngoldbaum for correctly guessing that that was the problem, based on a static_assert being triggered in CPython - this is known to happen for C code generated by Cython and compiled with -std=c99); the commit I just pushed changes it to using C17.

@rgommers rgommers added this to the v1.7.0 milestone Jun 27, 2024
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andfoy. The CI job itself looks good to me. I'm just going to move it to its own file, because the one you added it in auto-deploys to PyPI when a tag is pushed, which we don't want here.

@rgommers
Copy link
Member

Passing manylinux and musllinux wheel builds: CI log

@rgommers rgommers marked this pull request as ready for review June 27, 2024 22:58
@rgommers rgommers merged commit 5d15c44 into PyWavelets:main Jun 27, 2024
16 of 17 checks passed
@rgommers
Copy link
Member

Everything in order, cp313t wheels are up at https://anaconda.org/scientific-python-nightly-wheels/PyWavelets/files now.

@andfoy andfoy deleted the add_nightly_free_threaded branch June 28, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants