first commit
This commit is contained in:
commit
417e54da96
5696 changed files with 900003 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import typing
|
||||
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
import importlib_metadata as metadata
|
||||
else:
|
||||
if sys.version_info >= (3, 10, 2):
|
||||
from importlib import metadata
|
||||
else:
|
||||
try:
|
||||
import importlib_metadata as metadata
|
||||
except ModuleNotFoundError:
|
||||
# helps bootstrapping when dependencies aren't installed
|
||||
from importlib import metadata
|
||||
|
||||
|
||||
__all__ = [
|
||||
'metadata',
|
||||
]
|
|
@ -0,0 +1,32 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import tarfile
|
||||
import typing
|
||||
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
TarFile = tarfile.TarFile
|
||||
|
||||
else:
|
||||
# Per https://peps.python.org/pep-0706/, the "data" filter will become
|
||||
# the default in Python 3.14. The first series of releases with the filter
|
||||
# had a broken filter that could not process symlinks correctly.
|
||||
if (
|
||||
(3, 8, 18) <= sys.version_info < (3, 9)
|
||||
or (3, 9, 18) <= sys.version_info < (3, 10)
|
||||
or (3, 10, 13) <= sys.version_info < (3, 11)
|
||||
or (3, 11, 5) <= sys.version_info < (3, 12)
|
||||
or (3, 12) <= sys.version_info < (3, 14)
|
||||
):
|
||||
|
||||
class TarFile(tarfile.TarFile):
|
||||
extraction_filter = staticmethod(tarfile.data_filter)
|
||||
|
||||
else:
|
||||
TarFile = tarfile.TarFile
|
||||
|
||||
|
||||
__all__ = [
|
||||
'TarFile',
|
||||
]
|
|
@ -0,0 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from tomllib import TOMLDecodeError, load, loads
|
||||
else:
|
||||
from tomli import TOMLDecodeError, load, loads
|
||||
|
||||
|
||||
__all__ = [
|
||||
'TOMLDecodeError',
|
||||
'load',
|
||||
'loads',
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue