Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
tarfile.py32 linesDownload Raw Back to _compat
1from __future__ import annotations2 3import sys4import tarfile5 6 7TYPE_CHECKING = False8 9if TYPE_CHECKING:10    TarFile = tarfile.TarFile11 12# Per https://peps.python.org/pep-0706/, the "data" filter will become13# the default in Python 3.14. The first series of releases with the filter14# had a broken filter that could not process symlinks correctly.15elif (16    (3, 9, 18) <= sys.version_info < (3, 10)17    or (3, 10, 13) <= sys.version_info < (3, 11)18    or (3, 11, 5) <= sys.version_info < (3, 12)19    or (3, 12) <= sys.version_info < (3, 14)20):21 22    class TarFile(tarfile.TarFile):  # pragma: no cover23        extraction_filter = staticmethod(tarfile.data_filter)24 25else:26    TarFile = tarfile.TarFile  # pragma: no cover27 28 29__all__ = [30    'TarFile',31]32 
codekingpro/portable-devtools · Team Ai