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 4
4
import hmac
5
5
import os .path
6
6
import re
7
+ import sys
7
8
import tarfile
8
9
import tempfile
9
10
import zipfile
175
176
_manylinux_arches = _jointlinux_arches | {"ppc64" }
176
177
_musllinux_arches = _jointlinux_arches
177
178
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
+
178
192
179
193
# Actual checking code;
180
194
def _valid_platform_tag (platform_tag ):
You can’t perform that action at this time.
0 commit comments