Repo Init.

This commit is contained in:
SL
2024-04-25 09:12:48 +08:00
commit ee5002dbb5
3583 changed files with 348959 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import sys
__all__ = ['tomllib']
if sys.version_info >= (3, 11):
import tomllib
else: # pragma: no cover
from setuptools.extern import tomli as tomllib
+12
View File
@@ -0,0 +1,12 @@
import sys
import shutil
def shutil_rmtree(path, ignore_errors=False, onexc=None):
if sys.version_info >= (3, 12):
return shutil.rmtree(path, ignore_errors, onexc=onexc)
def _handler(fn, path, excinfo):
return onexc(fn, path, excinfo[1])
return shutil.rmtree(path, ignore_errors, onerror=_handler)
+9
View File
@@ -0,0 +1,9 @@
import sys
# Explicitly use the ``"locale"`` encoding in versions that support it,
# otherwise just rely on the implicit handling of ``encoding=None``.
# Since all platforms that support ``EncodingWarning`` also support
# ``encoding="locale"``, this can be used to suppress the warning.
# However, please try to use UTF-8 when possible
# (.pth files are the notorious exception: python/cpython#77102, pypa/setuptools#3937).
LOCALE_ENCODING = "locale" if sys.version_info >= (3, 10) else None