Repository navigation
gh-162308: Check native extension modules with the target interpreter - #162311
Conversation
itamaro
left a comment
There was a problem hiding this comment.
Thank you for the PR!
See a few inline comments before we can merge.
Also, could you shorten the PR description to a few sentences in your own words about what goes wrong, and how this fixes it? Now that #161530 has merged, we can drop the branch history and commit hashes.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Select the module checker from configure's cross-compiling state. Native builds use the target Python with RUNSHARED; cross builds use the external build Python without adding the target library path. Pass the check mode explicitly for both extension checks and missing stdlib info generation. Exercise differing builtin module configurations in the existing Linux build-Python CI job, using a strict check without _PYTHON_HOST_PLATFORM. Add a Build NEWS entry and regenerate configure with Autoconf 2.72. Co-authored-by: TRAE CLI <traecli@bytedance.com>
66e783a to
2ec415b
Compare
|
I have made the requested changes; please review again Rebased on main and removed the already-merged prerequisite and old merge commits. Applied the RUNSHARED and CI suggestions, and shortened the PR description. The related tests passed (68 tests run, 8 skipped); shared AArch64 and glibc-to-musl cross builds also passed checks for all enabled modules. |
|
Thanks for making the requested changes! @itamaro: please review the changes made to this pull request. |
|
Thanks @superajun-wsj for the PR, and @itamaro for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @superajun-wsj and @itamaro, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-162560 is a backport of this pull request to the 3.15 branch. |
|
GH-162561 is a backport of this pull request to the 3.14 branch. |
…preter (pythonGH-162311) In native builds configured with `--with-build-python`, `checksharedmods` uses the external build Python and can incorrectly report that a module built into the target Python failed to import. Use the newly built Python for extension checks and for generating missing-stdlib information. Cross builds continue to use the external build Python without importing target modules or adding the target library path. (cherry picked from commit cc056ab) Co-authored-by: Jeffery <wangshaojun.jeffery@bytedance.com>
…t interpreter (pythonGH-162311) In native builds configured with `--with-build-python`, `checksharedmods` uses the external build Python and can incorrectly report that a module built into the target Python failed to import. Use the newly built Python for extension checks. Cross builds continue to use the external build Python without importing target modules. (cherry picked from commit cc056ab) Co-authored-by: Jeffery <wangshaojun.jeffery@bytedance.com>
…rpreter (GH-162311) (#162560) In native builds configured with `--with-build-python`, `checksharedmods` uses the external build Python and can incorrectly report that a module built into the target Python failed to import. Use the newly built Python for extension checks and for generating missing-stdlib information. Cross builds continue to use the external build Python without importing target modules or adding the target library path. (cherry picked from commit cc056ab) Co-authored-by: Jeffery <wangshaojun.jeffery@bytedance.com>
…rpreter (GH-162311) (#162561) In native builds configured with `--with-build-python`, `checksharedmods` uses the external build Python and can incorrectly report that a module built into the target Python failed to import. Use the newly built Python for extension checks. Cross builds continue to use the external build Python without importing target modules. (cherry picked from commit cc056ab) Co-authored-by: Jeffery <wangshaojun.jeffery@bytedance.com>
Fixes #162308.
In native builds configured with
--with-build-python, extension checks run in the external build Python and can reject modules that are built into the target Python. This change runs both extension checks and missing-stdlib information generation with the newly built target Python. Cross builds continue to use the external build Python without importing target modules or adding the target library path.Validation: native strict checks and shared AArch64 and glibc-to-musl cross builds passed; both original failure modes were reproduced, and the three related test files passed (68 tests run, 8 skipped).
Prepared with assistance from TRAE CLI.