mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-87685 Update typeshed version to 9c00c6e556cd864c044daffb07733f3a8c38b621
Closes PY-87685 GitOrigin-RevId: 4c068178e8b331bbe7b9582116cfc93d53ec5216
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ca499b2744
commit
da292e2041
+1
-1
@@ -35,7 +35,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
with:
|
||||
version: PATH
|
||||
python-platform: ${{ matrix.python-platform }}
|
||||
python-version: "3.9" # Oldest version supported for running scripts and tests
|
||||
python-version: "3.10" # Oldest version supported for running scripts and tests
|
||||
project: ./pyrightconfig.scripts_and_tests.json
|
||||
stubsabot-dry-run:
|
||||
name: Stubsabot dry run
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: ["linux", "win32", "darwin"]
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-platform: ["Linux", "Windows", "Darwin"]
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -55,8 +55,6 @@ Note that some tests require extra setup steps to install the required dependenc
|
||||
<td>Linux / macOS / WSL</td>
|
||||
<td>
|
||||
|
||||
On Linux and macOS, you will be able to run the full test suite on Python
|
||||
3.9-3.12.
|
||||
To install the necessary requirements, run the following commands from a
|
||||
terminal window:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ the project the stubs are for, but instead report them here to typeshed.**
|
||||
Further documentation on stub files, typeshed, and Python's typing system in
|
||||
general, can also be found at https://typing.readthedocs.io/en/latest/.
|
||||
|
||||
Typeshed supports Python versions 3.9 to 3.14.
|
||||
Typeshed supports Python versions 3.10 to 3.14.
|
||||
|
||||
## Using
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# https://github.com/astral-sh/uv/issues/8666
|
||||
name = "typeshed"
|
||||
version = "0"
|
||||
requires-python = ">=3.9" # Minimum version to run tests, used by uv run
|
||||
requires-python = ">=3.10" # Minimum version to run tests, used by uv run
|
||||
|
||||
[tool.black]
|
||||
line-length = 130
|
||||
@@ -12,8 +12,6 @@ skip-magic-trailing-comma = true
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 130
|
||||
# Oldest supported Python version
|
||||
target-version = "py39"
|
||||
fix = true
|
||||
exclude = [
|
||||
# virtual environment
|
||||
@@ -149,6 +147,12 @@ extend-safe-fixes = [
|
||||
"UP036", # Remove unnecessary `sys.version_info` blocks
|
||||
]
|
||||
ignore = [
|
||||
###
|
||||
# TODO: Disabled temporarily, until Python 3.9 support is fully removed in
|
||||
# May 2026.
|
||||
###
|
||||
"UP035", # import from typing
|
||||
"UP036", # Remove unnecessary `sys.version_info` blocks
|
||||
###
|
||||
# Rules that can conflict with the formatter (Black)
|
||||
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
|
||||
@@ -255,12 +259,10 @@ extra-standard-library = [
|
||||
"_typeshed",
|
||||
"typing_extensions",
|
||||
# Extra modules not recognized by Ruff
|
||||
# Added in Python 3.9
|
||||
"zoneinfo",
|
||||
# Added in Python 3.14
|
||||
"compression",
|
||||
]
|
||||
known-first-party = ["_utils", "ts_utils"]
|
||||
|
||||
[tool.typeshed]
|
||||
oldest_supported_python = "3.9"
|
||||
oldest_supported_python = "3.10"
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
"stubs/opentracing/opentracing/span.pyi",
|
||||
"stubs/paramiko/paramiko/_winapi.pyi",
|
||||
"stubs/parsimonious/parsimonious/nodes.pyi",
|
||||
"stubs/passlib",
|
||||
"stubs/peewee",
|
||||
"stubs/pexpect",
|
||||
"stubs/pika",
|
||||
|
||||
@@ -59,6 +59,7 @@ _frozen_importlib_external.WindowsRegistryFinder.REGISTRY_KEY
|
||||
_frozen_importlib_external.WindowsRegistryFinder.REGISTRY_KEY_DEBUG
|
||||
|
||||
builtins.OSError.characters_written # GetSetDescriptor that always raises AttributeError
|
||||
builtins.ellipsis # does not exist at runtime, see https://github.com/python/typeshed/issues/7580
|
||||
builtins.float.__getformat__ # Internal method for CPython test suite
|
||||
|
||||
# These super() dunders don't seem to be particularly useful,
|
||||
@@ -180,11 +181,22 @@ sys.tracebacklimit # Must be set first
|
||||
# ==========================================================
|
||||
|
||||
# async at runtime, deliberately not in the stub, see #7491
|
||||
_collections_abc.AsyncGenerator.asend # pos-only differences also.
|
||||
_collections_abc.AsyncGenerator.asend # pos-only differences also
|
||||
_collections_abc.AsyncGenerator.__anext__
|
||||
_collections_abc.AsyncGenerator.aclose
|
||||
_collections_abc.AsyncGenerator.athrow # pos-only differences also
|
||||
_collections_abc.AsyncIterator.__anext__
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# Pretend typing.ByteString is a Union, to better match its documented semantics.
|
||||
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
|
||||
# because it's not an ABC that makes any sense and was deprecated in 3.12
|
||||
@@ -217,6 +229,7 @@ argparse.Namespace.__getattr__ # The whole point of this class is its attribute
|
||||
_?ast.AST.__init__
|
||||
_?ast.excepthandler.__init__
|
||||
_?ast.expr.__init__
|
||||
_?ast.pattern.__init__
|
||||
_?ast.stmt.__init__
|
||||
|
||||
_ast.ImportFrom.level # None on the class, but never None on instances
|
||||
@@ -235,6 +248,7 @@ asyncio.locks.Condition.locked
|
||||
asyncio.locks.Condition.release
|
||||
|
||||
builtins.memoryview.__contains__ # C type that implements __getitem__
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
builtins.reveal_locals # Builtins that type checkers pretends exist
|
||||
builtins.reveal_type # Builtins that type checkers pretends exist
|
||||
|
||||
@@ -251,6 +265,7 @@ codecs.CodecInfo.streamwriter
|
||||
codecs.StreamReaderWriter.\w+
|
||||
codecs.StreamRecoder.\w+
|
||||
|
||||
collections.UserList.index # ignoring pos-or-keyword parameter
|
||||
collections.UserList.sort # Runtime has *args but will error if any are supplied
|
||||
collections.abc.* # Types are re-exported from _collections_abc, so errors should be fixed there
|
||||
configparser.SectionProxy.__getattr__ # SectionProxy can have arbitrary attributes when custom converters are used
|
||||
@@ -287,6 +302,8 @@ _?ctypes.Union.__setattr__ # doesn't exist, but makes things easy if we pretend
|
||||
# These would ideally be special-cased by type checkers; see https://github.com/python/mypy/issues/2220
|
||||
_?ctypes.Array.__iter__
|
||||
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
|
||||
# __all__-related weirdness (see #6523)
|
||||
email.__all__
|
||||
email.base64mime
|
||||
@@ -317,6 +334,8 @@ http.HTTPStatus.description # set in __new__; work-around for enum wierdness
|
||||
http.HTTPStatus.phrase # set in __new__; work-around for enum wierdness
|
||||
imaplib.IMAP4_SSL.ssl # Depends on the existence and flags of SSL
|
||||
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# runtime is *args, **kwargs due to a wrapper; we have more accurate signatures in the stubs
|
||||
importlib._bootstrap_external.ExtensionFileLoader.get_filename
|
||||
importlib._bootstrap_external.FileLoader.get_filename
|
||||
@@ -326,6 +345,8 @@ importlib.abc.FileLoader.get_filename
|
||||
importlib.abc.FileLoader.load_module
|
||||
importlib.machinery.ExtensionFileLoader.get_filename
|
||||
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
# We can't distinguish not having a default value from having a default value of inspect.Parameter.empty
|
||||
inspect.Parameter.__init__
|
||||
inspect.Signature.__init__
|
||||
@@ -446,6 +467,8 @@ traceback.TracebackException.from_exception # explicitly expanding arguments go
|
||||
turtle.ScrolledCanvas.find_all # Dynamically created, has unnecessary *args
|
||||
turtle.ScrolledCanvas.select_clear # Dynamically created, has unnecessary *args
|
||||
turtle.ScrolledCanvas.select_item # Dynamically created, has unnecessary *args
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
|
||||
types.GenericAlias.__getattr__
|
||||
@@ -516,6 +539,17 @@ typing(_extensions)?\.(Async)?ContextManager
|
||||
typing(_extensions)?\.IO\.__iter__
|
||||
typing(_extensions)?\.IO\.__next__
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
types.MethodType.__closure__ # read-only but not actually a property; stubtest thinks it doesn't exist.
|
||||
types.MethodType.__code__ # read-only but not actually a property; stubtest thinks it doesn't exist.
|
||||
types.MethodType.__defaults__ # read-only but not actually a property; stubtest thinks it doesn't exist.
|
||||
@@ -550,3 +584,8 @@ xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signatu
|
||||
# These would ideally be special-cased by type checkers; see https://github.com/python/mypy/issues/2220
|
||||
xml.etree.ElementTree.Element.__iter__
|
||||
xml.etree.cElementTree.Element.__iter__
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
# =========
|
||||
# Temporary
|
||||
# =========
|
||||
|
||||
# Added in Python 3.9.14
|
||||
# (Remove once 3.9.14 becomes available for GitHub Actions)
|
||||
sys.set_int_max_str_digits
|
||||
sys.get_int_max_str_digits
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.17
|
||||
# (Remove once 3.9.17 becomes available for GitHub Actions)
|
||||
shutil.unpack_archive
|
||||
tarfile.AbsoluteLinkError
|
||||
tarfile.AbsolutePathError
|
||||
tarfile.FilterError
|
||||
tarfile.LinkOutsideDestinationError
|
||||
tarfile.OutsideDestinationError
|
||||
tarfile.SpecialFileError
|
||||
tarfile.TarFile.extract
|
||||
tarfile.TarFile.extractall
|
||||
tarfile.TarInfo.replace
|
||||
tarfile.data_filter
|
||||
tarfile.fully_trusted_filter
|
||||
tarfile.tar_filter
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.19
|
||||
# (Remove once 3.9.19 becomes available for GitHub Actions)
|
||||
pyexpat.XMLParserType.GetReparseDeferralEnabled
|
||||
pyexpat.XMLParserType.SetReparseDeferralEnabled
|
||||
xml.etree.ElementTree.XMLParser.flush
|
||||
xml.etree.ElementTree.XMLPullParser.flush
|
||||
xml.etree.cElementTree.XMLParser.flush
|
||||
xml.etree.cElementTree.XMLPullParser.flush
|
||||
xml.parsers.expat.XMLParserType.GetReparseDeferralEnabled
|
||||
xml.parsers.expat.XMLParserType.SetReparseDeferralEnabled
|
||||
xml.sax.expatreader.ExpatParser.flush
|
||||
zipfile.ZipInfo.__slots__
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.20
|
||||
# (Remove once 3.9.20 becomes available for GitHub Actions)
|
||||
email._header_value_parser.NLSET
|
||||
email._header_value_parser.SPECIALSNL
|
||||
email.errors.HeaderWriteError
|
||||
email.utils.getaddresses
|
||||
email.utils.parseaddr
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.22
|
||||
# (Remove once 3.9.22 becomes available for GitHub Actions)
|
||||
email._header_value_parser.get_encoded_word
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.23
|
||||
# (Remove once 3.9.23 becomes available for GitHub Actions)
|
||||
genericpath.__all__
|
||||
genericpath.ALLOW_MISSING
|
||||
(ntpath.__all__)?
|
||||
(ntpath.ALLOW_MISSING)?
|
||||
(ntpath.realpath)?
|
||||
(os.path.__all__)?
|
||||
(os.path.ALLOW_MISSING)?
|
||||
(os.path.realpath)?
|
||||
(posixpath.__all__)?
|
||||
(posixpath.ALLOW_MISSING)?
|
||||
(posixpath.realpath)?
|
||||
tarfile.LinkFallbackError
|
||||
tarfile.TarFile._extract_member
|
||||
tarfile.TarFile.makelink_with_filter
|
||||
html.parser.HTMLParser.set_cdata_mode # parameter `escapable`
|
||||
email._header_value_parser.make_quoted_pairs
|
||||
|
||||
# Parameter `scripting` added in Python 3.9.25
|
||||
# (Remove once 3.9.25 becomes available for GitHub Actions)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
# Doesn't exist on macos:
|
||||
_msi
|
||||
msilib(.[a-z]+)?
|
||||
ossaudiodev
|
||||
spwd
|
||||
@@ -1,25 +0,0 @@
|
||||
# ========
|
||||
# 3.9 only
|
||||
# ========
|
||||
|
||||
# `eventmask` argument exists at runtime, but is not correctly recognized
|
||||
# while being inspected by stubtest. Fixed in Python 3.10.
|
||||
select.epoll.register
|
||||
|
||||
# According to stubtest, these are sometimes not present at runtime, starting
|
||||
# with Python 3.9.24. Which is not true.
|
||||
(_frozen_importlib_external.PathFinder.find_distributions)?
|
||||
(importlib._bootstrap_external.PathFinder.find_distributions)?
|
||||
(importlib.machinery.PathFinder.find_distributions)?
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
# doesn't exist on linux
|
||||
_msi
|
||||
msilib(.[a-z]+)?
|
||||
|
||||
# doesn't exist in all installations
|
||||
(nis)?
|
||||
@@ -3,43 +3,6 @@
|
||||
# =========================
|
||||
|
||||
|
||||
# =======
|
||||
# >= 3.10
|
||||
# =======
|
||||
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
|
||||
# =========
|
||||
# 3.10 only
|
||||
# =========
|
||||
@@ -166,22 +129,6 @@ importlib.abc.Traversable.open # Problematic protocol signature at runtime, see
|
||||
typing_extensions.TypeAliasType.__call__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Runtime AST node runtime constructor behaviour is too loose.
|
||||
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
|
||||
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
|
||||
_?ast.pattern.__init__
|
||||
|
||||
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
|
||||
# ===============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; 3.10 only
|
||||
# ===============================================================
|
||||
|
||||
@@ -23,43 +23,6 @@ enum.StrEnum._generate_next_value_
|
||||
# ====================================
|
||||
|
||||
|
||||
# =======
|
||||
# >= 3.10
|
||||
# =======
|
||||
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
|
||||
# ============
|
||||
# 3.10 to 3.11
|
||||
# ============
|
||||
@@ -152,22 +115,6 @@ typing\._SpecialForm.* # Super-special typing primitive
|
||||
typing\.LiteralString # Super-special typing primitive
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Runtime AST node runtime constructor behaviour is too loose.
|
||||
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
|
||||
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
|
||||
_?ast.pattern.__init__
|
||||
|
||||
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
|
||||
# ===============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; 3.11 only
|
||||
# ===============================================================
|
||||
|
||||
@@ -40,43 +40,6 @@ typing.NewType.__mro_entries__
|
||||
enum.Enum.__init__
|
||||
|
||||
|
||||
# =======
|
||||
# >= 3.10
|
||||
# =======
|
||||
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.12
|
||||
# =======
|
||||
@@ -184,22 +147,6 @@ typing\.LiteralString # Super-special typing primitive
|
||||
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Runtime AST node runtime constructor behaviour is too loose.
|
||||
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
|
||||
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
|
||||
_?ast.pattern.__init__
|
||||
|
||||
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
|
||||
# ===============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; 3.12 only
|
||||
# ===============================================================
|
||||
|
||||
@@ -40,43 +40,6 @@ typing.NewType.__mro_entries__
|
||||
enum.Enum.__init__
|
||||
|
||||
|
||||
# =======
|
||||
# >= 3.10
|
||||
# =======
|
||||
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.13
|
||||
# =======
|
||||
@@ -174,19 +137,3 @@ typing\.LiteralString # Super-special typing primitive
|
||||
# ==================================================================
|
||||
|
||||
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Runtime AST node runtime constructor behaviour is too loose.
|
||||
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
|
||||
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
|
||||
_?ast.pattern.__init__
|
||||
|
||||
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
@@ -71,43 +71,6 @@ types.SimpleNamespace.__delattr__
|
||||
typing.NewType.__mro_entries__
|
||||
|
||||
|
||||
# =======
|
||||
# >= 3.10
|
||||
# =======
|
||||
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# positional-only complaints caused by differences between typing aliases and the "real" classes in the stdlib
|
||||
_collections_abc.Coroutine.send
|
||||
_collections_abc.Coroutine.throw
|
||||
_collections_abc.Generator.send
|
||||
_collections_abc.Generator.throw
|
||||
|
||||
# These are not positional-only at runtime, but we treat them as positional-only to match dict.
|
||||
_collections_abc.MutableMapping.pop
|
||||
_collections_abc.MutableMapping.setdefault
|
||||
|
||||
# These three have a pos-or-keyword first parameter at runtime, but deliberately have a pos-only first parameter in the stub. #6812
|
||||
posixpath.join
|
||||
ntpath.join
|
||||
os.path.join
|
||||
|
||||
# this is implemented with *args having a minimum size so arguments before it must be positional (but stubtest doesn't see that)
|
||||
tkinter.ttk.Style.element_create
|
||||
|
||||
# typing.IO uses positional-or-keyword arguments, but in the stubs we prefer
|
||||
# to mark these as positional-only for compatibility with existing sub-classes.
|
||||
typing(_extensions)?\.BinaryIO\.write
|
||||
typing(_extensions)?\.IO\.read
|
||||
typing(_extensions)?\.IO\.readline
|
||||
typing(_extensions)?\.IO\.readlines
|
||||
typing(_extensions)?\.IO\.seek
|
||||
typing(_extensions)?\.IO\.truncate
|
||||
typing(_extensions)?\.IO\.write
|
||||
typing(_extensions)?\.IO\.writelines
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.14
|
||||
# =============================================================
|
||||
@@ -212,19 +175,3 @@ importlib.resources.abc.Traversable.open # Problematic protocol signature at ru
|
||||
inspect._ParameterKind.description # Still exists, but stubtest can't see it
|
||||
typing\._SpecialForm.* # Super-special typing primitive
|
||||
typing\.LiteralString # Super-special typing primitive
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; >= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Runtime AST node runtime constructor behaviour is too loose.
|
||||
# For static typing, the loose behaviour is undesirable (https://github.com/python/typeshed/issues/8378).
|
||||
# For the runtime, the loose behaviour is deprecated in Python 3.13 (https://github.com/python/cpython/issues/105858)
|
||||
_?ast.pattern.__init__
|
||||
|
||||
_collections_abc.AsyncGenerator.athrow # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
# ========
|
||||
# 3.9 only
|
||||
# ========
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
collections.AsyncIterable.__class_getitem__
|
||||
collections.Awaitable.__class_getitem__
|
||||
collections.Container.__class_getitem__
|
||||
collections.Iterable.__class_getitem__
|
||||
collections.MappingView.__class_getitem__
|
||||
hmac.HMAC.digest_cons
|
||||
hmac.HMAC.inner
|
||||
hmac.HMAC.outer
|
||||
xxsubtype # module missing from the stubs
|
||||
|
||||
builtins.input # Incorrect default value in text signature, fixed in 3.10
|
||||
collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in the stub, see #7491
|
||||
collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491
|
||||
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
|
||||
collections.AsyncIterator.__anext__ # async at runtime, deliberately not in the stub, see #7491
|
||||
collections.ByteString # see comments in common.txt
|
||||
collections.Callable
|
||||
collections.Mapping.get # Adding None to the Union messed up mypy
|
||||
collections.Sequence.index # Supporting None in end is not mandatory
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.10
|
||||
# =======
|
||||
|
||||
builtins.float.__setformat__ # Internal method for CPython test suite
|
||||
email.contentmanager.typ
|
||||
gettext.install # codeset default value is ['unspecified'] so can't be specified
|
||||
gettext.translation # codeset default value is ['unspecified'] so can't be specified
|
||||
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
|
||||
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
|
||||
|
||||
# SpooledTemporaryFile implements IO except these methods before Python 3.11
|
||||
# See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918
|
||||
tempfile.SpooledTemporaryFile.__next__
|
||||
tempfile.SpooledTemporaryFile.readable
|
||||
tempfile.SpooledTemporaryFile.seekable
|
||||
tempfile.SpooledTemporaryFile.writable
|
||||
|
||||
tkinter.Tk.split # Exists at runtime, but missing from stubs
|
||||
typing._SpecialForm.__mro_entries__ # Exists at runtime, but missing from stubs
|
||||
|
||||
# Will always raise. Not included to avoid type checkers inferring that
|
||||
# Sentinel instances are callable.
|
||||
typing_extensions.Sentinel.__call__
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.11
|
||||
# =======
|
||||
|
||||
enum.Enum._generate_next_value_
|
||||
importlib.abc.Finder.find_module
|
||||
urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ # Args are passed as is to super, so super args are specified
|
||||
xml.etree.ElementTree.Element.__bool__ # Doesn't really exist; see comments in stub
|
||||
xml.etree.cElementTree.Element.__bool__ # Doesn't really exist; see comments in stub
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.12
|
||||
# =======
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
lib2to3.btm_utils
|
||||
lib2to3.fixer_util
|
||||
lib2to3.patcomp
|
||||
lib2to3.pgen2.grammar.Grammar.loads
|
||||
lib2to3.pygram.pattern_symbols
|
||||
lib2to3.pygram.python_symbols
|
||||
lib2to3.pytree.Base.__new__
|
||||
lib2to3.pytree.Base.children
|
||||
lib2to3.pytree.Base.type
|
||||
lib2to3.pytree.BasePattern.__new__
|
||||
lib2to3.pytree.BasePattern.type
|
||||
lib2to3.pytree.NegatedPattern.match
|
||||
lib2to3.pytree.NegatedPattern.match_seq
|
||||
tkinter.tix.[A-Z_]+
|
||||
tkinter.tix.CObjView
|
||||
tkinter.tix.DialogShell
|
||||
tkinter.tix.ExFileSelectDialog
|
||||
tkinter.tix.FileSelectDialog
|
||||
tkinter.tix.FileTypeList
|
||||
tkinter.tix.Grid
|
||||
tkinter.tix.NoteBookFrame
|
||||
tkinter.tix.OptionName
|
||||
tkinter.tix.ResizeHandle
|
||||
tkinter.tix.ScrolledGrid
|
||||
tkinter.tix.ScrolledHList
|
||||
tkinter.tix.ScrolledListBox
|
||||
tkinter.tix.ScrolledTList
|
||||
tkinter.tix.ScrolledText
|
||||
tkinter.tix.ScrolledWindow
|
||||
tkinter.tix.Shell
|
||||
tkinter.tix.TclVersion
|
||||
tkinter.tix.TkVersion
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.13
|
||||
# =======
|
||||
|
||||
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
|
||||
|
||||
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
|
||||
|
||||
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
|
||||
|
||||
# Will always raise. Not included to avoid type checkers inferring that
|
||||
# TypeAliasType instances are callable.
|
||||
typing_extensions.TypeAliasType.__call__
|
||||
|
||||
|
||||
# ==============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; 3.9 only
|
||||
# ==============================================================
|
||||
|
||||
ast.FormattedValue.conversion # None on the class, but never None on instances
|
||||
_ast.FormattedValue.conversion # None on the class, but never None on instances
|
||||
|
||||
_ssl.RAND_egd # Depends on the existence and flags of SSL
|
||||
builtins.classmethod.__get__ # Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
|
||||
builtins.property.__get__ # Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
|
||||
builtins.staticmethod.__get__ # Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
|
||||
builtins.memoryview.__iter__ # C type that implements __getitem__
|
||||
builtins.memoryview.cast # inspect.signature is incorrect about shape being kw-only
|
||||
collections.Mapping.__reversed__ # Set to None at runtime for a better error message, omitted from typeshed
|
||||
|
||||
# Adding these reflected dunders to `typing.AbstractSet` causes a large number of false-positives. See #7414.
|
||||
collections.Set.__rand__
|
||||
collections.Set.__ror__
|
||||
collections.Set.__rsub__
|
||||
collections.Set.__rxor__
|
||||
|
||||
ssl.RAND_egd # Depends on the existence and flags of SSL
|
||||
test # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
|
||||
# Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
|
||||
types.ClassMethodDescriptorType.__get__
|
||||
types.FunctionType.__get__
|
||||
types.GetSetDescriptorType.__get__
|
||||
types.LambdaType.__get__
|
||||
types.MemberDescriptorType.__get__
|
||||
types.MethodDescriptorType.__get__
|
||||
types.WrapperDescriptorType.__get__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.10
|
||||
# =============================================================
|
||||
|
||||
# Side effects from module initialization
|
||||
_compat_pickle.excname
|
||||
email.contentmanager.maintype
|
||||
email.contentmanager.subtype
|
||||
inspect.k
|
||||
inspect.mod_dict
|
||||
inspect.v
|
||||
json.encoder.i
|
||||
lib2to3.pgen2.grammar.line
|
||||
lib2to3.pgen2.grammar.name
|
||||
lib2to3.pgen2.grammar.op
|
||||
|
||||
pstats.SortKey.__new__ # Derives from (str, Enum)
|
||||
pydoc.Helper.symbol # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
|
||||
pydoc.Helper.symbols_ # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
|
||||
pydoc.Helper.topic # Loop variable in class https://github.com/python/typeshed/issues/6401#issuecomment-981178522
|
||||
sqlite3.test # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
sqlite3\.test\..+ # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
tkinter.EventType.__new__ # Derives from (str, Enum)
|
||||
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.11
|
||||
# =============================================================
|
||||
|
||||
.*.__buffer__ # We lie about the existence of these methods
|
||||
.*.__release_buffer__ # We lie about the existence of these methods
|
||||
asynchat.async_chat.encoding # Removed in 3.12
|
||||
asynchat.async_chat.use_encoding # Removed in 3.12
|
||||
asynchat.find_prefix_at_end # Removed in 3.12
|
||||
asyncore.dispatcher.addr # Removed in 3.12
|
||||
asyncore.dispatcher.handle_accepted # Removed in 3.12
|
||||
ctypes.test # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
ctypes\.test\..+ # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
distutils\..* # Removed in 3.12
|
||||
lib2to3.tests # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
lib2to3\.tests\..+ # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
pkgutil.ImpImporter\..* # Removed in 3.12
|
||||
pkgutil.ImpLoader\..* # Removed in 3.12
|
||||
platform.platform # runtime default is 0, we pretend it's a bool
|
||||
poplib.POP3_SSL.stls # bad declaration of inherited function. See poplib.pyi
|
||||
tkinter.test # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
tkinter\.test\..+ # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
|
||||
# We call them read-only properties, runtime implementation is slightly different
|
||||
typing_extensions\.TypeAliasType\.__(parameters|type_params|name|module|value)__
|
||||
|
||||
unittest.test # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
unittest\.test\..+ # Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
# Undocumented implementation details
|
||||
cgi.FieldStorage.bufsize
|
||||
cgi.FieldStorage.read_binary
|
||||
cgi.FieldStorage.read_lines
|
||||
cgi.FieldStorage.read_lines_to_eof
|
||||
cgi.FieldStorage.read_lines_to_outerboundary
|
||||
cgi.FieldStorage.read_multi
|
||||
cgi.FieldStorage.read_single
|
||||
cgi.FieldStorage.read_urlencoded
|
||||
cgi.FieldStorage.skip_lines
|
||||
|
||||
ctypes._endian.DEFAULT_MODE # Incorrectly star import.
|
||||
ctypes._endian.RTLD_GLOBAL # Incorrectly star import.
|
||||
ctypes._endian.RTLD_LOCAL # Incorrectly star import.
|
||||
multiprocessing.dummy.Lock # Factory function at runtime, but that wouldn't let us use it in type hints
|
||||
|
||||
# These multiprocessing proxy methods have *args, **kwargs signatures at runtime,
|
||||
# But have more precise (accurate) signatures in the stub
|
||||
multiprocessing.managers.DictProxy.__iter__
|
||||
multiprocessing.managers.DictProxy.__len__
|
||||
multiprocessing.managers.DictProxy.copy
|
||||
multiprocessing.managers.DictProxy.items
|
||||
multiprocessing.managers.DictProxy.keys
|
||||
multiprocessing.managers.DictProxy.values
|
||||
|
||||
# Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
|
||||
multiprocessing.managers.DictProxy.clear
|
||||
multiprocessing.managers.DictProxy.popitem
|
||||
|
||||
# Undocumented implementation details
|
||||
pipes.Template.makepipeline
|
||||
pipes.Template.open_r
|
||||
pipes.Template.open_w
|
||||
sunau.Au_read.initfp
|
||||
sunau.Au_write.initfp
|
||||
|
||||
threading.Lock # Factory function at runtime, but that wouldn't let us use it in type hints
|
||||
types.SimpleNamespace.__init__ # class doesn't accept positional arguments but has default C signature
|
||||
typing_extensions\.Annotated # Undocumented implementation details
|
||||
typing\.Annotated # Super-special typing primitive
|
||||
|
||||
# These methods have no default implementation for Python < 3.13.
|
||||
_pickle.Pickler.persistent_id
|
||||
_pickle.Unpickler.persistent_load
|
||||
pickle.Pickler.persistent_id
|
||||
pickle.Unpickler.persistent_load
|
||||
@@ -1,89 +0,0 @@
|
||||
# =========
|
||||
# Temporary
|
||||
# =========
|
||||
|
||||
# According to stubtest, these are sometimes not present at runtime, starting
|
||||
# with Python 3.9.13. Which is not true.
|
||||
(_frozen_importlib_external.PathFinder.find_distributions)?
|
||||
(importlib._bootstrap_external.PathFinder.find_distributions)?
|
||||
(importlib.machinery.PathFinder.find_distributions)?
|
||||
|
||||
# Added in Python 3.9.14
|
||||
# (Remove once 3.9.14 becomes available for GitHub Actions)
|
||||
sys.set_int_max_str_digits
|
||||
sys.get_int_max_str_digits
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.17
|
||||
# (Remove once 3.9.17 becomes available for GitHub Actions)
|
||||
shutil.unpack_archive
|
||||
tarfile.AbsoluteLinkError
|
||||
tarfile.AbsolutePathError
|
||||
tarfile.FilterError
|
||||
tarfile.LinkOutsideDestinationError
|
||||
tarfile.OutsideDestinationError
|
||||
tarfile.SpecialFileError
|
||||
tarfile.TarFile.extract
|
||||
tarfile.TarFile.extractall
|
||||
tarfile.TarInfo.replace
|
||||
tarfile.data_filter
|
||||
tarfile.fully_trusted_filter
|
||||
tarfile.tar_filter
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.19
|
||||
# (Remove once 3.9.19 becomes available for GitHub Actions)
|
||||
pyexpat.XMLParserType.GetReparseDeferralEnabled
|
||||
pyexpat.XMLParserType.SetReparseDeferralEnabled
|
||||
xml.etree.ElementTree.XMLParser.flush
|
||||
xml.etree.ElementTree.XMLPullParser.flush
|
||||
xml.etree.cElementTree.XMLParser.flush
|
||||
xml.etree.cElementTree.XMLPullParser.flush
|
||||
xml.parsers.expat.XMLParserType.GetReparseDeferralEnabled
|
||||
xml.parsers.expat.XMLParserType.SetReparseDeferralEnabled
|
||||
xml.sax.expatreader.ExpatParser.flush
|
||||
zipfile.ZipInfo.__slots__
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.20
|
||||
# (Remove once 3.9.20 becomes available for GitHub Actions)
|
||||
email._header_value_parser.NLSET
|
||||
email._header_value_parser.SPECIALSNL
|
||||
email.errors.HeaderWriteError
|
||||
email.utils.getaddresses
|
||||
email.utils.parseaddr
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.22
|
||||
# (Remove once 3.9.22 becomes available for GitHub Actions)
|
||||
email._header_value_parser.get_encoded_word
|
||||
|
||||
# Incompatible changes introduced in Python 3.9.23
|
||||
# (Remove once 3.9.23 becomes available for GitHub Actions)
|
||||
genericpath.__all__
|
||||
genericpath.ALLOW_MISSING
|
||||
(ntpath.__all__)?
|
||||
(ntpath.ALLOW_MISSING)?
|
||||
(ntpath.realpath)?
|
||||
(os.path.__all__)?
|
||||
(os.path.ALLOW_MISSING)?
|
||||
(os.path.realpath)?
|
||||
(posixpath.__all__)?
|
||||
(posixpath.ALLOW_MISSING)?
|
||||
(posixpath.realpath)?
|
||||
tarfile.LinkFallbackError
|
||||
tarfile.TarFile._extract_member
|
||||
tarfile.TarFile.makelink_with_filter
|
||||
html.parser.HTMLParser.set_cdata_mode # parameter `escapable`
|
||||
email._header_value_parser.make_quoted_pairs
|
||||
|
||||
# Parameter `scripting` added in Python 3.9.25
|
||||
# (Remove once 3.9.25 becomes available for GitHub Actions)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
# Modules that don't exist on Windows
|
||||
crypt
|
||||
nis
|
||||
ossaudiodev
|
||||
spwd
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from abc import abstractmethod
|
||||
from types import MappingProxyType
|
||||
from typing import ( # noqa: Y022,Y038,UP035,Y057
|
||||
from typing import ( # noqa: Y022,Y038,UP035,Y057,RUF100
|
||||
AbstractSet as Set,
|
||||
AsyncGenerator as AsyncGenerator,
|
||||
AsyncIterable as AsyncIterable,
|
||||
|
||||
@@ -37,7 +37,7 @@ from types import CellType, CodeType, GenericAlias, TracebackType
|
||||
|
||||
# mypy crashes if any of {ByteString, Sequence, MutableSequence, Mapping, MutableMapping}
|
||||
# are imported from collections.abc in builtins.pyi
|
||||
from typing import ( # noqa: Y022,UP035
|
||||
from typing import ( # noqa: Y022,UP035,RUF100
|
||||
IO,
|
||||
Any,
|
||||
BinaryIO,
|
||||
@@ -1385,10 +1385,10 @@ def abs(x: SupportsAbs[_T], /) -> _T: ...
|
||||
def all(iterable: Iterable[object], /) -> bool: ...
|
||||
def any(iterable: Iterable[object], /) -> bool: ...
|
||||
def ascii(obj: object, /) -> str: ...
|
||||
def bin(number: int | SupportsIndex, /) -> str: ...
|
||||
def bin(number: SupportsIndex, /) -> str: ...
|
||||
def breakpoint(*args: Any, **kws: Any) -> None: ...
|
||||
def callable(obj: object, /) -> TypeIs[Callable[..., object]]: ...
|
||||
def chr(i: int | SupportsIndex, /) -> str: ...
|
||||
def chr(i: SupportsIndex, /) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def aiter(async_iterable: SupportsAiter[_SupportsAnextT_co], /) -> _SupportsAnextT_co: ...
|
||||
@@ -1546,7 +1546,7 @@ def hash(obj: object, /) -> int: ...
|
||||
|
||||
help: _sitebuiltins._Helper
|
||||
|
||||
def hex(number: int | SupportsIndex, /) -> str: ...
|
||||
def hex(number: SupportsIndex, /) -> str: ...
|
||||
def id(obj: object, /) -> int: ...
|
||||
def input(prompt: object = "", /) -> str: ...
|
||||
@type_check_only
|
||||
@@ -1713,7 +1713,7 @@ def min(iterable: Iterable[_T1], /, *, key: Callable[[_T1], SupportsRichComparis
|
||||
def next(i: SupportsNext[_T], /) -> _T: ...
|
||||
@overload
|
||||
def next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT: ...
|
||||
def oct(number: int | SupportsIndex, /) -> str: ...
|
||||
def oct(number: SupportsIndex, /) -> str: ...
|
||||
|
||||
_Opener: TypeAlias = Callable[[str, int], int]
|
||||
|
||||
|
||||
@@ -616,6 +616,7 @@ class FileHandler(StreamHandler[TextIOWrapper]):
|
||||
encoding: str | None # undocumented
|
||||
delay: bool # undocumented
|
||||
errors: str | None # undocumented
|
||||
stream: TextIOWrapper | None # type: ignore[assignment] # None when delay=True or after close()
|
||||
def __init__(
|
||||
self, filename: StrPath, mode: str = "a", encoding: str | None = None, delay: bool = False, errors: str | None = None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1427,7 +1427,7 @@ def getfqdn(name: str = "") -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
def create_connection(
|
||||
address: tuple[str | None, int],
|
||||
address: tuple[str | None, bytes | str | int | None],
|
||||
timeout: float | None = ...,
|
||||
source_address: _Address | None = None,
|
||||
*,
|
||||
|
||||
@@ -352,7 +352,7 @@ class Connection:
|
||||
self, name: str, num_params: int, aggregate_class: Callable[[], _WindowAggregateClass] | None, /
|
||||
) -> None: ...
|
||||
|
||||
def create_collation(self, name: str, callback: Callable[[str, str], int | SupportsIndex] | None, /) -> None: ...
|
||||
def create_collation(self, name: str, callback: Callable[[str, str], SupportsIndex] | None, /) -> None: ...
|
||||
def create_function(
|
||||
self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = False
|
||||
) -> None: ...
|
||||
|
||||
@@ -704,6 +704,8 @@ class AbstractSet(Collection[_T_co]):
|
||||
def __contains__(self, x: object) -> bool: ...
|
||||
def _hash(self) -> int: ...
|
||||
# Mixin methods
|
||||
@classmethod
|
||||
def _from_iterable(cls, it: Iterable[_S]) -> AbstractSet[_S]: ...
|
||||
def __le__(self, other: AbstractSet[Any]) -> bool: ...
|
||||
def __lt__(self, other: AbstractSet[Any]) -> bool: ...
|
||||
def __gt__(self, other: AbstractSet[Any]) -> bool: ...
|
||||
@@ -736,6 +738,8 @@ class MappingView(Sized):
|
||||
|
||||
class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]):
|
||||
def __init__(self, mapping: SupportsGetItemViewable[_KT_co, _VT_co]) -> None: ... # undocumented
|
||||
@classmethod
|
||||
def _from_iterable(cls, it: Iterable[_S]) -> set[_S]: ...
|
||||
def __and__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ...
|
||||
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
||||
def __contains__(self, item: tuple[object, object]) -> bool: ... # type: ignore[override]
|
||||
@@ -749,6 +753,8 @@ class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co,
|
||||
|
||||
class KeysView(MappingView, AbstractSet[_KT_co]):
|
||||
def __init__(self, mapping: Viewable[_KT_co]) -> None: ... # undocumented
|
||||
@classmethod
|
||||
def _from_iterable(cls, it: Iterable[_S]) -> set[_S]: ...
|
||||
def __and__(self, other: Iterable[Any]) -> set[_KT_co]: ...
|
||||
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
||||
def __contains__(self, key: object) -> bool: ...
|
||||
|
||||
@@ -30,7 +30,7 @@ from collections.abc import (
|
||||
from contextlib import AbstractAsyncContextManager as AsyncContextManager, AbstractContextManager as ContextManager
|
||||
from re import Match as Match, Pattern as Pattern
|
||||
from types import GenericAlias, ModuleType
|
||||
from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035
|
||||
from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035,RUF100
|
||||
IO as IO,
|
||||
TYPE_CHECKING as TYPE_CHECKING,
|
||||
AbstractSet as AbstractSet,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.6.7"
|
||||
version = "1.6.8"
|
||||
upstream_repository = "https://github.com/authlib/authlib"
|
||||
requires = ["cryptography"]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = "3.10.*"
|
||||
version = "~=3.10.2"
|
||||
upstream_repository = "https://github.com/Python-Markdown/markdown"
|
||||
|
||||
@@ -7,7 +7,6 @@ from markdown import Markdown
|
||||
|
||||
spec: ModuleSpec
|
||||
commentclose: re.Pattern[str]
|
||||
commentabruptclose: re.Pattern[str]
|
||||
blank_line_re: re.Pattern[str]
|
||||
|
||||
class HTMLExtractor(htmlparser.HTMLParser):
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = "2.4.*"
|
||||
version = "2.4.1"
|
||||
upstream_repository = "https://github.com/fitnr/convertdate"
|
||||
|
||||
@@ -25,24 +25,23 @@ from . import (
|
||||
__version__: Final[str]
|
||||
|
||||
__all__ = [
|
||||
"holidays",
|
||||
"armenian",
|
||||
"bahai",
|
||||
"coptic",
|
||||
"dublin",
|
||||
"daycount",
|
||||
"dublin",
|
||||
"french_republican",
|
||||
"gregorian",
|
||||
"hebrew",
|
||||
"holidays",
|
||||
"indian_civil",
|
||||
"islamic",
|
||||
"iso",
|
||||
"julian",
|
||||
"julianday",
|
||||
"mayan",
|
||||
"ordinal",
|
||||
"persian",
|
||||
"positivist",
|
||||
"mayan",
|
||||
"ordinal",
|
||||
"utils",
|
||||
]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Final, Literal
|
||||
from typing_extensions import deprecated
|
||||
|
||||
EPOCH: Final = 347995.5
|
||||
HEBREW_YEAR_OFFSET: Final = 3760
|
||||
@@ -23,6 +24,8 @@ def year_months(year: int) -> Literal[12, 13]: ...
|
||||
def delay_1(year: int) -> int: ...
|
||||
def delay_2(year: int) -> Literal[0, 1, 2]: ...
|
||||
def year_days(year: int) -> float: ...
|
||||
def month_length(year: int, month: int) -> Literal[29, 30]: ...
|
||||
@deprecated("The `month_days` function is deprecated. Use `month_length` instead.")
|
||||
def month_days(year: int, month: int) -> Literal[29, 30]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
import datetime
|
||||
from typing import Literal, TypedDict, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing import Any, Final, Literal, TypedDict, type_check_only
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
from .date import DateDataParser, _DetectLanguagesFunction
|
||||
|
||||
__version__: str
|
||||
__version__: Final[str]
|
||||
|
||||
_default_parser: DateDataParser
|
||||
|
||||
_Part: TypeAlias = Literal["day", "month", "year"]
|
||||
_ParserKind: TypeAlias = Literal["timestamp", "relative-time", "custom-formats", "absolute-time", "no-spaces-time"]
|
||||
|
||||
@type_check_only
|
||||
class _Settings(TypedDict, total=False):
|
||||
class _Settings(TypedDict, total=False): # noqa: Y049
|
||||
DATE_ORDER: str
|
||||
PREFER_LOCALE_DATE_ORDER: bool
|
||||
TIMEZONE: str
|
||||
@@ -23,14 +21,14 @@ class _Settings(TypedDict, total=False):
|
||||
PREFER_DATES_FROM: Literal["current_period", "future", "past"]
|
||||
RELATIVE_BASE: datetime.datetime
|
||||
STRICT_PARSING: bool
|
||||
REQUIRE_PARTS: list[_Part]
|
||||
REQUIRE_PARTS: list[Literal["day", "month", "year"]]
|
||||
SKIP_TOKENS: list[str]
|
||||
NORMALIZE: bool
|
||||
RETURN_TIME_AS_PERIOD: bool
|
||||
RETURN_TIME_SPAN: bool
|
||||
DEFAULT_START_OF_WEEK: Literal["monday", "sunday"]
|
||||
DEFAULT_DAYS_IN_MONTH: int
|
||||
PARSERS: list[_ParserKind]
|
||||
PARSERS: list[Literal["timestamp", "relative-time", "custom-formats", "absolute-time", "no-spaces-time"]]
|
||||
DEFAULT_LANGUAGES: list[str]
|
||||
LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD: float
|
||||
CACHE_SIZE_LIMIT: int
|
||||
@@ -41,6 +39,6 @@ def parse(
|
||||
languages: list[str] | tuple[str, ...] | set[str] | None = None,
|
||||
locales: list[str] | tuple[str, ...] | set[str] | None = None,
|
||||
region: str | None = None,
|
||||
settings: _Settings | None = None,
|
||||
settings: Settings | dict[str, Any] | None = None,
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> datetime.datetime | None: ...
|
||||
|
||||
@@ -1,24 +1,47 @@
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from datetime import datetime
|
||||
from typing import ClassVar, Protocol, type_check_only
|
||||
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.date import DateData
|
||||
from dateparser.parser import _parser
|
||||
|
||||
# Examples: `hijri_parser.hijri` class or `convertdate.persian` module
|
||||
@type_check_only
|
||||
class _CalendarConverter(Protocol):
|
||||
@classmethod
|
||||
def to_gregorian(cls, year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def from_gregorian(
|
||||
cls, year: int | None = None, month: int | None = None, day: int | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def month_length(cls, year: int, month: int) -> int: ...
|
||||
|
||||
# Examples: `hijri_parser.HijriDate` or `jalali_parser.PersianDate`
|
||||
@type_check_only
|
||||
class _NonGregorianDate(Protocol):
|
||||
year: int
|
||||
month: int
|
||||
day: int
|
||||
def __init__(self, year: int, month: int, day: int) -> None: ...
|
||||
def weekday(self) -> int | None: ...
|
||||
|
||||
class CalendarBase:
|
||||
parser: Incomplete
|
||||
source: Incomplete
|
||||
def __init__(self, source) -> None: ...
|
||||
def get_date(self): ...
|
||||
parser: type[_parser]
|
||||
source: str
|
||||
def __init__(self, source: str) -> None: ...
|
||||
def get_date(self) -> DateData | None: ...
|
||||
|
||||
class non_gregorian_parser(_parser):
|
||||
calendar_converter: Incomplete
|
||||
default_year: Incomplete
|
||||
default_month: Incomplete
|
||||
default_day: Incomplete
|
||||
non_gregorian_date_cls: Incomplete
|
||||
calendar_converter: ClassVar[type[_CalendarConverter]]
|
||||
default_year: ClassVar[int]
|
||||
default_month: ClassVar[int]
|
||||
default_day: ClassVar[int]
|
||||
non_gregorian_date_cls: ClassVar[type[_NonGregorianDate]]
|
||||
@classmethod
|
||||
def to_latin(cls, source): ...
|
||||
def to_latin(cls, source: str) -> str: ...
|
||||
@abstractmethod
|
||||
def handle_two_digit_year(self, year: int) -> int: ...
|
||||
@classmethod
|
||||
def parse(cls, datestring: str, settings: Settings) -> tuple[Incomplete, Incomplete]: ... # type: ignore[override]
|
||||
def parse(cls, datestring: str, settings: Settings) -> tuple[datetime, str | None]: ... # type: ignore[override]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import SupportsIndex
|
||||
from typing import ClassVar
|
||||
|
||||
from dateparser.calendars import non_gregorian_parser
|
||||
|
||||
@@ -8,22 +7,22 @@ class hijri:
|
||||
def to_gregorian(cls, year: int | None = None, month: int | None = None, day: int | None = None) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def from_gregorian(
|
||||
cls, year: SupportsIndex | None = None, month: SupportsIndex | None = None, day: SupportsIndex | None = None
|
||||
cls, year: int | None = None, month: int | None = None, day: int | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
@classmethod
|
||||
def month_length(cls, year: int, month: int) -> int: ...
|
||||
def month_length(cls, year: int | None, month: int | None) -> int: ...
|
||||
|
||||
class HijriDate:
|
||||
year: Incomplete
|
||||
month: Incomplete
|
||||
day: Incomplete
|
||||
def __init__(self, year, month, day) -> None: ...
|
||||
def weekday(self): ...
|
||||
year: int
|
||||
month: int
|
||||
day: int
|
||||
def __init__(self, year: int, month: int, day: int) -> None: ...
|
||||
def weekday(self) -> int | None: ...
|
||||
|
||||
class hijri_parser(non_gregorian_parser):
|
||||
calendar_converter: type[hijri]
|
||||
default_year: int
|
||||
default_month: int
|
||||
default_day: int
|
||||
non_gregorian_date_cls: type[HijriDate]
|
||||
calendar_converter: ClassVar[type[hijri]]
|
||||
default_year: ClassVar[int]
|
||||
default_month: ClassVar[int]
|
||||
default_day: ClassVar[int]
|
||||
non_gregorian_date_cls: ClassVar[type[HijriDate]]
|
||||
def handle_two_digit_year(self, year: int) -> int: ...
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
|
||||
from dateparser.calendars import non_gregorian_parser
|
||||
|
||||
class PersianDate:
|
||||
year: Incomplete
|
||||
month: Incomplete
|
||||
day: Incomplete
|
||||
def __init__(self, year, month, day) -> None: ...
|
||||
def weekday(self): ...
|
||||
year: int
|
||||
month: int
|
||||
day: int
|
||||
def __init__(self, year: int, month: int, day: int) -> None: ...
|
||||
def weekday(self) -> int | None: ...
|
||||
|
||||
class jalali_parser(non_gregorian_parser):
|
||||
calendar_converter: Incomplete
|
||||
default_year: int
|
||||
default_month: int
|
||||
default_day: int
|
||||
non_gregorian_date_cls: type[PersianDate]
|
||||
# `calendar_converter` is `convertdate.persian` module
|
||||
default_year: ClassVar[int]
|
||||
default_month: ClassVar[int]
|
||||
default_day: ClassVar[int]
|
||||
non_gregorian_date_cls: ClassVar[type[PersianDate]]
|
||||
def handle_two_digit_year(self, year: int) -> int: ...
|
||||
|
||||
@@ -1,8 +1,37 @@
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
import datetime
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Literal, TypeVar
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
_R = TypeVar("_R")
|
||||
|
||||
class Settings:
|
||||
def __new__(cls, *args, **kw) -> Self: ...
|
||||
# Next attributes are optional and may be missing.
|
||||
# Please keep in sync with _Settings TypedDict
|
||||
DATE_ORDER: str
|
||||
PREFER_LOCALE_DATE_ORDER: bool
|
||||
TIMEZONE: str
|
||||
TO_TIMEZONE: str
|
||||
RETURN_AS_TIMEZONE_AWARE: bool
|
||||
PREFER_MONTH_OF_YEAR: Literal["current", "first", "last"]
|
||||
PREFER_DAY_OF_MONTH: Literal["current", "first", "last"]
|
||||
PREFER_DATES_FROM: Literal["current_period", "future", "past"]
|
||||
RELATIVE_BASE: datetime.datetime
|
||||
STRICT_PARSING: bool
|
||||
REQUIRE_PARTS: list[Literal["day", "month", "year"]]
|
||||
SKIP_TOKENS: list[str]
|
||||
NORMALIZE: bool
|
||||
RETURN_TIME_AS_PERIOD: bool
|
||||
RETURN_TIME_SPAN: bool
|
||||
DEFAULT_START_OF_WEEK: Literal["monday", "sunday"]
|
||||
DEFAULT_DAYS_IN_MONTH: int
|
||||
PARSERS: list[Literal["timestamp", "relative-time", "custom-formats", "absolute-time", "no-spaces-time"]]
|
||||
DEFAULT_LANGUAGES: list[str]
|
||||
LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD: float
|
||||
CACHE_SIZE_LIMIT: int
|
||||
|
||||
def __new__(cls, *args, **kwargs) -> Self: ...
|
||||
def __init__(self, settings: dict[str, Any] | None = None) -> None: ...
|
||||
@classmethod
|
||||
def get_key(cls, settings: dict[str, Any] | None = None) -> str: ...
|
||||
@@ -10,7 +39,7 @@ class Settings:
|
||||
|
||||
settings: Settings
|
||||
|
||||
def apply_settings(f): ...
|
||||
def apply_settings(f: Callable[_P, _R]) -> Callable[_P, _R]: ...
|
||||
|
||||
class SettingValidationError(ValueError): ...
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from typing import Final
|
||||
|
||||
language_order: Final[list[str]]
|
||||
language_locale_dict: Final[dict[str, str]]
|
||||
language_map: Final[dict[str, list[str]]]
|
||||
language_locale_dict: Final[dict[str, list[str]]]
|
||||
|
||||
@@ -1,48 +1,79 @@
|
||||
import collections
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from datetime import datetime, tzinfo
|
||||
from re import Pattern
|
||||
from typing import ClassVar, Final, Literal, overload
|
||||
import re
|
||||
from _typeshed import Incomplete
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Callable, Iterable, Iterator, Set as AbstractSet
|
||||
from datetime import date, datetime, tzinfo
|
||||
from typing import Any, ClassVar, Final, Literal, NamedTuple, TypeVar, overload, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from dateparser import _Settings
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.languages.loader import LocaleDataLoader
|
||||
from dateparser.languages.locale import Locale
|
||||
|
||||
_DateT = TypeVar("_DateT", bound=date)
|
||||
|
||||
_DetectLanguagesFunction: TypeAlias = Callable[[str, float], list[str]]
|
||||
_Period: TypeAlias = Literal["time", "day", "week", "month", "year"]
|
||||
# Work around attribute and type having the same name.
|
||||
_Weekday: TypeAlias = Incomplete # Actually it's dateutil._common.weekday class
|
||||
|
||||
@type_check_only
|
||||
class _DateData(NamedTuple):
|
||||
date_obj: datetime | None
|
||||
locale: str | None
|
||||
period: _Period | None
|
||||
|
||||
APOSTROPHE_LOOK_ALIKE_CHARS: Final[list[str]]
|
||||
RE_NBSP: Final[Pattern[str]]
|
||||
RE_SPACES: Final[Pattern[str]]
|
||||
RE_TRIM_SPACES: Final[Pattern[str]]
|
||||
RE_TRIM_COLONS: Final[Pattern[str]]
|
||||
RE_SANITIZE_SKIP: Final[Pattern[str]]
|
||||
RE_SANITIZE_RUSSIAN: Final[Pattern[str]]
|
||||
RE_SANITIZE_PERIOD: Final[Pattern[str]]
|
||||
RE_SANITIZE_ON: Final[Pattern[str]]
|
||||
RE_SANITIZE_APOSTROPHE: Final[Pattern[str]]
|
||||
RE_SEARCH_TIMESTAMP: Final[Pattern[str]]
|
||||
RE_SANITIZE_CROATIAN: Final[Pattern[str]]
|
||||
RE_SEARCH_NEGATIVE_TIMESTAMP: Final[Pattern[str]]
|
||||
RE_NBSP: Final[re.Pattern[str]]
|
||||
RE_SPACES: Final[re.Pattern[str]]
|
||||
RE_TRIM_SPACES: Final[re.Pattern[str]]
|
||||
RE_TRIM_COLONS: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_SKIP: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_RUSSIAN: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_PERIOD: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_ON: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_APOSTROPHE: Final[re.Pattern[str]]
|
||||
RE_SEARCH_TIMESTAMP: Final[re.Pattern[str]]
|
||||
RE_SANITIZE_CROATIAN: Final[re.Pattern[str]]
|
||||
RE_SEARCH_NEGATIVE_TIMESTAMP: Final[re.Pattern[str]]
|
||||
|
||||
def sanitize_spaces(date_string: str) -> str: ...
|
||||
def date_range(begin: datetime, end: datetime, **kwargs) -> None: ...
|
||||
def get_intersecting_periods(low: datetime, high: datetime, period: str = "day") -> None: ...
|
||||
def date_range(
|
||||
begin: _DateT,
|
||||
end: _DateT,
|
||||
*,
|
||||
dt1: date | None = None,
|
||||
dt2: date | None = None,
|
||||
years: int = 0,
|
||||
months: int = 0,
|
||||
days: int = 0,
|
||||
leapdays: int = 0,
|
||||
weeks: int = 0,
|
||||
hours: int = 0,
|
||||
minutes: int = 0,
|
||||
seconds: int = 0,
|
||||
microseconds: int = 0,
|
||||
weekday: int | _Weekday | None = None,
|
||||
yearday: int | None = None,
|
||||
nlyearday: int | None = None,
|
||||
microsecond: int | None = None,
|
||||
) -> Iterator[_DateT]: ...
|
||||
def get_intersecting_periods(
|
||||
low: _DateT, high: _DateT, period: Literal["year", "month", "week", "day", "hour", "minute", "second", "microsecond"] = "day"
|
||||
) -> Iterator[_DateT]: ...
|
||||
def sanitize_date(date_string: str) -> str: ...
|
||||
def get_date_from_timestamp(date_string: str, settings: Settings, negative: bool = False) -> datetime | None: ...
|
||||
def get_date_from_timestamp(date_string: str, settings: Settings, negative: bool | None = False) -> datetime | None: ...
|
||||
def parse_with_formats(date_string: str, date_formats: Iterable[str], settings: Settings) -> DateData: ...
|
||||
|
||||
class _DateLocaleParser:
|
||||
locale: Locale
|
||||
date_string: str
|
||||
date_formats: list[str] | tuple[str, ...] | set[str] | None
|
||||
date_formats: list[str] | tuple[str, ...] | AbstractSet[str] | None
|
||||
def __init__(
|
||||
self,
|
||||
locale: Locale,
|
||||
date_string: str,
|
||||
date_formats: list[str] | tuple[str, ...] | set[str] | None,
|
||||
date_formats: list[str] | tuple[str, ...] | AbstractSet[str] | None,
|
||||
settings: Settings | None = None,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
@@ -50,7 +81,7 @@ class _DateLocaleParser:
|
||||
cls,
|
||||
locale: Locale,
|
||||
date_string: str,
|
||||
date_formats: list[str] | tuple[str, ...] | set[str] | None = None,
|
||||
date_formats: list[str] | tuple[str, ...] | AbstractSet[str] | None = None,
|
||||
settings: Settings | None = None,
|
||||
) -> DateData: ...
|
||||
def _parse(self) -> DateData | None: ...
|
||||
@@ -88,22 +119,26 @@ class DateDataParser:
|
||||
try_previous_locales: bool
|
||||
use_given_order: bool
|
||||
languages: list[str] | None
|
||||
locales: list[str] | tuple[str, ...] | set[str] | None
|
||||
locales: list[str] | tuple[str, ...] | AbstractSet[str] | None
|
||||
region: str
|
||||
detect_languages_function: _DetectLanguagesFunction | None
|
||||
previous_locales: collections.OrderedDict[Locale, None]
|
||||
previous_locales: OrderedDict[Locale, None]
|
||||
def __init__(
|
||||
self,
|
||||
languages: list[str] | tuple[str, ...] | set[str] | None = None,
|
||||
locales: list[str] | tuple[str, ...] | set[str] | None = None,
|
||||
languages: list[str] | tuple[str, ...] | AbstractSet[str] | None = None,
|
||||
locales: list[str] | tuple[str, ...] | AbstractSet[str] | None = None,
|
||||
region: str | None = None,
|
||||
try_previous_locales: bool = False,
|
||||
use_given_order: bool = False,
|
||||
settings: _Settings | None = None,
|
||||
settings: Settings | dict[str, Any] | None = None,
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> None: ...
|
||||
def get_date_data(self, date_string: str, date_formats: list[str] | tuple[str, ...] | set[str] | None = None) -> DateData: ...
|
||||
def get_date_tuple(self, date_string: str, date_formats: list[str] | tuple[str, ...] | set[str] | None = ...): ...
|
||||
def get_date_data(
|
||||
self, date_string: str, date_formats: list[str] | tuple[str, ...] | AbstractSet[str] | None = None
|
||||
) -> DateData: ...
|
||||
def get_date_tuple(
|
||||
self, date_string: str, date_formats: list[str] | tuple[str, ...] | AbstractSet[str] | None = None
|
||||
) -> _DateData: ...
|
||||
def _get_applicable_locales(self, date_string: str) -> Iterator[Locale]: ...
|
||||
def _is_applicable_locale(self, locale: Locale, date_string: str) -> bool: ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import re
|
||||
from _typeshed import Incomplete
|
||||
from datetime import datetime
|
||||
from typing import Final
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.date import DateData
|
||||
|
||||
PATTERN: Final[re.Pattern[str]]
|
||||
|
||||
class FreshnessDateDataParser:
|
||||
def get_local_tz(self) -> ZoneInfo: ...
|
||||
def parse(self, date_string: str, settings) -> tuple[Incomplete | None, str | None]: ...
|
||||
def parse(self, date_string: str, settings: Settings) -> tuple[datetime | None, str | None]: ...
|
||||
def get_kwargs(
|
||||
self, date_string: str
|
||||
) -> tuple[dict[str, float], dict[str, Incomplete]] | dict[None, None]: ... # return empty dict if pattern not found
|
||||
def get_date_data(self, date_string: str, settings=None) -> DateData: ...
|
||||
def get_date_data(self, date_string: str, settings: Settings | None = None) -> DateData: ...
|
||||
|
||||
freshness_date_parser: FreshnessDateDataParser
|
||||
|
||||
@@ -3,6 +3,8 @@ from _typeshed import Incomplete
|
||||
from itertools import chain
|
||||
from typing import Final, overload
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
PARSER_HARDCODED_TOKENS: Final[list[str]]
|
||||
PARSER_KNOWN_TOKENS: Final[list[str]]
|
||||
ALWAYS_KEEP_TOKENS: Final[list[str]]
|
||||
@@ -14,11 +16,11 @@ KEEP_TOKEN_PATTERN: Final[re.Pattern[str]]
|
||||
class UnknownTokenError(Exception): ...
|
||||
|
||||
class Dictionary:
|
||||
info: Incomplete
|
||||
def __init__(self, locale_info: dict[str, Incomplete], settings=None) -> None: ...
|
||||
def __contains__(self, key): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __iter__(self) -> chain[Incomplete]: ...
|
||||
info: dict[str, Incomplete]
|
||||
def __init__(self, locale_info: dict[str, Incomplete], settings: Settings | None = None) -> None: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
def __getitem__(self, key: str): ...
|
||||
def __iter__(self) -> chain[str]: ...
|
||||
def are_tokens_valid(self, tokens: list[str]) -> bool: ...
|
||||
@overload
|
||||
def split(self, string: None, keep_formatting: bool = False) -> None: ...
|
||||
@@ -26,4 +28,4 @@ class Dictionary:
|
||||
def split(self, string: str, keep_formatting: bool = False) -> list[str]: ...
|
||||
|
||||
class NormalizedDictionary(Dictionary):
|
||||
def __init__(self, locale_info: dict[str, Incomplete], settings=None) -> None: ...
|
||||
def __init__(self, locale_info: dict[str, Incomplete], settings: Settings | None = None) -> None: ...
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Mapping, Sized
|
||||
from re import Pattern
|
||||
from typing import Final
|
||||
from typing import Final, TypeVar
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
_K = TypeVar("_K", bound=Sized)
|
||||
_V = TypeVar("_V")
|
||||
|
||||
NUMERAL_PATTERN: Final[Pattern[str]]
|
||||
|
||||
class Locale:
|
||||
shortname: str
|
||||
def __init__(self, shortname: str, language_info) -> None: ...
|
||||
info: OrderedDict[str, Incomplete]
|
||||
def __init__(self, shortname: str, language_info: Mapping[Incomplete, Incomplete]) -> None: ...
|
||||
def is_applicable(self, date_string: str, strip_timezone: bool = False, settings: Settings | None = None) -> bool: ...
|
||||
def count_applicability(self, text: str, strip_timezone: bool = False, settings: Settings | None = None): ...
|
||||
def count_applicability(self, text: str, strip_timezone: bool = False, settings: Settings | None = None) -> list[int]: ...
|
||||
@staticmethod
|
||||
def clean_dictionary(dictionary, threshold: int = 2): ...
|
||||
def clean_dictionary(dictionary: Mapping[_K, _V], threshold: int = 2) -> Mapping[_K, _V]: ...
|
||||
def translate(self, date_string: str, keep_formatting: bool = False, settings: Settings | None = None) -> str: ...
|
||||
def translate_search(self, search_string, settings: Settings | None = None): ...
|
||||
def get_wordchars_for_detection(self, settings): ...
|
||||
def to_parserinfo(self, base_cls=...): ...
|
||||
def translate_search(self, search_string: str, settings: Settings | None = None) -> tuple[list[str], list[str]]: ...
|
||||
def get_wordchars_for_detection(self, settings: Settings) -> set[str]: ...
|
||||
def to_parserinfo(self, base_cls: type = ...): ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from logging import Logger
|
||||
from typing import ClassVar
|
||||
|
||||
class LanguageValidator:
|
||||
VALID_KEYS: ClassVar[list[str]]
|
||||
logger: Logger | None
|
||||
VALID_KEYS: list[str]
|
||||
@classmethod
|
||||
def get_logger(cls) -> Logger: ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import collections
|
||||
import datetime
|
||||
import re
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Generator
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from io import StringIO
|
||||
from typing import Any, Final, Literal, overload
|
||||
from typing import Final, Literal, overload
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
@@ -35,30 +35,32 @@ time_parser: _time_parser
|
||||
class _no_spaces_parser:
|
||||
period: dict[str, list[str]]
|
||||
date_formats: dict[str, list[str]]
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def parse(cls, datestring: str, settings: Settings) -> tuple[datetime.datetime, str]: ...
|
||||
|
||||
class _parser:
|
||||
alpha_directives: collections.OrderedDict[str, list[str]]
|
||||
alpha_directives: OrderedDict[str, list[str]]
|
||||
num_directives: dict[str, list[str]]
|
||||
settings: Settings
|
||||
tokens: list[tuple[Incomplete, Incomplete]]
|
||||
filtered_tokens: list[tuple[Incomplete, Incomplete, int]]
|
||||
unset_tokens: list[Incomplete]
|
||||
unset_tokens: list[tuple[Incomplete, Incomplete, Incomplete]]
|
||||
day: int | None
|
||||
month: int | None
|
||||
year: int | None
|
||||
time: Callable[[], datetime.time] | None
|
||||
auto_order: list[str]
|
||||
ordered_num_directives: collections.OrderedDict[str, list[str]]
|
||||
def __init__(self, tokens, settings: Settings): ...
|
||||
ordered_num_directives: OrderedDict[str, list[str]]
|
||||
def __init__(self, tokens: Iterable[Incomplete], settings: Settings) -> None: ...
|
||||
@classmethod
|
||||
def parse(cls, datestring: str, settings: Settings, tz: datetime.tzinfo | None = None) -> tuple[Incomplete, Incomplete]: ...
|
||||
def parse(
|
||||
cls, datestring: str, settings: Settings, tz: datetime.tzinfo | None = None
|
||||
) -> tuple[datetime.datetime, str | None]: ...
|
||||
|
||||
class tokenizer:
|
||||
digits: Literal["0123456789:"]
|
||||
letters: Literal["abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]
|
||||
instream: StringIO
|
||||
def __init__(self, ds: str) -> None: ...
|
||||
def tokenize(self) -> Generator[tuple[str, Literal[0, 1, 2]], Any, None]: ...
|
||||
def tokenize(self) -> Iterator[tuple[str, Literal[0, 1, 2]]]: ...
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from collections.abc import Mapping, Set as AbstractSet
|
||||
from collections.abc import Set as AbstractSet
|
||||
from datetime import datetime
|
||||
from typing import Any, Literal, overload
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
from ..date import _DetectLanguagesFunction
|
||||
|
||||
@overload
|
||||
def search_dates(
|
||||
text: str,
|
||||
languages: list[str] | tuple[str, ...] | AbstractSet[str] | None,
|
||||
settings: Mapping[Any, Any] | None,
|
||||
settings: Settings | dict[str, Any] | None,
|
||||
add_detected_language: Literal[True],
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> list[tuple[str, datetime, str]]: ...
|
||||
@@ -16,7 +18,7 @@ def search_dates(
|
||||
def search_dates(
|
||||
text: str,
|
||||
languages: list[str] | tuple[str, ...] | AbstractSet[str] | None = None,
|
||||
settings: Mapping[Any, Any] | None = None,
|
||||
settings: Settings | dict[str, Any] | None = None,
|
||||
add_detected_language: Literal[False] = False,
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> list[tuple[str, datetime]]: ...
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterator
|
||||
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.languages.locale import Locale
|
||||
|
||||
class BaseLanguageDetector:
|
||||
languages: Incomplete
|
||||
def __init__(self, languages) -> None: ...
|
||||
def iterate_applicable_languages(self, date_string, modify: bool = False, settings=None) -> None: ...
|
||||
languages: list[Locale]
|
||||
def __init__(self, languages: list[Locale]) -> None: ...
|
||||
def iterate_applicable_languages(
|
||||
self, date_string: str, modify: bool = False, settings: Settings | None = None
|
||||
) -> Iterator[Locale]: ...
|
||||
|
||||
class AutoDetectLanguage(BaseLanguageDetector):
|
||||
language_pool: Incomplete
|
||||
allow_redetection: Incomplete
|
||||
def __init__(self, languages, allow_redetection: bool = False) -> None: ...
|
||||
languages: Incomplete
|
||||
def iterate_applicable_languages(self, date_string, modify: bool = False, settings=None) -> None: ...
|
||||
language_pool: list[Locale]
|
||||
allow_redetection: bool
|
||||
def __init__(self, languages: list[Locale], allow_redetection: bool = False) -> None: ...
|
||||
def iterate_applicable_languages(
|
||||
self, date_string: str, modify: bool = False, settings: Settings | None = None
|
||||
) -> Iterator[Locale]: ...
|
||||
|
||||
class ExactLanguages(BaseLanguageDetector):
|
||||
def __init__(self, languages) -> None: ...
|
||||
def iterate_applicable_languages(self, date_string, modify: bool = False, settings=None) -> None: ...
|
||||
def __init__(self, languages: list[Locale]) -> None: ...
|
||||
def iterate_applicable_languages(
|
||||
self, date_string: str, modify: bool = False, settings: Settings | None = None
|
||||
) -> Iterator[Locale]: ...
|
||||
|
||||
@@ -1,39 +1,76 @@
|
||||
import datetime
|
||||
import re
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Collection
|
||||
from typing import Final
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterable, Sequence, Set as AbstractSet
|
||||
from typing import Any, Final, TypedDict, type_check_only
|
||||
|
||||
from ..date import _DetectLanguagesFunction
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.date import DateData, DateDataParser, _DetectLanguagesFunction
|
||||
from dateparser.languages.loader import LocaleDataLoader
|
||||
from dateparser.languages.locale import Locale
|
||||
from dateparser.search.text_detection import FullTextLanguageDetector
|
||||
|
||||
@type_check_only
|
||||
class _SearchDates(TypedDict):
|
||||
Language: str | None
|
||||
Dates: list[tuple[str, datetime.datetime]] | None
|
||||
|
||||
RELATIVE_REG: Final[re.Pattern[str]]
|
||||
|
||||
def date_is_relative(translation): ...
|
||||
def date_is_relative(translation: str) -> bool: ...
|
||||
|
||||
class _ExactLanguageSearch:
|
||||
loader: Incomplete
|
||||
language: Incomplete
|
||||
def __init__(self, loader) -> None: ...
|
||||
def get_current_language(self, shortname) -> None: ...
|
||||
def search(self, shortname, text, settings): ...
|
||||
loader: LocaleDataLoader
|
||||
language: Locale | None
|
||||
def __init__(self, loader: LocaleDataLoader) -> None: ...
|
||||
def get_current_language(self, shortname: str) -> None: ...
|
||||
def search(self, shortname: str, text: str, settings: Settings | None) -> tuple[list[str], list[str]]: ...
|
||||
@staticmethod
|
||||
def set_relative_base(substring, already_parsed): ...
|
||||
def choose_best_split(self, possible_parsed_splits, possible_substrings_splits): ...
|
||||
def split_by(self, item, original, splitter): ...
|
||||
def split_if_not_parsed(self, item, original): ...
|
||||
def parse_item(self, parser, item, translated_item, parsed, need_relative_base): ...
|
||||
def parse_found_objects(self, parser, to_parse, original, translated, settings): ...
|
||||
def search_parse(self, shortname, text, settings) -> list[tuple[Incomplete, Incomplete]]: ...
|
||||
def set_relative_base(
|
||||
substring: str, already_parsed: list[tuple[DateData, bool]]
|
||||
) -> tuple[str, datetime.datetime | None]: ...
|
||||
def choose_best_split(
|
||||
self, possible_parsed_splits: list[Incomplete], possible_substrings_splits: list[Incomplete]
|
||||
) -> tuple[Incomplete, Incomplete]: ...
|
||||
def split_by(self, item: str, original: str, splitter: str) -> list[list[list[str]]]: ...
|
||||
def split_if_not_parsed(self, item: str, original: str) -> list[list[list[str]]]: ...
|
||||
def parse_item(
|
||||
self,
|
||||
parser: DateDataParser,
|
||||
item: str,
|
||||
translated_item: str,
|
||||
parsed: list[tuple[DateData, bool]],
|
||||
need_relative_base: bool | None,
|
||||
) -> tuple[DateData, bool]: ...
|
||||
def parse_found_objects(
|
||||
self,
|
||||
parser: DateDataParser,
|
||||
to_parse: Iterable[str],
|
||||
original: Sequence[str],
|
||||
translated: Sequence[str],
|
||||
settings: Settings,
|
||||
) -> tuple[list[tuple[DateData, bool]], list[str]]: ...
|
||||
def search_parse(self, shortname: str, text: str, settings: Settings) -> list[tuple[str, datetime.datetime]]: ...
|
||||
|
||||
class DateSearchWithDetection:
|
||||
loader: Incomplete
|
||||
available_language_map: Incomplete
|
||||
search: Incomplete
|
||||
loader: LocaleDataLoader
|
||||
available_language_map: OrderedDict[str, Locale]
|
||||
search: _ExactLanguageSearch
|
||||
language_detector: FullTextLanguageDetector
|
||||
def __init__(self) -> None: ...
|
||||
language_detector: Incomplete
|
||||
def detect_language(
|
||||
self, text, languages, settings=None, detect_languages_function: _DetectLanguagesFunction | None = None
|
||||
): ...
|
||||
self,
|
||||
text: str,
|
||||
languages: list[str] | tuple[str, ...] | AbstractSet[str] | None,
|
||||
settings: Settings | dict[str, Any] | None = None,
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> str | None: ...
|
||||
def search_dates(
|
||||
self, text, languages=None, settings=None, detect_languages_function: _DetectLanguagesFunction | None = None
|
||||
): ...
|
||||
def preprocess_text(self, text: str, languages: Collection[str]) -> str: ...
|
||||
self,
|
||||
text: str,
|
||||
languages: list[str] | tuple[str, ...] | AbstractSet[str] | None = None,
|
||||
settings: Settings | dict[str, Any] | None = None,
|
||||
detect_languages_function: _DetectLanguagesFunction | None = None,
|
||||
) -> _SearchDates: ...
|
||||
def preprocess_text(self, text: str, languages: Iterable[str] | None) -> str: ...
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from dateparser.conf import Settings
|
||||
from dateparser.languages.locale import Locale
|
||||
from dateparser.search.detection import BaseLanguageDetector
|
||||
|
||||
class FullTextLanguageDetector(BaseLanguageDetector):
|
||||
languages: Incomplete
|
||||
language_unique_chars: Incomplete
|
||||
language_chars: Incomplete
|
||||
def __init__(self, languages) -> None: ...
|
||||
def get_unique_characters(self, settings) -> None: ...
|
||||
def character_check(self, date_string, settings) -> None: ...
|
||||
language_unique_chars: list[set[str]]
|
||||
language_chars: list[set[str]]
|
||||
def __init__(self, languages: list[Locale]) -> None: ...
|
||||
def get_unique_characters(self, settings: Settings) -> None: ...
|
||||
def character_check(self, date_string: str, settings: Settings) -> None: ...
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
import pathlib
|
||||
import re
|
||||
from collections.abc import Generator
|
||||
from datetime import datetime, timedelta, tzinfo
|
||||
from typing import Final
|
||||
from pathlib import Path
|
||||
from typing import Final, TypeVar
|
||||
|
||||
_DateTimeT = TypeVar("_DateTimeT", bound=datetime)
|
||||
|
||||
class StaticTzInfo(tzinfo):
|
||||
def __init__(self, name: str, offset: timedelta) -> None: ...
|
||||
def tzname(self, dt) -> str: ...
|
||||
def utcoffset(self, dt) -> timedelta: ...
|
||||
def dst(self, dt) -> timedelta: ...
|
||||
def localize(self, dt: datetime, is_dst: bool = False) -> datetime: ...
|
||||
def tzname(self, dt: datetime | None) -> str: ...
|
||||
def utcoffset(self, dt: datetime | None) -> timedelta: ...
|
||||
def dst(self, dt: datetime | None) -> timedelta: ...
|
||||
def localize(self, dt: _DateTimeT, is_dst: bool = False) -> _DateTimeT: ...
|
||||
def __getinitargs__(self) -> tuple[str, timedelta]: ...
|
||||
|
||||
def pop_tz_offset_from_string(date_string: str, as_offset: bool = True) -> tuple[str, StaticTzInfo | str | None]: ...
|
||||
def word_is_tz(word: str) -> bool: ...
|
||||
def convert_to_local_tz(datetime_obj: datetime, datetime_tz_offset: timedelta) -> datetime: ...
|
||||
def convert_to_local_tz(datetime_obj: _DateTimeT, datetime_tz_offset: timedelta) -> _DateTimeT: ...
|
||||
def build_tz_offsets(search_regex_parts: list[str]) -> Generator[tuple[str, dict[str, re.Pattern[str] | timedelta]]]: ...
|
||||
def get_local_tz_offset() -> timedelta: ...
|
||||
|
||||
local_tz_offset: timedelta
|
||||
|
||||
CACHE_PATH: Final[pathlib.Path]
|
||||
CACHE_PATH: Final[Path]
|
||||
current_hash: int | None
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import datetime
|
||||
from _typeshed import MaybeNone
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Mapping
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from dateparser.conf import Settings
|
||||
|
||||
_DateT = TypeVar("_DateT", bound=datetime.date)
|
||||
_DateTimeT = TypeVar("_DateTimeT", bound=datetime.datetime)
|
||||
|
||||
def strip_braces(date_string: str) -> str: ...
|
||||
def normalize_unicode(string: str, form: str = "NFKD") -> str: ...
|
||||
@@ -10,16 +16,16 @@ def combine_dicts(
|
||||
primary_dict: Mapping[Any, Any], supplementary_dict: Mapping[Any, Any]
|
||||
) -> OrderedDict[str, str | list[Any]]: ...
|
||||
def find_date_separator(format: str) -> str | MaybeNone | None: ...
|
||||
def localize_timezone(date_time, tz_string): ...
|
||||
def apply_tzdatabase_timezone(date_time, pytz_string): ...
|
||||
def apply_dateparser_timezone(utc_datetime, offset_or_timezone_abb): ...
|
||||
def apply_timezone(date_time, tz_string): ...
|
||||
def apply_timezone_from_settings(date_obj, settings): ...
|
||||
def get_last_day_of_month(year, month): ...
|
||||
def get_previous_leap_year(year): ...
|
||||
def get_next_leap_year(year): ...
|
||||
def set_correct_day_from_settings(date_obj, settings, current_day=None): ...
|
||||
def set_correct_month_from_settings(date_obj, settings, current_month=None): ...
|
||||
def localize_timezone(date_time: _DateTimeT, tz_string: str) -> _DateTimeT: ...
|
||||
def apply_tzdatabase_timezone(date_time: _DateTimeT, pytz_string: str) -> _DateTimeT: ...
|
||||
def apply_dateparser_timezone(utc_datetime: _DateTimeT, offset_or_timezone_abb) -> _DateTimeT | None: ...
|
||||
def apply_timezone(date_time: _DateTimeT, tz_string: str) -> _DateTimeT: ...
|
||||
def apply_timezone_from_settings(date_obj: _DateTimeT, settings: Settings | None) -> _DateTimeT: ...
|
||||
def get_last_day_of_month(year: int, month: int) -> int: ...
|
||||
def get_previous_leap_year(year: int) -> int: ...
|
||||
def get_next_leap_year(year: int) -> int: ...
|
||||
def set_correct_day_from_settings(date_obj: _DateT, settings: Settings, current_day: int | None = None) -> _DateT: ...
|
||||
def set_correct_month_from_settings(date_obj: _DateT, settings: Settings, current_month: int | None = None) -> _DateT: ...
|
||||
def registry(cls): ...
|
||||
def get_logger() -> Logger: ...
|
||||
def setup_logging() -> None: ...
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import Any, Final
|
||||
from time import struct_time
|
||||
from typing import Final, Protocol, type_check_only
|
||||
|
||||
TIME_MATCHER: Final[re.Pattern[str]]
|
||||
MS_SEARCHER: Final[re.Pattern[str]]
|
||||
|
||||
def patch_strptime() -> Any: ...
|
||||
def strptime(date_string, format) -> datetime: ...
|
||||
@type_check_only
|
||||
class _strptime_time(Protocol):
|
||||
def __call__(self, data_string: str, format: str = "%a %b %d %H:%M:%S %Y") -> struct_time: ...
|
||||
|
||||
def patch_strptime() -> _strptime_time: ...
|
||||
def strptime(date_string: str, format: str) -> datetime: ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from datetime import date, datetime
|
||||
from typing import TypedDict, overload, type_check_only
|
||||
import datetime
|
||||
from typing import TypedDict, TypeVar, type_check_only
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
from dateparser import _Settings
|
||||
from dateparser.conf import Settings
|
||||
|
||||
_DateT = TypeVar("_DateT", bound=datetime.date)
|
||||
|
||||
@type_check_only
|
||||
class _SpanInformation(TypedDict):
|
||||
@@ -13,20 +15,9 @@ class _SpanInformation(TypedDict):
|
||||
end_pos: int
|
||||
number: NotRequired[int]
|
||||
|
||||
@overload
|
||||
def get_week_start(date: datetime, start_of_week: str = "monday") -> datetime: ...
|
||||
@overload
|
||||
def get_week_start(date: date, start_of_week: str = "monday") -> date: ...
|
||||
@overload
|
||||
def get_week_end(date: datetime, start_of_week: str = "monday") -> datetime: ...
|
||||
@overload
|
||||
def get_week_end(date: date, start_of_week: str = "monday") -> date: ...
|
||||
def get_week_start(date: _DateT, start_of_week: str = "monday") -> _DateT: ...
|
||||
def get_week_end(date: _DateT, start_of_week: str = "monday") -> _DateT: ...
|
||||
def detect_time_span(text: str) -> _SpanInformation | None: ...
|
||||
@overload
|
||||
def generate_time_span(
|
||||
span_info: _SpanInformation, base_date: datetime | None = None, settings: _Settings | None = None
|
||||
) -> tuple[datetime, datetime]: ...
|
||||
@overload
|
||||
def generate_time_span(
|
||||
span_info: _SpanInformation, base_date: date = ..., settings: _Settings | None = None
|
||||
) -> tuple[date, date]: ...
|
||||
span_info: _SpanInformation, base_date: _DateT | None = None, settings: Settings | None = None
|
||||
) -> tuple[_DateT, _DateT]: ...
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from typing import Final
|
||||
|
||||
from dateparser import _Settings
|
||||
|
||||
default_parsers: Final[list[str]]
|
||||
settings: Final[dict[str, str | bool | list[str] | float | int]]
|
||||
settings: Final[_Settings]
|
||||
|
||||
@@ -2,7 +2,7 @@ from collections.abc import Callable, Iterable
|
||||
from typing import Any
|
||||
|
||||
from django import forms
|
||||
from django.db.models import Q, QuerySet
|
||||
from django.db.models import QuerySet
|
||||
from django.forms import Field
|
||||
from django_stubs_ext import StrOrPromise
|
||||
|
||||
@@ -131,7 +131,7 @@ class MultipleChoiceFilter(Filter):
|
||||
) -> None: ...
|
||||
def is_noop(self, qs: QuerySet[Any], value: Any) -> bool: ... # Value can be any filter input
|
||||
def filter(self, qs: QuerySet[Any], value: Any) -> QuerySet[Any]: ...
|
||||
def get_filter_predicate(self, v: Any) -> Q: ... # Predicate value can be any filter input type
|
||||
def get_filter_predicate(self, v: Any) -> dict[str, Any]: ... # Predicate value can be any filter input type
|
||||
|
||||
class TypedMultipleChoiceFilter(MultipleChoiceFilter):
|
||||
field_class: type[forms.TypedMultipleChoiceField] # More specific than parent MultipleChoiceField
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "25.0.*"
|
||||
version = "25.1.0"
|
||||
upstream_repository = "https://github.com/benoitc/gunicorn"
|
||||
requires = ["types-gevent"]
|
||||
|
||||
|
||||
@@ -1175,6 +1175,16 @@ class ASGILifespan(Setting):
|
||||
default: ClassVar[str]
|
||||
desc: ClassVar[str]
|
||||
|
||||
class ASGIDisconnectGracePeriod(Setting):
|
||||
name: ClassVar[str]
|
||||
section: ClassVar[str]
|
||||
cli: ClassVar[list[str]]
|
||||
meta: ClassVar[str]
|
||||
validator: ClassVar[_IntValidatorType]
|
||||
type: ClassVar[type[int]]
|
||||
default: ClassVar[int]
|
||||
desc: ClassVar[str]
|
||||
|
||||
class RootPath(Setting):
|
||||
name: ClassVar[str]
|
||||
section: ClassVar[str]
|
||||
@@ -1273,3 +1283,31 @@ class DirtyWorkerExit(Setting):
|
||||
desc: ClassVar[str]
|
||||
|
||||
def dirty_worker_exit(arbiter: Arbiter, worker: Worker) -> None: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
||||
|
||||
class ControlSocket(Setting):
|
||||
name: ClassVar[str]
|
||||
section: ClassVar[str]
|
||||
cli: ClassVar[list[str]]
|
||||
meta: ClassVar[str]
|
||||
validator: ClassVar[_StringValidatorType]
|
||||
default: ClassVar[str]
|
||||
desc: ClassVar[str]
|
||||
|
||||
class ControlSocketMode(Setting):
|
||||
name: ClassVar[str]
|
||||
section: ClassVar[str]
|
||||
cli: ClassVar[list[str]]
|
||||
meta: ClassVar[str]
|
||||
validator: ClassVar[_IntValidatorType]
|
||||
type: ClassVar[Callable[[Any, str], int]]
|
||||
default: ClassVar[int]
|
||||
desc: ClassVar[str]
|
||||
|
||||
class ControlSocketDisable(Setting):
|
||||
name: ClassVar[str]
|
||||
section: ClassVar[str]
|
||||
cli: ClassVar[list[str]]
|
||||
validator: ClassVar[_BoolValidatorType]
|
||||
action: ClassVar[str]
|
||||
default: ClassVar[bool]
|
||||
desc: ClassVar[str]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
from gunicorn.ctl.client import ControlClient as ControlClient
|
||||
from gunicorn.ctl.protocol import ControlProtocol as ControlProtocol
|
||||
from gunicorn.ctl.server import ControlSocketServer as ControlSocketServer
|
||||
|
||||
__all__ = ["ControlSocketServer", "ControlClient", "ControlProtocol"]
|
||||
@@ -0,0 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
def format_workers(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_dirty(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_stats(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_listeners(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_config(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_help(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_all(data: dict[str, Incomplete]) -> str: ...
|
||||
def format_response(command: str, data: dict[str, Incomplete]) -> str: ...
|
||||
def run_command(socket_path: str, command: str, json_output: bool = False) -> int: ...
|
||||
def run_interactive(socket_path: str, json_output: bool = False) -> int: ...
|
||||
def main() -> int: ...
|
||||
@@ -0,0 +1,16 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from typing_extensions import Self
|
||||
|
||||
class ControlClientError(Exception): ...
|
||||
|
||||
class ControlClient:
|
||||
socket_path: str
|
||||
timeout: float
|
||||
def __init__(self, socket_path: str, timeout: float = 30.0) -> None: ...
|
||||
def connect(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def send_command(self, command: str, args: list[str] | None = None) -> dict[Incomplete, Incomplete]: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
|
||||
def parse_command(line: str) -> tuple[str, list[str]]: ...
|
||||
@@ -0,0 +1,23 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from gunicorn.arbiter import Arbiter
|
||||
|
||||
class CommandHandlers:
|
||||
arbiter: Arbiter
|
||||
def __init__(self, arbiter: Arbiter) -> None: ...
|
||||
# TODO: Use TypedDict for next return types
|
||||
def show_workers(self) -> dict[str, Incomplete]: ...
|
||||
def show_dirty(self) -> dict[str, Incomplete]: ...
|
||||
def show_config(self) -> dict[str, Incomplete]: ...
|
||||
def show_stats(self) -> dict[str, Incomplete]: ...
|
||||
def show_listeners(self) -> dict[str, Incomplete]: ...
|
||||
def worker_add(self, count: int = 1) -> dict[str, Incomplete]: ...
|
||||
def worker_remove(self, count: int = 1) -> dict[str, Incomplete]: ...
|
||||
def worker_kill(self, pid: int) -> dict[str, Incomplete]: ...
|
||||
def dirty_add(self, count: int = 1) -> dict[str, Incomplete]: ...
|
||||
def dirty_remove(self, count: int = 1) -> dict[str, Incomplete]: ...
|
||||
def reload(self) -> dict[str, Incomplete]: ...
|
||||
def reopen(self) -> dict[str, Incomplete]: ...
|
||||
def shutdown(self, mode: str = "graceful") -> dict[str, Incomplete]: ...
|
||||
def show_all(self) -> dict[str, Incomplete]: ...
|
||||
def help(self) -> dict[str, Incomplete]: ...
|
||||
@@ -0,0 +1,26 @@
|
||||
from _typeshed import Incomplete
|
||||
from asyncio import StreamReader, StreamWriter
|
||||
from socket import socket
|
||||
from typing import ClassVar
|
||||
|
||||
class ProtocolError(Exception): ...
|
||||
|
||||
class ControlProtocol:
|
||||
MAX_MESSAGE_SIZE: ClassVar[int]
|
||||
@staticmethod
|
||||
def encode_message(data: dict[Incomplete, Incomplete]) -> bytes: ...
|
||||
@staticmethod
|
||||
def decode_message(data: bytes) -> dict[Incomplete, Incomplete]: ...
|
||||
@staticmethod
|
||||
def read_message(sock: socket) -> dict[Incomplete, Incomplete]: ...
|
||||
@staticmethod
|
||||
def write_message(sock: socket, data: dict[Incomplete, Incomplete]) -> None: ...
|
||||
@staticmethod
|
||||
async def read_message_async(reader: StreamReader) -> dict[Incomplete, Incomplete]: ...
|
||||
@staticmethod
|
||||
async def write_message_async(writer: StreamWriter, data: dict[Incomplete, Incomplete]) -> None: ...
|
||||
|
||||
# TODO: Use TypedDict for next return types
|
||||
def make_request(request_id: int, command: str, args: list[str] | None = None) -> dict[str, Incomplete]: ...
|
||||
def make_response(request_id: int, data: dict[Incomplete, Incomplete] | None = None) -> dict[str, Incomplete]: ...
|
||||
def make_error_response(request_id: int, error: str) -> dict[str, Incomplete]: ...
|
||||
@@ -0,0 +1,11 @@
|
||||
from gunicorn.arbiter import Arbiter
|
||||
from gunicorn.ctl.handlers import CommandHandlers
|
||||
|
||||
class ControlSocketServer:
|
||||
arbiter: Arbiter
|
||||
socket_path: str
|
||||
socket_mode: int
|
||||
handlers: CommandHandlers
|
||||
def __init__(self, arbiter: Arbiter, socket_path: str, socket_mode: int = 0o600) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
@@ -1,3 +1,4 @@
|
||||
from . import stash as stash
|
||||
from .app import DirtyApp as DirtyApp
|
||||
from .arbiter import DirtyArbiter as DirtyArbiter
|
||||
from .client import (
|
||||
@@ -17,6 +18,13 @@ from .errors import (
|
||||
DirtyTimeoutError as DirtyTimeoutError,
|
||||
DirtyWorkerError as DirtyWorkerError,
|
||||
)
|
||||
from .stash import (
|
||||
StashClient as StashClient,
|
||||
StashError as StashError,
|
||||
StashKeyNotFoundError as StashKeyNotFoundError,
|
||||
StashTable as StashTable,
|
||||
StashTableNotFoundError as StashTableNotFoundError,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"DirtyError",
|
||||
@@ -32,6 +40,12 @@ __all__ = [
|
||||
"get_dirty_client_async",
|
||||
"close_dirty_client",
|
||||
"close_dirty_client_async",
|
||||
"stash",
|
||||
"StashClient",
|
||||
"StashTable",
|
||||
"StashError",
|
||||
"StashTableNotFoundError",
|
||||
"StashKeyNotFoundError",
|
||||
"DirtyArbiter",
|
||||
"set_dirty_socket_path",
|
||||
]
|
||||
|
||||
@@ -25,17 +25,22 @@ class DirtyArbiter:
|
||||
worker_consumers: dict[int, asyncio.Task[None]]
|
||||
worker_age: int
|
||||
alive: bool
|
||||
num_workers: int
|
||||
app_specs: dict[str, dict[Incomplete, Incomplete]]
|
||||
app_worker_map: dict[str, set[Incomplete]]
|
||||
worker_app_map: dict[int, list[Incomplete]]
|
||||
stash_tables: dict[str, dict[Incomplete, Incomplete]]
|
||||
|
||||
def __init__(self, cfg: Config, log: GLogger, socket_path: str | None = None, pidfile: str | None = None) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def init_signals(self) -> None: ...
|
||||
async def handle_client(self, reader: StreamReader, writer: StreamWriter) -> None: ...
|
||||
async def route_request(self, request: dict[str, Incomplete], client_writer: StreamWriter) -> None: ...
|
||||
async def handle_status_request(self, message: dict[str, Incomplete], client_writer: StreamWriter) -> None: ...
|
||||
async def handle_manage_request(self, message: dict[str, Incomplete], client_writer: StreamWriter) -> None: ...
|
||||
async def handle_stash_request(self, message: dict[str, Incomplete], client_writer: StreamWriter) -> None: ...
|
||||
async def manage_workers(self) -> None: ...
|
||||
def spawn_worker(self) -> int | None: ...
|
||||
def spawn_worker(self, force_all_apps: bool = False) -> int | None: ...
|
||||
def kill_worker(self, pid: int, sig: int) -> None: ...
|
||||
async def murder_workers(self) -> None: ...
|
||||
def reap_workers(self) -> None: ...
|
||||
|
||||
@@ -1,10 +1,45 @@
|
||||
import asyncio
|
||||
import socket
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
from typing import ClassVar, Final
|
||||
|
||||
class DirtyProtocol:
|
||||
HEADER_FORMAT: ClassVar[str]
|
||||
MAGIC: Final = b"GD"
|
||||
VERSION: Final = 0x01
|
||||
MSG_TYPE_REQUEST: Final = 0x01
|
||||
MSG_TYPE_RESPONSE: Final = 0x02
|
||||
MSG_TYPE_ERROR: Final = 0x03
|
||||
MSG_TYPE_CHUNK: Final = 0x04
|
||||
MSG_TYPE_END: Final = 0x05
|
||||
MSG_TYPE_STASH: Final = 0x10
|
||||
MSG_TYPE_STATUS: Final = 0x11
|
||||
MSG_TYPE_MANAGE: Final = 0x12
|
||||
MSG_TYPE_REQUEST_STR: Final = "request"
|
||||
MSG_TYPE_RESPONSE_STR: Final = "response"
|
||||
MSG_TYPE_ERROR_STR: Final = "error"
|
||||
MSG_TYPE_CHUNK_STR: Final = "chunk"
|
||||
MSG_TYPE_END_STR: Final = "end"
|
||||
MSG_TYPE_STASH_STR: Final = "stash"
|
||||
MSG_TYPE_STATUS_STR: Final = "status"
|
||||
MSG_TYPE_MANAGE_STR: Final = "manage"
|
||||
MSG_TYPE_TO_STR: Final[dict[int, str]]
|
||||
MSG_TYPE_FROM_STR: Final[dict[str, int]]
|
||||
STASH_OP_PUT: Final = 1
|
||||
STASH_OP_GET: Final = 2
|
||||
STASH_OP_DELETE: Final = 3
|
||||
STASH_OP_KEYS: Final = 4
|
||||
STASH_OP_CLEAR: Final = 5
|
||||
STASH_OP_INFO: Final = 6
|
||||
STASH_OP_ENSURE: Final = 7
|
||||
STASH_OP_DELETE_TABLE: Final = 8
|
||||
STASH_OP_TABLES: Final = 9
|
||||
STASH_OP_EXISTS: Final = 10
|
||||
MANAGE_OP_ADD: Final = 1
|
||||
MANAGE_OP_REMOVE: Final = 2
|
||||
HEADER_FORMAT: Final = ">2sBBIQ"
|
||||
HEADER_SIZE: Final[int]
|
||||
MAX_MESSAGE_SIZE: Final = 67108864
|
||||
|
||||
class BinaryProtocol:
|
||||
HEADER_SIZE: ClassVar[int]
|
||||
MAX_MESSAGE_SIZE: ClassVar[int]
|
||||
MSG_TYPE_REQUEST: ClassVar[str]
|
||||
@@ -12,29 +47,66 @@ class DirtyProtocol:
|
||||
MSG_TYPE_ERROR: ClassVar[str]
|
||||
MSG_TYPE_CHUNK: ClassVar[str]
|
||||
MSG_TYPE_END: ClassVar[str]
|
||||
MSG_TYPE_STASH: ClassVar[str]
|
||||
MSG_TYPE_STATUS: ClassVar[str]
|
||||
MSG_TYPE_MANAGE: ClassVar[str]
|
||||
|
||||
@staticmethod
|
||||
def encode(message: dict[Incomplete, Incomplete]) -> bytes: ...
|
||||
def encode_header(msg_type: int, request_id: int, payload_length: int) -> bytes: ...
|
||||
@staticmethod
|
||||
def decode(data: bytes) -> dict[Incomplete, Incomplete]: ...
|
||||
def decode_header(data: bytes) -> tuple[int, int, int]: ...
|
||||
@staticmethod
|
||||
async def read_message_async(reader: asyncio.StreamReader) -> dict[Incomplete, Incomplete]: ...
|
||||
def encode_request(
|
||||
request_id: int,
|
||||
app_path: str,
|
||||
action: str,
|
||||
args: tuple[Incomplete, ...] | None = None,
|
||||
kwargs: dict[str, Incomplete] | None = None,
|
||||
) -> bytes: ...
|
||||
@staticmethod
|
||||
async def write_message_async(writer: asyncio.StreamWriter, message: dict[Incomplete, Incomplete]) -> None: ...
|
||||
def encode_response(request_id: int, result) -> bytes: ...
|
||||
@staticmethod
|
||||
def read_message(sock: socket.socket) -> dict[Incomplete, Incomplete]: ...
|
||||
def encode_error(request_id: int, error: BaseException | dict[str, Incomplete]) -> bytes: ...
|
||||
@staticmethod
|
||||
def write_message(sock: socket.socket, message: dict[Incomplete, Incomplete]) -> None: ...
|
||||
def encode_chunk(request_id: int, data) -> bytes: ...
|
||||
@staticmethod
|
||||
def encode_end(request_id: int) -> bytes: ...
|
||||
@staticmethod
|
||||
def encode_status(request_id: int) -> bytes: ...
|
||||
@staticmethod
|
||||
def encode_manage(request_id: int, op: int, count: int = 1) -> bytes: ...
|
||||
@staticmethod
|
||||
def encode_stash(request_id: int, op: int, table: str, key=None, value=None, pattern=None) -> bytes: ...
|
||||
@staticmethod
|
||||
def decode_message(data: bytes) -> tuple[str, int, Incomplete]: ...
|
||||
@staticmethod
|
||||
async def read_message_async(reader: asyncio.StreamReader) -> dict[str, Incomplete]: ...
|
||||
@staticmethod
|
||||
async def write_message_async(writer: asyncio.StreamWriter, message: dict[str, Incomplete]) -> None: ...
|
||||
@staticmethod
|
||||
def _recv_exactly(sock: socket.socket, n: int) -> bytes: ...
|
||||
@staticmethod
|
||||
def read_message(sock: socket.socket) -> dict[str, Incomplete]: ...
|
||||
@staticmethod
|
||||
def write_message(sock: socket.socket, message: dict[str, Incomplete]) -> None: ...
|
||||
@staticmethod
|
||||
def _encode_from_dict(message: dict[str, Incomplete]) -> bytes: ...
|
||||
|
||||
DirtyProtocol = BinaryProtocol
|
||||
|
||||
# TODO: Use TypedDict for results
|
||||
def make_request(
|
||||
request_id: str,
|
||||
request_id: int | str,
|
||||
app_path: str,
|
||||
action: str,
|
||||
args: tuple[Incomplete, ...] | None = None,
|
||||
kwargs: dict[str, Incomplete] | None = None,
|
||||
) -> dict[str, Incomplete]: ...
|
||||
def make_response(request_id: str, result) -> dict[str, Incomplete]: ...
|
||||
def make_error_response(request_id: str, error) -> dict[str, Incomplete]: ...
|
||||
def make_chunk_message(request_id: str, data) -> dict[str, Incomplete]: ...
|
||||
def make_end_message(request_id: str) -> dict[str, Incomplete]: ...
|
||||
def make_response(request_id: int | str, result) -> dict[str, Incomplete]: ...
|
||||
def make_error_response(request_id: int | str, error) -> dict[str, Incomplete]: ...
|
||||
def make_chunk_message(request_id: int | str, data) -> dict[str, Incomplete]: ...
|
||||
def make_end_message(request_id: int | str) -> dict[str, Incomplete]: ...
|
||||
def make_stash_message(
|
||||
request_id: int | str, op: int, table: str, key=None, value=None, pattern=None
|
||||
) -> dict[str, Incomplete]: ...
|
||||
def make_manage_message(request_id: int | str, op: int, count: int = 1) -> dict[str, Incomplete]: ...
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterator
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from .errors import DirtyError
|
||||
|
||||
class StashError(DirtyError): ...
|
||||
|
||||
class StashTableNotFoundError(StashError):
|
||||
table_name: str
|
||||
|
||||
def __init__(self, table_name: str) -> None: ...
|
||||
|
||||
class StashKeyNotFoundError(StashError):
|
||||
table_name: str
|
||||
key: str
|
||||
|
||||
def __init__(self, table_name: str, key: str) -> None: ...
|
||||
|
||||
class StashClient:
|
||||
socket_path: str
|
||||
timeout: float
|
||||
|
||||
def __init__(self, socket_path: str, timeout: float = 30.0) -> None: ...
|
||||
def put(self, table: str, key: str, value) -> None: ...
|
||||
def get(self, table: str, key: str, default=None): ...
|
||||
def delete(self, table: str, key: str) -> bool: ...
|
||||
def keys(self, table: str, pattern: str | None = None) -> list[str]: ...
|
||||
def clear(self, table: str) -> None: ...
|
||||
def info(self, table: str) -> dict[str, Incomplete]: ...
|
||||
def ensure(self, table: str) -> None: ...
|
||||
def exists(self, table: str, key=None) -> bool: ...
|
||||
def delete_table(self, table: str) -> None: ...
|
||||
def tables(self) -> list[str]: ...
|
||||
def table(self, name: str) -> StashTable: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class StashTable:
|
||||
def __init__(self, client: StashClient, name: str) -> None: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
def __getitem__(self, key: str): ...
|
||||
def __setitem__(self, key: str, value) -> None: ...
|
||||
def __delitem__(self, key: str) -> None: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def get(self, key: str, default=None): ...
|
||||
def keys(self, pattern: str | None = None) -> list[str]: ...
|
||||
def clear(self) -> None: ...
|
||||
def items(self) -> Iterator[tuple[Incomplete, Incomplete]]: ...
|
||||
def values(self) -> Iterator[Incomplete]: ...
|
||||
|
||||
def set_stash_socket_path(path: str) -> None: ...
|
||||
def get_stash_socket_path() -> str: ...
|
||||
def put(table: str, key: str, value) -> None: ...
|
||||
def get(table: str, key: str, default=None): ...
|
||||
def delete(table: str, key: str) -> bool: ...
|
||||
def keys(table: str, pattern: str | None = None) -> list[str]: ...
|
||||
def clear(table: str) -> None: ...
|
||||
def info(table: str) -> dict[str, Incomplete]: ...
|
||||
def ensure(table: str) -> None: ...
|
||||
def exists(table: str, key: str | None = None) -> bool: ...
|
||||
def delete_table(table: str) -> None: ...
|
||||
def tables() -> list[str]: ...
|
||||
def table(name: str) -> StashTable: ...
|
||||
@@ -0,0 +1,25 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Final
|
||||
|
||||
TYPE_NONE: Final = 0x00
|
||||
TYPE_BOOL: Final = 0x01
|
||||
TYPE_INT64: Final = 0x05
|
||||
TYPE_FLOAT64: Final = 0x06
|
||||
TYPE_BYTES: Final = 0x10
|
||||
TYPE_STRING: Final = 0x11
|
||||
TYPE_LIST: Final = 0x20
|
||||
TYPE_DICT: Final = 0x21
|
||||
MAX_STRING_SIZE: Final = 67108864
|
||||
MAX_BYTES_SIZE: Final = 67108864
|
||||
MAX_LIST_SIZE: Final = 1048576
|
||||
MAX_DICT_SIZE: Final = 1048576
|
||||
|
||||
class TLVEncoder:
|
||||
@staticmethod
|
||||
def encode(
|
||||
value: bool | float | str | bytes | list[Incomplete] | tuple[Incomplete, ...] | dict[object, Incomplete] | None,
|
||||
) -> bytes: ... # dict key passed to `str()` function
|
||||
@staticmethod
|
||||
def decode(data: bytes, offset: int = 0) -> tuple[Incomplete, int]: ...
|
||||
@staticmethod
|
||||
def decode_full(data: bytes): ...
|
||||
@@ -1,6 +1,7 @@
|
||||
version = "6.3.2"
|
||||
upstream_repository = "https://github.com/collective/icalendar"
|
||||
requires = ["types-python-dateutil", "types-pytz"]
|
||||
obsolete_since = "7.0.0" # Released on 2026-02-11
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["pytz"]
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Error: is not present in stub
|
||||
# =============================
|
||||
# These are only implemented for the purposes of emitting an error
|
||||
# we don't want these to appear mutable in a type checking context
|
||||
sass.SassMap.__delitem__
|
||||
sass.SassMap.__setitem__
|
||||
@@ -1,7 +0,0 @@
|
||||
version = "0.23.*"
|
||||
requires = ["types-setuptools"]
|
||||
upstream_repository = "https://github.com/sass/libsass-python"
|
||||
|
||||
[tool.stubtest]
|
||||
# The runtime package has an undeclared dependency on setuptools
|
||||
stubtest_requirements = ["setuptools"]
|
||||
@@ -1,202 +0,0 @@
|
||||
import enum
|
||||
from _typeshed import ConvertibleToFloat, SupportsKeysAndGetItem
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence, Set as AbstractSet
|
||||
from typing import Any, Generic, Literal, NamedTuple, TypeVar, overload, type_check_only
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_KT = TypeVar("_KT")
|
||||
_VT_co = TypeVar("_VT_co", covariant=True)
|
||||
_P = ParamSpec("_P")
|
||||
_Mode: TypeAlias = Literal["string", "filename", "dirname"]
|
||||
_OutputStyle: TypeAlias = Literal["nested", "expanded", "compact", "compressed"]
|
||||
_CustomFunctions: TypeAlias = Mapping[str, Callable[..., Any]] | Sequence[Callable[..., Any]] | AbstractSet[Callable[..., Any]]
|
||||
_ImportCallbackRet: TypeAlias = (
|
||||
list[tuple[str, str, str]] | list[tuple[str, str]] | list[tuple[str]] | list[tuple[str, ...]] | None
|
||||
)
|
||||
_ImportCallback: TypeAlias = Callable[[str], _ImportCallbackRet] | Callable[[str, str], _ImportCallbackRet]
|
||||
|
||||
__version__: str
|
||||
libsass_version: str
|
||||
OUTPUT_STYLES: dict[str, int]
|
||||
SOURCE_COMMENTS: dict[str, int]
|
||||
MODES: frozenset[_Mode]
|
||||
|
||||
class CompileError(ValueError):
|
||||
def __init__(self, msg: str) -> None: ...
|
||||
|
||||
# _P needs to be positional only and can't contain varargs, but there is no way to express that
|
||||
# the arguments also need
|
||||
class SassFunction(Generic[_P, _T]):
|
||||
@classmethod
|
||||
def from_lambda(cls, name: str, lambda_: Callable[_P, _T]) -> SassFunction[_P, _T]: ...
|
||||
@classmethod
|
||||
def from_named_function(cls, function: Callable[_P, _T]) -> SassFunction[_P, _T]: ...
|
||||
name: str
|
||||
arguments: tuple[str, ...]
|
||||
callable_: Callable[_P, _T]
|
||||
def __init__(self, name: str, arguments: Sequence[str], callable_: Callable[_P, _T]) -> None: ...
|
||||
@property
|
||||
def signature(self) -> str: ...
|
||||
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
|
||||
|
||||
@overload
|
||||
def compile(
|
||||
*,
|
||||
string: str,
|
||||
output_style: _OutputStyle = "nested",
|
||||
source_comments: bool = False,
|
||||
source_map_contents: bool = False,
|
||||
source_map_embed: bool = False,
|
||||
omit_source_map_url: bool = False,
|
||||
source_map_root: str | None = None,
|
||||
include_paths: Sequence[str] = (),
|
||||
precision: int = 5,
|
||||
custom_functions: _CustomFunctions = (),
|
||||
indented: bool = False,
|
||||
importers: Iterable[tuple[int, _ImportCallback]] | None = None,
|
||||
) -> str: ...
|
||||
@overload
|
||||
def compile(
|
||||
*,
|
||||
filename: str,
|
||||
output_style: _OutputStyle = "nested",
|
||||
source_comments: bool = False,
|
||||
source_map_filename: None = None,
|
||||
output_filename_hint: str | None = None,
|
||||
source_map_contents: bool = False,
|
||||
source_map_embed: bool = False,
|
||||
omit_source_map_url: bool = False,
|
||||
source_map_root: str | None = None,
|
||||
include_paths: Sequence[str] = (),
|
||||
precision: int = 5,
|
||||
custom_functions: _CustomFunctions = (),
|
||||
importers: Iterable[tuple[int, _ImportCallback]] | None = None,
|
||||
) -> str: ...
|
||||
@overload
|
||||
def compile(
|
||||
*,
|
||||
filename: str,
|
||||
output_style: _OutputStyle = "nested",
|
||||
source_comments: bool = False,
|
||||
source_map_filename: str,
|
||||
output_filename_hint: str | None = None,
|
||||
source_map_contents: bool = False,
|
||||
source_map_embed: bool = False,
|
||||
omit_source_map_url: bool = False,
|
||||
source_map_root: str | None = None,
|
||||
include_paths: Sequence[str] = (),
|
||||
precision: int = 5,
|
||||
custom_functions: _CustomFunctions = (),
|
||||
importers: Iterable[tuple[int, _ImportCallback]] | None = None,
|
||||
) -> tuple[str, str]: ...
|
||||
@overload
|
||||
def compile(
|
||||
*,
|
||||
dirname: tuple[str, str],
|
||||
output_style: _OutputStyle = "nested",
|
||||
source_comments: bool = False,
|
||||
source_map_contents: bool = False,
|
||||
source_map_embed: bool = False,
|
||||
omit_source_map_url: bool = False,
|
||||
source_map_root: str | None = None,
|
||||
include_paths: Sequence[str] = (),
|
||||
precision: int = 5,
|
||||
custom_functions: _CustomFunctions = (),
|
||||
importers: Iterable[tuple[int, _ImportCallback]] | None = None,
|
||||
) -> None: ...
|
||||
def and_join(strings: Sequence[str]) -> str: ...
|
||||
@type_check_only
|
||||
class _SassNumber(NamedTuple):
|
||||
value: float
|
||||
unit: str
|
||||
|
||||
class SassNumber(_SassNumber):
|
||||
def __new__(cls, value: ConvertibleToFloat, unit: str | bytes) -> Self: ...
|
||||
|
||||
@type_check_only
|
||||
class _SassColor(NamedTuple):
|
||||
r: float
|
||||
g: float
|
||||
b: float
|
||||
a: float
|
||||
|
||||
class SassColor(_SassColor):
|
||||
def __new__(cls, r: ConvertibleToFloat, g: ConvertibleToFloat, b: ConvertibleToFloat, a: ConvertibleToFloat) -> Self: ...
|
||||
|
||||
@type_check_only
|
||||
class _Separator(enum.Enum):
|
||||
SASS_SEPARATOR_COMMA = enum.auto()
|
||||
SASS_SEPARATOR_SPACE = enum.auto()
|
||||
|
||||
SASS_SEPARATOR_COMMA: Literal[_Separator.SASS_SEPARATOR_COMMA]
|
||||
SASS_SEPARATOR_SPACE: Literal[_Separator.SASS_SEPARATOR_SPACE]
|
||||
|
||||
@type_check_only
|
||||
class _SassList(NamedTuple, Generic[_T]):
|
||||
items: tuple[_T, ...]
|
||||
separator: _Separator
|
||||
bracketed: bool
|
||||
|
||||
class SassList(_SassList[_T]):
|
||||
def __new__(cls, items: Iterable[_T], separator: _Separator, bracketed: bool = ...) -> SassList[_T]: ...
|
||||
|
||||
@type_check_only
|
||||
class _SassError(NamedTuple):
|
||||
msg: str
|
||||
|
||||
class SassError(_SassError):
|
||||
def __new__(cls, msg: str | bytes) -> Self: ...
|
||||
|
||||
@type_check_only
|
||||
class _SassWarning(NamedTuple):
|
||||
msg: str
|
||||
|
||||
class SassWarning(_SassWarning):
|
||||
def __new__(cls, msg: str | bytes) -> Self: ...
|
||||
|
||||
class SassMap(Mapping[_KT, _VT_co]):
|
||||
# copied from dict.__init__ in builtins.pyi, since it uses dict() internally
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(self: SassMap[str, _VT_co], **kwargs: _VT_co) -> None: ... # pyright: ignore[reportInvalidTypeVarUse] #11780
|
||||
@overload
|
||||
def __init__(self, map: SupportsKeysAndGetItem[_KT, _VT_co], /) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self: SassMap[str, _VT_co], # pyright: ignore[reportInvalidTypeVarUse] #11780
|
||||
map: SupportsKeysAndGetItem[str, _VT_co],
|
||||
/,
|
||||
**kwargs: _VT_co,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(self, iterable: Iterable[tuple[_KT, _VT_co]], /) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self: SassMap[str, _VT_co], # pyright: ignore[reportInvalidTypeVarUse] #11780
|
||||
iterable: Iterable[tuple[str, _VT_co]],
|
||||
/,
|
||||
**kwargs: _VT_co,
|
||||
) -> None: ...
|
||||
def __getitem__(self, key: _KT) -> _VT_co: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
__all__ = (
|
||||
"MODES",
|
||||
"OUTPUT_STYLES",
|
||||
"SOURCE_COMMENTS",
|
||||
"CompileError",
|
||||
"SassColor",
|
||||
"SassError",
|
||||
"SassFunction",
|
||||
"SassList",
|
||||
"SassMap",
|
||||
"SassNumber",
|
||||
"SassWarning",
|
||||
"and_join",
|
||||
"compile",
|
||||
"libsass_version",
|
||||
)
|
||||
@@ -1,36 +0,0 @@
|
||||
from collections.abc import Mapping
|
||||
from re import Pattern
|
||||
from typing import Any
|
||||
|
||||
from sass import _OutputStyle
|
||||
|
||||
SUFFIXES: frozenset[str]
|
||||
SUFFIX_PATTERN: Pattern[str]
|
||||
|
||||
def build_directory(
|
||||
sass_path: str,
|
||||
css_path: str,
|
||||
output_style: _OutputStyle = "nested",
|
||||
_root_sass: None = None, # internal arguments for recursion
|
||||
_root_css: None = None, # internal arguments for recursion
|
||||
strip_extension: bool = False,
|
||||
) -> dict[str, str]: ...
|
||||
|
||||
class Manifest:
|
||||
@classmethod
|
||||
def normalize_manifests(
|
||||
cls, manifests: Mapping[str, Manifest | tuple[Any, ...] | Mapping[str, Any] | str] | None
|
||||
) -> dict[str, Manifest]: ...
|
||||
sass_path: str
|
||||
css_path: str
|
||||
wsgi_path: str
|
||||
strip_extension: bool
|
||||
def __init__(
|
||||
self, sass_path: str, css_path: str | None = None, wsgi_path: str | None = None, strip_extension: bool | None = None
|
||||
) -> None: ...
|
||||
def resolve_filename(self, package_dir: str, filename: str) -> tuple[str, str]: ...
|
||||
def unresolve_filename(self, package_dir: str, filename: str) -> str: ...
|
||||
def build(self, package_dir: str, output_style: _OutputStyle = "nested") -> frozenset[str]: ...
|
||||
def build_one(self, package_dir: str, filename: str, source_map: bool = False) -> str: ...
|
||||
|
||||
__all__ = ("SUFFIXES", "SUFFIX_PATTERN", "Manifest", "build_directory")
|
||||
@@ -1,18 +0,0 @@
|
||||
from typing import ClassVar
|
||||
|
||||
from sassutils.builder import Manifest as Manifest
|
||||
from setuptools import Command, Distribution
|
||||
|
||||
def validate_manifests(dist: Distribution, attr: str, value: object) -> None: ...
|
||||
|
||||
class build_sass(Command):
|
||||
description: str
|
||||
user_options: ClassVar[list[tuple[str, str, str]]]
|
||||
package_dir: dict[str, str] | None
|
||||
output_style: str
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def get_package_dir(self, package: str) -> str: ...
|
||||
|
||||
__all__ = ("build_sass", "validate_manifests")
|
||||
@@ -1,24 +0,0 @@
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any
|
||||
|
||||
from sassutils.builder import Manifest
|
||||
|
||||
class SassMiddleware:
|
||||
app: WSGIApplication
|
||||
manifests: dict[str, Manifest]
|
||||
error_status: str
|
||||
package_dir: Mapping[str, str]
|
||||
paths: list[tuple[str, str, Manifest]]
|
||||
def __init__(
|
||||
self,
|
||||
app: WSGIApplication,
|
||||
manifests: Mapping[str, Manifest | tuple[Any, ...] | Mapping[str, Any] | str] | None,
|
||||
package_dir: Mapping[str, str] = {},
|
||||
error_status: str = "200 OK",
|
||||
) -> None: ...
|
||||
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
|
||||
@staticmethod
|
||||
def quote_css_string(s: str) -> str: ...
|
||||
|
||||
__all__ = ("SassMiddleware",)
|
||||
@@ -2,8 +2,6 @@ version = "3.6.1"
|
||||
upstream_repository = "https://github.com/networkx/networkx"
|
||||
# requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20"]
|
||||
# Uses more recent dataclass kwargs
|
||||
requires_python = ">=3.10"
|
||||
|
||||
[tool.stubtest]
|
||||
# stub_uploader won't allow pandas-stubs in the requires field https://github.com/typeshed-internal/stub_uploader/issues/90
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
# proxy module that uses some import magic incompatible with stubtest
|
||||
passlib.hash
|
||||
|
||||
# django unsupported in stubs
|
||||
passlib.ext.django.models
|
||||
|
||||
# uses @memoized_property at runtime, but @property in the stubs
|
||||
passlib.crypto.digest.HashInfo.supported
|
||||
passlib.crypto.digest.HashInfo.supported_by_fastpbkdf2
|
||||
passlib.crypto.digest.HashInfo.supported_by_hashlib_pbkdf2
|
||||
passlib.pwd.PhraseGenerator.symbol_count
|
||||
passlib.pwd.SequenceGenerator.entropy
|
||||
passlib.pwd.SequenceGenerator.entropy_per_symbol
|
||||
passlib.pwd.SequenceGenerator.symbol_count
|
||||
passlib.pwd.WordGenerator.symbol_count
|
||||
passlib.totp.TotpMatch.cache_seconds
|
||||
passlib.totp.TotpMatch.cache_time
|
||||
passlib.totp.TotpMatch.expected_counter
|
||||
passlib.totp.TotpMatch.expire_time
|
||||
passlib.totp.TotpMatch.skipped
|
||||
passlib.totp.TotpToken.expire_time
|
||||
passlib.totp.TotpToken.start_time
|
||||
|
||||
# "hybrid" method that can be called on an instance or class
|
||||
passlib.totp.TOTP.normalize_token
|
||||
|
||||
# import problem
|
||||
passlib.utils.compat._ordered_dict
|
||||
|
||||
# initialized to None, but set by concrete sub-classes
|
||||
passlib.handlers.pbkdf2.Pbkdf2DigestHandler.default_rounds
|
||||
passlib.utils.handlers.GenericHandler.setting_kwds
|
||||
|
||||
# set to None on class level, but initialized in __init__
|
||||
passlib.utils.handlers.HasManyIdents.ident
|
||||
passlib.utils.handlers.HasRounds.rounds
|
||||
|
||||
# Errors in `__all__` at runtime:
|
||||
# TODO: change after https://github.com/python/mypy/pull/14217 is released
|
||||
passlib.handlers.oracle.__all__
|
||||
passlib.handlers.mysql.__all__
|
||||
|
||||
# Compat tools are ignored:
|
||||
passlib.utils.compat.*
|
||||
|
||||
# Tests are not included:
|
||||
passlib.tests.*
|
||||
|
||||
# This is only available when the crypt module is available. This module
|
||||
# was dropped from the standard library of Python 3.13, but is still available
|
||||
# in some environments.
|
||||
passlib.hosts.__all__
|
||||
(passlib.hosts.host_context)?
|
||||
|
||||
# Fields differs at runtime:
|
||||
passlib.apache._CommonFile.encoding
|
||||
passlib.apache._CommonFile.return_unicode
|
||||
@@ -1,2 +0,0 @@
|
||||
# Only exists if crypt is present
|
||||
passlib.hosts.host_context
|
||||
@@ -1,3 +0,0 @@
|
||||
from passlib.hash import bcrypt
|
||||
|
||||
bcrypt.using(rounds=13).hash("password")
|
||||
@@ -1,6 +0,0 @@
|
||||
version = "1.7.*"
|
||||
upstream_repository = "https://foss.heptapod.net/python-libs/passlib"
|
||||
|
||||
[tool.stubtest]
|
||||
# The runtime package has an undeclared dependency on setuptools
|
||||
stubtest_requirements = ["setuptools"]
|
||||
@@ -1,3 +0,0 @@
|
||||
from typing import Final
|
||||
|
||||
__version__: Final[str]
|
||||
@@ -1,102 +0,0 @@
|
||||
from typing_extensions import Self
|
||||
|
||||
from .context import CryptContext
|
||||
from .hash import htdigest
|
||||
|
||||
class _CommonFile:
|
||||
encoding: str
|
||||
return_unicode: bool
|
||||
autosave: bool
|
||||
@classmethod
|
||||
def from_string(
|
||||
cls,
|
||||
data: str | bytes,
|
||||
*,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode: bool = True,
|
||||
) -> Self: ...
|
||||
@classmethod
|
||||
def from_path(
|
||||
cls,
|
||||
path: str,
|
||||
*,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode: bool = True,
|
||||
) -> Self: ...
|
||||
def __init__(
|
||||
self,
|
||||
path: str | None = None,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode: bool = True,
|
||||
) -> None: ...
|
||||
@property
|
||||
def path(self) -> str: ...
|
||||
@path.setter
|
||||
def path(self, value: str) -> None: ...
|
||||
@property
|
||||
def mtime(self) -> float: ...
|
||||
def load_if_changed(self) -> bool: ...
|
||||
def load(self, path: str | None = None, force: bool = True) -> bool: ...
|
||||
def load_string(self, data: str | bytes) -> None: ...
|
||||
def save(self, path: str | None = None) -> None: ...
|
||||
def to_string(self) -> bytes: ...
|
||||
|
||||
class HtpasswdFile(_CommonFile):
|
||||
context: CryptContext
|
||||
def __init__(
|
||||
self,
|
||||
path: str | None = None,
|
||||
default_scheme: str | None = None,
|
||||
context: CryptContext = ...,
|
||||
*,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode: bool = True,
|
||||
) -> None: ...
|
||||
def users(self) -> list[str | bytes]: ...
|
||||
def set_password(self, user: str, password: str | bytes) -> bool: ...
|
||||
def update(self, user: str, password: str | bytes) -> bool: ...
|
||||
def get_hash(self, user: str) -> bytes | None: ...
|
||||
def set_hash(self, user: str, hash: str | bytes) -> bool: ...
|
||||
def find(self, user: str) -> bytes | None: ...
|
||||
def delete(self, user: str) -> bool: ...
|
||||
def check_password(self, user: str, password: str | bytes) -> bool | None: ...
|
||||
def verify(self, user: str, password: str | bytes) -> bool | None: ...
|
||||
|
||||
class HtdigestFile(_CommonFile):
|
||||
default_realm: str | None
|
||||
def __init__(
|
||||
self,
|
||||
path: str | None = None,
|
||||
default_realm: str | None = None,
|
||||
*,
|
||||
new: bool = False,
|
||||
autoload: bool = True,
|
||||
autosave: bool = False,
|
||||
encoding: str = "utf-8",
|
||||
return_unicode: bool = True,
|
||||
) -> None: ...
|
||||
def realms(self) -> list[str | bytes]: ...
|
||||
def users(self, realm: str | None = None) -> list[str | bytes]: ...
|
||||
def set_password(self, user: str, realm: str | None = None, password: str | bytes = ...) -> bool: ...
|
||||
def update(self, user: str, realm: str | None, password: str | bytes) -> bool: ...
|
||||
def get_hash(self, user: str, realm: str | None = None) -> htdigest | None: ...
|
||||
def set_hash(self, user: str, realm: str | None = None, hash: str | bytes = ...) -> bool: ...
|
||||
def find(self, user: str, realm: str | None) -> htdigest | None: ...
|
||||
def delete(self, user: str, realm: str | None = None) -> bool: ...
|
||||
def delete_realm(self, realm: str | None) -> int: ...
|
||||
def check_password(self, user: str, realm: str | None = None, password: str | bytes = ...) -> bool | None: ...
|
||||
def verify(self, user: str, realm: str | None, password: str | bytes) -> bool | None: ...
|
||||
|
||||
__all__ = ["HtpasswdFile", "HtdigestFile"]
|
||||
@@ -1,35 +0,0 @@
|
||||
from .context import CryptContext
|
||||
|
||||
__all__ = [
|
||||
"custom_app_context",
|
||||
"django_context",
|
||||
"ldap_context",
|
||||
"ldap_nocrypt_context",
|
||||
"mysql_context",
|
||||
"mysql4_context",
|
||||
"mysql3_context",
|
||||
"phpass_context",
|
||||
"phpbb3_context",
|
||||
"postgres_context",
|
||||
]
|
||||
|
||||
master_context: CryptContext
|
||||
custom_app_context: CryptContext
|
||||
django10_context: CryptContext
|
||||
django14_context: CryptContext
|
||||
django16_context: CryptContext
|
||||
django110_context: CryptContext
|
||||
django21_context: CryptContext
|
||||
django_context = django21_context
|
||||
std_ldap_schemes: list[str]
|
||||
ldap_nocrypt_context: CryptContext
|
||||
ldap_context: CryptContext
|
||||
mysql3_context: CryptContext
|
||||
mysql4_context: CryptContext
|
||||
mysql_context = mysql4_context
|
||||
postgres_context: CryptContext
|
||||
phpass_context: CryptContext
|
||||
phpbb3_context: CryptContext
|
||||
roundup10_context: CryptContext
|
||||
roundup15_context: CryptContext
|
||||
roundup_context = roundup15_context
|
||||
@@ -1,87 +0,0 @@
|
||||
from _typeshed import StrOrBytesPath, SupportsItems
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class CryptPolicy:
|
||||
@classmethod
|
||||
def from_path(cls, path, section: str = "passlib", encoding: str = "utf-8"): ...
|
||||
@classmethod
|
||||
def from_string(cls, source, section: str = "passlib", encoding: str = "utf-8"): ...
|
||||
@classmethod
|
||||
def from_source(cls, source, _warn: bool = True): ...
|
||||
@classmethod
|
||||
def from_sources(cls, sources, _warn: bool = True): ...
|
||||
def replace(self, *args, **kwds): ...
|
||||
def __init__(self, *args, **kwds) -> None: ...
|
||||
def has_schemes(self): ...
|
||||
def iter_handlers(self): ...
|
||||
def schemes(self, resolve: bool = False): ...
|
||||
def get_handler(self, name=None, category=None, required: bool = False): ...
|
||||
def get_min_verify_time(self, category=None): ...
|
||||
def get_options(self, name, category=None): ...
|
||||
def handler_is_deprecated(self, name, category=None): ...
|
||||
def iter_config(self, ini: bool = False, resolve: bool = False): ...
|
||||
def to_dict(self, resolve: bool = False): ...
|
||||
def to_file(self, stream, section: str = "passlib") -> None: ...
|
||||
def to_string(self, section: str = "passlib", encoding=None): ...
|
||||
|
||||
class CryptContext:
|
||||
@classmethod
|
||||
def from_string(cls, source: str | bytes, section: str = "passlib", encoding: str = "utf-8") -> Self: ...
|
||||
@classmethod
|
||||
def from_path(cls, path: StrOrBytesPath, section: str = "passlib", encoding: str = "utf-8") -> Self: ...
|
||||
def copy(self, **kwds: Any) -> CryptContext: ...
|
||||
def using(self, **kwds: Any) -> CryptContext: ...
|
||||
def replace(self, **kwds): ...
|
||||
def __init__(self, schemes=None, policy=..., _autoload: bool = True, **kwds) -> None: ...
|
||||
policy: CryptPolicy
|
||||
def load_path(
|
||||
self, path: StrOrBytesPath, update: bool = False, section: str = "passlib", encoding: str = "utf-8"
|
||||
) -> None: ...
|
||||
def load(
|
||||
self,
|
||||
source: str | bytes | SupportsItems[str, Any] | CryptContext,
|
||||
update: bool = False,
|
||||
section: str = "passlib",
|
||||
encoding: str = "utf-8",
|
||||
) -> None: ...
|
||||
def update(self, *args: Any, **kwds: Any) -> None: ...
|
||||
def schemes(self, resolve: bool = False, category=None, unconfigured: bool = False): ...
|
||||
def default_scheme(self, category=None, resolve: bool = False, unconfigured: bool = False): ...
|
||||
def handler(self, scheme=None, category=None, unconfigured: bool = False): ...
|
||||
@property
|
||||
def context_kwds(self): ...
|
||||
def to_dict(self, resolve: bool = False) -> dict[str, Any]: ...
|
||||
def to_string(self, section: str = "passlib") -> str: ...
|
||||
mvt_estimate_max_samples: int
|
||||
mvt_estimate_min_samples: int
|
||||
mvt_estimate_max_time: int
|
||||
mvt_estimate_resolution: float
|
||||
harden_verify: Any
|
||||
min_verify_time: int
|
||||
def reset_min_verify_time(self) -> None: ...
|
||||
def needs_update(
|
||||
self, hash: str | bytes, scheme: str | None = None, category: str | None = None, secret: str | bytes | None = None
|
||||
) -> bool: ...
|
||||
def hash_needs_update(self, hash, scheme=None, category=None): ...
|
||||
def genconfig(self, scheme=None, category=None, **settings): ...
|
||||
def genhash(self, secret, config, scheme=None, category=None, **kwds): ...
|
||||
def identify(self, hash, category=None, resolve: bool = False, required: bool = False, unconfigured: bool = False): ...
|
||||
def hash(self, secret: str | bytes, scheme: str | None = None, category: str | None = None, **kwds: Any) -> str: ...
|
||||
def encrypt(self, *args, **kwds): ...
|
||||
def verify(
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = None, category: str | None = None, **kwds: Any
|
||||
) -> bool: ...
|
||||
def verify_and_update(
|
||||
self, secret: str | bytes, hash: str | bytes | None, scheme: str | None = None, category: str | None = None, **kwds: Any
|
||||
) -> tuple[bool, str | None]: ...
|
||||
def dummy_verify(self, elapsed: int = 0): ...
|
||||
def is_enabled(self, hash: str | bytes) -> bool: ...
|
||||
def disable(self, hash: str | bytes | None = None) -> str: ...
|
||||
def enable(self, hash: str | bytes) -> str: ...
|
||||
|
||||
class LazyCryptContext(CryptContext):
|
||||
def __init__(self, schemes=None, **kwds) -> None: ...
|
||||
def __getattribute__(self, attr: str) -> Any: ...
|
||||
|
||||
__all__ = ["CryptContext", "LazyCryptContext", "CryptPolicy"]
|
||||
@@ -1,5 +0,0 @@
|
||||
from passlib.crypto._blowfish.unrolled import BlowfishEngine as BlowfishEngine
|
||||
|
||||
def raw_bcrypt(password, ident, salt, log_rounds): ...
|
||||
|
||||
__all__ = ["BlowfishEngine", "raw_bcrypt"]
|
||||
@@ -1,11 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
def varlist(name, count): ...
|
||||
def indent_block(block, padding): ...
|
||||
|
||||
BFSTR: Any
|
||||
|
||||
def render_encipher(write, indent: int = 0) -> None: ...
|
||||
def write_encipher_function(write, indent: int = 0) -> None: ...
|
||||
def write_expand_function(write, indent: int = 0) -> None: ...
|
||||
def main() -> None: ...
|
||||
@@ -1,15 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
class BlowfishEngine:
|
||||
P: Any
|
||||
S: Any
|
||||
def __init__(self) -> None: ...
|
||||
@staticmethod
|
||||
def key_to_words(data, size: int = 18): ...
|
||||
def encipher(self, l, r): ...
|
||||
def expand(self, key_words) -> None: ...
|
||||
def eks_salted_expand(self, key_words, salt_words) -> None: ...
|
||||
def eks_repeated_expand(self, key_words, salt_words, rounds) -> None: ...
|
||||
def repeat_encipher(self, l, r, count): ...
|
||||
|
||||
__all__ = ["BlowfishEngine"]
|
||||
@@ -1,7 +0,0 @@
|
||||
from passlib.crypto._blowfish.base import BlowfishEngine as _BlowfishEngine
|
||||
|
||||
class BlowfishEngine(_BlowfishEngine):
|
||||
def encipher(self, l, r): ...
|
||||
def expand(self, key_words) -> None: ...
|
||||
|
||||
__all__ = ["BlowfishEngine"]
|
||||
@@ -1,12 +0,0 @@
|
||||
class md4:
|
||||
name: str
|
||||
digest_size: int
|
||||
digestsize: int
|
||||
block_size: int
|
||||
def __init__(self, content=None) -> None: ...
|
||||
def update(self, content) -> None: ...
|
||||
def copy(self): ...
|
||||
def digest(self): ...
|
||||
def hexdigest(self): ...
|
||||
|
||||
__all__ = ["md4"]
|
||||
@@ -1,5 +0,0 @@
|
||||
__all__ = ["expand_des_key", "des_encrypt_block"]
|
||||
|
||||
def expand_des_key(key): ...
|
||||
def des_encrypt_block(key, input, salt: int = 0, rounds: int = 1): ...
|
||||
def des_encrypt_int_block(key, input, salt: int = 0, rounds: int = 1): ...
|
||||
@@ -1,39 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
from passlib.utils import SequenceMixin
|
||||
|
||||
def lookup_hash(digest, return_unknown: bool = False, required: bool = True): ...
|
||||
def norm_hash_name(name, format: str = "hashlib"): ...
|
||||
|
||||
class HashInfo(SequenceMixin):
|
||||
name: Any
|
||||
iana_name: Any
|
||||
aliases: Any
|
||||
const: Any
|
||||
digest_size: Any
|
||||
block_size: Any
|
||||
error_text: Any
|
||||
unknown: bool
|
||||
def __init__(self, const, names, required: bool = True) -> None: ...
|
||||
@property
|
||||
def supported(self): ...
|
||||
@property
|
||||
def supported_by_fastpbkdf2(self): ...
|
||||
@property
|
||||
def supported_by_hashlib_pbkdf2(self): ...
|
||||
|
||||
def compile_hmac(digest, key, multipart: bool = False): ...
|
||||
def pbkdf1(digest, secret, salt, rounds, keylen=None): ...
|
||||
def pbkdf2_hmac(digest, secret, salt, rounds, keylen=None): ...
|
||||
|
||||
__all__ = [
|
||||
# hash utils
|
||||
"lookup_hash",
|
||||
"HashInfo",
|
||||
"norm_hash_name",
|
||||
# hmac utils
|
||||
"compile_hmac",
|
||||
# kdfs
|
||||
"pbkdf1",
|
||||
"pbkdf2_hmac",
|
||||
]
|
||||
@@ -1,4 +0,0 @@
|
||||
def validate(n, r, p): ...
|
||||
def scrypt(secret, salt, n, r, p: int = 1, keylen: int = 32): ...
|
||||
|
||||
__all__ = ["validate", "scrypt"]
|
||||
@@ -1,21 +0,0 @@
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
class ScryptEngine:
|
||||
n: int
|
||||
r: int
|
||||
p: int
|
||||
smix_bytes: int
|
||||
iv_bytes: int
|
||||
bmix_len: int
|
||||
bmix_half_len: int
|
||||
bmix_struct: Any
|
||||
integerify: Any
|
||||
@classmethod
|
||||
def execute(cls, secret, salt, n, r, p, keylen): ...
|
||||
def __init__(self, n, r, p): ...
|
||||
def run(self, secret, salt, keylen): ...
|
||||
def smix(self, input) -> Generator[None, None, Any]: ...
|
||||
def bmix(self, source, target) -> None: ...
|
||||
|
||||
__all__ = ["ScryptEngine"]
|
||||
@@ -1 +0,0 @@
|
||||
def main() -> None: ...
|
||||
@@ -1 +0,0 @@
|
||||
def salsa20(input): ...
|
||||
@@ -1,55 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
class UnknownBackendError(ValueError):
|
||||
hasher: Any
|
||||
backend: Any
|
||||
def __init__(self, hasher, backend) -> None: ...
|
||||
|
||||
class MissingBackendError(RuntimeError): ...
|
||||
class InternalBackendError(RuntimeError): ...
|
||||
class PasswordValueError(ValueError): ...
|
||||
|
||||
class PasswordSizeError(PasswordValueError):
|
||||
max_size: Any
|
||||
def __init__(self, max_size, msg=None) -> None: ...
|
||||
|
||||
class PasswordTruncateError(PasswordSizeError):
|
||||
def __init__(self, cls, msg=None) -> None: ...
|
||||
|
||||
class PasslibSecurityError(RuntimeError): ...
|
||||
|
||||
class TokenError(ValueError):
|
||||
def __init__(self, msg=None, *args, **kwds) -> None: ...
|
||||
|
||||
class MalformedTokenError(TokenError): ...
|
||||
class InvalidTokenError(TokenError): ...
|
||||
|
||||
class UsedTokenError(TokenError):
|
||||
expire_time: Any
|
||||
def __init__(self, *args, **kwds) -> None: ...
|
||||
|
||||
class UnknownHashError(ValueError):
|
||||
value: Any
|
||||
message: Any
|
||||
def __init__(self, message=None, value=None) -> None: ...
|
||||
|
||||
class PasslibWarning(UserWarning): ...
|
||||
class PasslibConfigWarning(PasslibWarning): ...
|
||||
class PasslibHashWarning(PasslibWarning): ...
|
||||
class PasslibRuntimeWarning(PasslibWarning): ...
|
||||
class PasslibSecurityWarning(PasslibWarning): ...
|
||||
|
||||
def type_name(value): ...
|
||||
def ExpectedTypeError(value, expected, param): ...
|
||||
def ExpectedStringError(value, param): ...
|
||||
def MissingDigestError(handler=None): ...
|
||||
def NullPasswordError(handler=None): ...
|
||||
def InvalidHashError(handler=None): ...
|
||||
def MalformedHashError(handler=None, reason=None): ...
|
||||
def ZeroPaddedRoundsError(handler=None): ...
|
||||
def ChecksumSizeError(handler, raw: bool = False): ...
|
||||
|
||||
ENABLE_DEBUG_ONLY_REPR: bool
|
||||
|
||||
def debug_only_repr(value, param: str = "hash"): ...
|
||||
def CryptBackendError(handler, config, hash, source: str = "crypt.crypt()") -> None: ...
|
||||
@@ -1,3 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
password_context: Any
|
||||
@@ -1,55 +0,0 @@
|
||||
from typing import Any
|
||||
|
||||
__all__ = ["DJANGO_VERSION", "MIN_DJANGO_VERSION", "get_preset_config", "quirks"]
|
||||
|
||||
DJANGO_VERSION: tuple[Any, ...]
|
||||
MIN_DJANGO_VERSION: tuple[int, int]
|
||||
|
||||
class quirks:
|
||||
none_causes_check_password_error: Any
|
||||
empty_is_usable_password: Any
|
||||
invalid_is_usable_password: Any
|
||||
|
||||
def get_preset_config(name): ...
|
||||
|
||||
class DjangoTranslator:
|
||||
context: Any
|
||||
def __init__(self, context=None, **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def passlib_to_django_name(self, passlib_name): ...
|
||||
def passlib_to_django(self, passlib_hasher, cached: bool = True): ...
|
||||
def django_to_passlib_name(self, django_name): ...
|
||||
def django_to_passlib(self, django_name, cached: bool = True): ...
|
||||
def resolve_django_hasher(self, django_name, cached: bool = True): ...
|
||||
|
||||
class DjangoContextAdapter(DjangoTranslator):
|
||||
context: Any
|
||||
is_password_usable: Any
|
||||
enabled: bool
|
||||
patched: bool
|
||||
log: Any
|
||||
def __init__(self, context=None, get_user_category=None, **kwds) -> None: ...
|
||||
def reset_hashers(self) -> None: ...
|
||||
def get_hashers(self): ...
|
||||
def get_hasher(self, algorithm: str = "default"): ...
|
||||
def identify_hasher(self, encoded): ...
|
||||
def make_password(self, password, salt=None, hasher: str = "default"): ...
|
||||
def check_password(self, password, encoded, setter=None, preferred: str = "default"): ...
|
||||
def user_check_password(self, user, password): ...
|
||||
def user_set_password(self, user, password) -> None: ...
|
||||
def get_user_category(self, user): ...
|
||||
HASHERS_PATH: str
|
||||
MODELS_PATH: str
|
||||
USER_CLASS_PATH: Any
|
||||
FORMS_PATH: str
|
||||
patch_locations: Any
|
||||
def install_patch(self): ...
|
||||
def remove_patch(self): ...
|
||||
def load_model(self) -> None: ...
|
||||
|
||||
class ProxyProperty:
|
||||
attr: Any
|
||||
def __init__(self, attr) -> None: ...
|
||||
def __get__(self, obj, cls): ...
|
||||
def __set__(self, obj, value) -> None: ...
|
||||
def __delete__(self, obj) -> None: ...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user