Skip to content

TST: fix limited API example in tests for latest Cython#30698

Merged
charris merged 1 commit intonumpy:mainfrom
rgommers:fix-limited-api-test
Jan 21, 2026
Merged

TST: fix limited API example in tests for latest Cython#30698
charris merged 1 commit intonumpy:mainfrom
rgommers:fix-limited-api-test

Conversation

@rgommers
Copy link
Copy Markdown
Member

Cython 3.3 will require a minimum target of 3.9 for the limited API. There is no reason for us to still test 3.6/3.7

Remove #define Py_LIMITED_API from a C source file, that's not a good habit and it requires manually keeping the version in sync between the C file and the meson.build file.

Also fix warnings like these:

WARNING: Project specifies no minimum version but uses features which were added in versions:
 * 1.3.0: {'limited_api arg in python.extension_module'}

by requiring a recent Meson version.

Cython 3.3 will require a minimum target of 3.9 for the limited API.
There is no reason for us to still test 3.6/3.7

Remove `#define Py_LIMITED_API` from a C source file, that's not a good
habit and it requires manually keeping the version in sync between
the C file and the meson.build file.

Also fix warnings like these:
```
WARNING: Project specifies no minimum version but uses features which were added in versions:
 * 1.3.0: {'limited_api arg in python.extension_module'}
```
by requiring a recent Meson version.
@rgommers rgommers added 05 - Testing 09 - Backport-Candidate PRs tagged should be backported labels Jan 21, 2026
@charris charris merged commit f6f842d into numpy:main Jan 21, 2026
74 checks passed
@charris
Copy link
Copy Markdown
Member

charris commented Jan 21, 2026

Thanks Ralf.

@rgommers rgommers deleted the fix-limited-api-test branch January 21, 2026 18:40
@rgommers rgommers added this to the 2.5.0 Release milestone Jan 21, 2026
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants