Skip to content

Conversation

@rgommers
Copy link
Contributor

As noted in pypa/packaging#727, free-threaded CPython does not support the limited API. Hence raise an exception if a limited-api build is requested.

Also skip/update a few tests that were failing when run under a free-threaded interpreter.

Note that we are already producing the correct wheel tags, since that comes from sysconfig.get_config_var('EXT_SUFFIX').

Addresses part of gh-499. There will be more to do - most importantly adding a CI job. This probably only makes sense to do once the setup-python action adds support (xref actions/setup-python#771). This may happen around the CPython 3.13 beta 1 release (May 7th).

I'll add notes on how to test with a free-threaded build on gh-499 (it's not completely trivial yet).

@rgommers rgommers added the maintenance Regular code improvements that are not new features nor end-user-visible bugs label Apr 17, 2024
Copy link
Member

@dnicolodi dnicolodi left a comment

Choose a reason for hiding this comment

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

Thanks @rgommers for looking into this. This will be important as soon as the first Python 3.13 is out and more people starts testing the nogil interpreter.

@rgommers
Copy link
Contributor Author

Looks like a typo fix in pyproject-metadata 0.8.0 is messing with CI here:

FAILED tests/test_sdist.py::test_pep621 - AssertionError: assert 'Metadata-Ver...1 metadata!\n' == 'Metadata-Ver...1 metadata!\n'
  
  Skipping 116 identical leading characters in diff, use -v to show
  Skipping 906 identical trailing characters in diff, use -v to show
  - ords: full metadata
  ?           ^
  + ords: full,metadata
  ?           ^

gh-613 has a draft fix already, but with more changes. Do you want to finish that PR, or should we fix this typo failure separately first?

@rgommers rgommers force-pushed the support-nogil branch 2 times, most recently from 64bbf42 to ef51f8a Compare April 23, 2024 16:24
@dnicolodi
Copy link
Member

Looks like a typo fix in pyproject-metadata 0.8.0 is messing with CI here:

This should be fixed in main already. I think you just need to rebase on current main.

Copy link
Member

@dnicolodi dnicolodi left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a couple of minor things.

@rgommers rgommers added this to the v0.17.0 milestone Apr 23, 2024
The free-threaded CPython build does not support the limited API yet,
and won't in the near future. To avoid either cryptic build failures
or a successfull build yielding an `abi3` tag which would not be
correct, raise a clear error and don't attempt to build.
Support for free-threaded CPython in Cython is still a work in progress,
see e.g. cython#6137 - this will land in Cython 3.1.0, and the skipped
test does pass when using Cython built from the branch in cython#6137.
@dnicolodi dnicolodi merged commit 36e6392 into mesonbuild:main Apr 23, 2024
@rgommers rgommers deleted the support-nogil branch April 24, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Regular code improvements that are not new features nor end-user-visible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants