We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f36a6c3 + bdbab91 commit 033e4f8Copy full SHA for 033e4f8
flit/build.py
@@ -21,7 +21,9 @@
21
def unpacked_tarball(path):
22
tf = tarfile.open(str(path))
23
with TemporaryDirectory() as tmpdir:
24
- tf.extractall(tmpdir)
+ # Py >=3.12: restrict advanced tar features which sdists shouldn't use
25
+ kw = {'filter': 'data'} if hasattr(tarfile, 'data_filter') else {}
26
+ tf.extractall(tmpdir, **kw)
27
files = os.listdir(tmpdir)
28
assert len(files) == 1, files
29
yield os.path.join(tmpdir, files[0])
0 commit comments