fix: keep the Python tools and tests on Python 3.9 #7142
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7142"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by javierUDP on 2026-10-17T13:34:44Z.
What
Path.write_text(newline=...)andzip(strict=True)were added in Python 3.10. macOS ships 3.9.6 as/usr/bin/python3, which is the interpreter CMake finds on a host without a newer one, so on a stock macOS host:prepare_release_notes.pyraisesTypeError: write_text() got an unexpected keyword argument 'newline'when the release workflow writesnotes.mdand the release body, before either file is created.pr_overlap_tools,release_packageandlinux_fixed_basefail with the sameTypeErrorand withTypeError: zip() takes no keyword arguments.write_bytesof the encoded text keeps newline translation off on every host, which is whatnewline=""andnewline="\n"asked for, and the dynamic tag lists are compared by length before the pairs are walked.The relinker-only build documents the minimum interpreter it needs.
A scan of every tracked
.pywith 3.9 finds no other 3.10 syntax or API: these three files are all of it.Tested
Apple M5, macOS 26.4, AppleClang 21.0.0, on current
main, relinker-only build:/usr/bin/python3)tools/testsdirectlytools/testsdirectlypython3 tools/check_conventions.py --base origin/mainpasses. No Linux or Windows host was available; the change is interpreter-level and the release workflow is unchanged.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file: n/a.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T13:46:30Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)tools/tests/test_pr_overlap.pyL303-304, L313core/relinker/relinker/tests/test_linux_fixed_base.pyL107Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/BUILD.mddocs/dev/BUILD.mddocs/dev/BUILD.mddocs/dev/BUILD.mdtools/tests/test_pr_overlap.pydocs/dev/BUILD.mdImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T14:13:57Z.
Overlap follow-up: open #6843 already contains the same Python 3.9 compatibility change in
test_linux_fixed_base.py(length check before ordinaryzip). Your branch includes that behavior along with the release-notes and overlap-tool fixes. The two PRs edit the same test lines, so please coordinate consolidation with #6843’s maintainer; both remain open per the contributor’s instruction.