Skip to content

ci: update ffi-check for PyPy symbol mangling change - #6389

Merged
davidhewitt merged 16 commits into
PyO3:mainfrom
davidhewitt:pypy3.12-abi3
Sep 16, 2026
Merged

davidhewitt merged 16 commits into
PyO3:mainfrom
davidhewitt:pypy3.12-abi3

Conversation

@davidhewitt

Copy link
Copy Markdown
Member

As per pypy/binary-testing#55 (comment) this updates ffi-check to confirm that symbols are being resolved properly for PyPy ahead of the change in PyPy 3.12 to support abi3 by removing the special PyPy prefix from many functions.

I make this practical by forcing pyo3-ffi-check to resolve actual addresses of all functions and check they match the pypy headers.

@bschoenmaeckers bschoenmaeckers left a comment

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.

LGTM!

@codspeed

codspeed Bot commented Sep 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 141 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing davidhewitt:pypy3.12-abi3 (7e50cbc) with main (a859d05)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mattip

mattip commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

This probably needs an update. PyPy3.11 will keep the old names, PyPy3.12 will be using unmangled names for all the CPython limited API functions. You can see the latest CI run with PyPy3.12 at https://github.com/pypy/binary-testing/actions/runs/34744801359/job/103690612698

@mattip

mattip commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Wow. Sorry for the many many required changes.

@davidhewitt

Copy link
Copy Markdown
Member Author

No worries; I think part of this is that PyO3 wasn't quite correctly mangling all the PyPy 3.11 symbols anyway, the more extensive checking applied here is catching existing flaws as well as preparing infrastructure to make sure we synchronise with PyPy 3.12 (and any future mangling changes).

@davidhewitt

Copy link
Copy Markdown
Member Author

With #6411 and #6410 split out and merged this PR now is just a mechanical update of the pypy attributes; I'll set it to merge based on the prior approval when this PR originally looked like that (but with broken CI).

@davidhewitt
davidhewitt added this pull request to the merge queue Sep 16, 2026
Merged via the queue into PyO3:main with commit 49a9e4e Sep 16, 2026
92 checks passed
@davidhewitt
davidhewitt deleted the pypy3.12-abi3 branch September 16, 2026 09:48
@mattip

mattip commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Thanks!

davidhewitt added a commit that referenced this pull request Sep 17, 2026
* ci: update ffi-check for PyPy symbol mangling change

* fix formatting

* fix ffi check failures on older versions

* fix pypy 3.11 link aliases

* fmt

* try fix windows build

* try to fix windows

* try switch to allowlist for bindgen

* try to make link failures on windows easier to diagnose

* fix link name for pypy without raw-dylib

* fix missing PyPy link name attributes

* only decorate x86 symbols on `raw-dylib` builds

* Update link name for PyVectorcall_Call in abstract_.rs

* fmt
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.

3 participants