Skip to content

Initial support for abi3t, depends on unreleased PyO3 features.#3113

Draft
ngoldbaum wants to merge 9 commits into
PyO3:mainfrom
ngoldbaum:abi3t
Draft

Initial support for abi3t, depends on unreleased PyO3 features.#3113
ngoldbaum wants to merge 9 commits into
PyO3:mainfrom
ngoldbaum:abi3t

Conversation

@ngoldbaum
Copy link
Copy Markdown
Contributor

This depends on a non-existent abi3t-py315 feature in PyO3, which I'm intending to add as soon as I can. Opening as a draft for now.

Thankfully with #3110 merged, this PR is almost trivial.

@ngoldbaum
Copy link
Copy Markdown
Contributor Author

@messense do you have any opinions about how tests for abi3t support should look? My first instinct would be to follow and generalize the existing tests for abi3. Does that sound like a good plan, or do you have large test refactorings in mind separate from this?

@messense
Copy link
Copy Markdown
Member

messense commented Apr 9, 2026

Sorry missed the reply in the issue, follow and generalize the existing tests for abi3 sounds good to me.

@ngoldbaum
Copy link
Copy Markdown
Contributor Author

Sorry missed the reply in the issue, follow and generalize the existing tests for abi3 sounds good to me.

Sorry for the delay over here. I just added some new tests. Since abi3t support requires Python 3.15 or newer, I needed to also add some utilities to introspect the Python used by the test runner.

@ngoldbaum
Copy link
Copy Markdown
Contributor Author

I don't think there are any tests for Python 3.15 yet. @messense what do you think about replacing 3.14 and 3.14t in test.yml with 3.15-dev and 3.15t-dev in this PR?

@ngoldbaum
Copy link
Copy Markdown
Contributor Author

I should also note that the new test crates depend on my PR branch for PyO3/pyo3#5807 and I'll need to update them after that PyO3 PR is merged and PyO3 does a release. Not quite sure how to sequence landing everything.

@ngoldbaum
Copy link
Copy Markdown
Contributor Author

@messense what do you think about replacing 3.14 and 3.14t in test.yml with 3.15-dev and 3.15t-dev in this PR?

Never mind, I tried and it will require some more work to get that stable. See the CI run associated with ee98a08.

Comment thread src/bridge/mod.rs
/// minimum version. Version‑specific fallback builds (e.g. Python 3.10 when
/// abi3 targets ≥ 3.11) return `false` so that `Py_LIMITED_API` is not
/// defined and interpreter‑specific linker names are used.
pub fn is_abi3_for_interpreter(&self, interpreter: &PythonInterpreter) -> bool {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where does this function end up being needed over is_stable_abi_for_interpreter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants