Fix Python 3.14+ parallelism: force fork start method and fix tar.extract filter#429
Fix Python 3.14+ parallelism: force fork start method and fix tar.extract filter#429Copilot wants to merge 8 commits intojust-python3.14-supportfrom
fork start method and fix tar.extract filter#429Conversation
* Initial plan * Add .github/copilot-instructions.md and AGENTS.md Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com> * Manual updates to agent instructions * Address code review comments * Address further code review comments * Remove copilot-instructions.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com> Co-authored-by: Ryan Forsyth <forsyth2@llnl.gov>
fork multiprocessing start method to fix Python 3.14+ parallelism
|
@copilot Yes, that change alone does in fact keep most of the tests passing. However if sys.version_info >= (3, 12):
tar.extract(tarinfo, filter="tar") # "data" is too restrictive, "fully_trusted" is too permissive.
else:
tar.extract(tarinfo)Full test output |
Yes, that test needed this fix too. Added |
fork multiprocessing start method to fix Python 3.14+ parallelismfork start method and fix tar.extract filter
|
I've confirmed all of the Python tests pass now. I also added a commit to fix the pre-commit checks. |
Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com>
Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com>
0a5d3fd to
cb558ab
Compare
|
Rebased off |
|
Closing in favor of #434, which uses only the relevant commits and merges to |
Python 3.14 introduced two breaking changes affecting zstash: the default multiprocessing start method changed from
forktospawn, and the defaulttarfile.extract()filter changed to"data", which raisesAbsoluteLinkErrorfor entries with absolute symlinks.Changes
zstash/main.py: Importmultiprocessingand callmultiprocessing.set_start_method("fork", force=True)at the top ofmain(), guarded by asys.platform != "win32"check sinceforkis POSIX-only.zstash/extract.py: Usefilter="tar"fortar.extract()on Python 3.12+, which preserves the old behavior of allowing absolute symlinks while still being safer than"fully_trusted".Summary
Objectives:
forkas the multiprocessing start method so parallel zstash operations work correctly on Python 3.14+tar.extract()to usefilter="tar"on Python 3.12+ to preventAbsoluteLinkErrorwhen extracting entries with absolute symlinksSelect one: This pull request is...
Small Change
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.