Support Python 3.11 isolated restore
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02994-7685-7940-bf34-3555b8256018
This commit is contained in:
parent
295bf43d54
commit
2c92b97f37
3 changed files with 21 additions and 3 deletions
|
|
@ -210,7 +210,13 @@ def extract_bundle(
|
|||
expected = validated["manifest"]["os_config_members"]
|
||||
if observed != expected:
|
||||
raise RestoreError("decrypted archive membership or modes differ from manifest")
|
||||
archive.extractall(path=stage, filter="data")
|
||||
# Python 3.12 added the extraction filter argument. On older
|
||||
# supported runtimes the complete member/link/type validation
|
||||
# above is the equivalent fail-closed gate before extraction.
|
||||
if sys.version_info >= (3, 12):
|
||||
archive.extractall(path=stage, filter="data")
|
||||
else:
|
||||
archive.extractall(path=stage)
|
||||
plain_archive.unlink()
|
||||
packages = stage / "packages.txt"
|
||||
_decrypt(executable, identity, artifacts["packages"], packages)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue