File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 44import hmac
55import os .path
66import re
7+ import sys
78import tarfile
89import tempfile
910import zipfile
175176_manylinux_arches = _jointlinux_arches | {"ppc64" }
176177_musllinux_arches = _jointlinux_arches
177178
179+ # Remove this patch once 3.13.6 is available.
180+ if sys .version_info >= (3 , 13 , 6 ): # pragma: no cover
181+ raise RuntimeError ("Patched _block() not needed in Python 3.13.6+" )
182+
183+
184+ def _block_patched (self , count , _orig_block = tarfile .TarInfo ._block ):
185+ if count < 0 : # pragma: no cover
186+ raise tarfile .InvalidHeaderError ("invalid offset" )
187+ return _orig_block (self , count )
188+
189+
190+ tarfile .TarInfo ._block = _block_patched # type: ignore[attr-defined]
191+
178192
179193# Actual checking code;
180194def _valid_platform_tag (platform_tag ):
You can’t perform that action at this time.
0 commit comments