mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
Rename requires to dependencies in METADATA files (#15594)
This commit is contained in:
+3
-3
@@ -163,7 +163,7 @@ supported:
|
||||
When the stubs are updated to a newer version
|
||||
of the library, the version of the stub should be bumped (note that
|
||||
previous versions are still available on PyPI).
|
||||
* `requires` (optional): A list of other stub packages or packages with type
|
||||
* `dependencies` (optional): A list of other stub packages or packages with type
|
||||
information that are imported by the stubs in this package. Only packages
|
||||
generated by typeshed or required by the upstream package are allowed to
|
||||
be listed here, for security reasons. See
|
||||
@@ -202,9 +202,9 @@ This has the following keys:
|
||||
`--ignore_missing_stub` option to the stubtest call. See
|
||||
[tests/README.md](./tests/README.md) for more information. In most cases,
|
||||
this field should be identical to `partial_stub`.
|
||||
* `stubtest_requirements` (default: `[]`): A list of Python packages that need
|
||||
* `stubtest_dependencies` (default: `[]`): A list of Python packages that need
|
||||
to be installed for stubtest to run successfully. These packages are installed
|
||||
in addition to the requirements in the `requires` field.
|
||||
in addition to the dependencies in the `dependencies` field.
|
||||
* `apt_dependencies` (default: `[]`): A list of Ubuntu APT packages
|
||||
that need to be installed for stubtest to run successfully.
|
||||
* `brew_dependencies` (default: `[]`): A list of MacOS Homebrew packages
|
||||
|
||||
+14
-14
@@ -84,7 +84,7 @@ class StubtestSettings:
|
||||
ignore_missing_stub: bool
|
||||
supported_platforms: list[str] | None # None means all platforms
|
||||
ci_platforms: list[str]
|
||||
stubtest_requirements: list[str]
|
||||
stubtest_dependencies: list[str]
|
||||
mypy_plugins: list[str]
|
||||
mypy_plugins_config: dict[str, dict[str, Any]]
|
||||
|
||||
@@ -109,7 +109,7 @@ def read_stubtest_settings(distribution: str) -> StubtestSettings:
|
||||
ignore_missing_stub: object = data.get("ignore_missing_stub", False)
|
||||
supported_platforms: object = data.get("supported_platforms")
|
||||
ci_platforms: object = data.get("ci_platforms", DEFAULT_STUBTEST_PLATFORMS)
|
||||
stubtest_requirements: object = data.get("stubtest_requirements", [])
|
||||
stubtest_dependencies: object = data.get("stubtest_dependencies", [])
|
||||
mypy_plugins: object = data.get("mypy_plugins", [])
|
||||
mypy_plugins_config: object = data.get("mypy_plugins_config", {})
|
||||
|
||||
@@ -123,7 +123,7 @@ def read_stubtest_settings(distribution: str) -> StubtestSettings:
|
||||
assert _is_list_of_strings(brew_dependencies)
|
||||
assert _is_list_of_strings(choco_dependencies)
|
||||
assert _is_list_of_strings(extras)
|
||||
assert _is_list_of_strings(stubtest_requirements)
|
||||
assert _is_list_of_strings(stubtest_dependencies)
|
||||
assert _is_list_of_strings(mypy_plugins)
|
||||
assert _is_nested_dict(mypy_plugins_config)
|
||||
|
||||
@@ -151,7 +151,7 @@ def read_stubtest_settings(distribution: str) -> StubtestSettings:
|
||||
ignore_missing_stub=ignore_missing_stub,
|
||||
supported_platforms=supported_platforms,
|
||||
ci_platforms=ci_platforms,
|
||||
stubtest_requirements=stubtest_requirements,
|
||||
stubtest_dependencies=stubtest_dependencies,
|
||||
mypy_plugins=mypy_plugins,
|
||||
mypy_plugins_config=mypy_plugins_config,
|
||||
)
|
||||
@@ -174,7 +174,7 @@ class StubMetadata:
|
||||
|
||||
distribution: Annotated[str, "The name of the distribution on PyPI"]
|
||||
version_spec: Annotated[Specifier, "Upstream versions that the stubs are compatible with"]
|
||||
requires: Annotated[list[Requirement], "The parsed requirements as listed in METADATA.toml"]
|
||||
dependencies: Annotated[list[Requirement], "The parsed dependencies as listed in METADATA.toml"]
|
||||
extra_description: str | None
|
||||
stub_distribution: Annotated[str, "The name under which the distribution is uploaded to PyPI"]
|
||||
upstream_repository: Annotated[str, "The URL of the upstream repository"] | None
|
||||
@@ -193,7 +193,7 @@ class StubMetadata:
|
||||
_KNOWN_METADATA_FIELDS: Final = frozenset(
|
||||
{
|
||||
"version",
|
||||
"requires",
|
||||
"dependencies",
|
||||
"extra_description",
|
||||
"stub_distribution",
|
||||
"upstream_repository",
|
||||
@@ -216,7 +216,7 @@ _KNOWN_METADATA_TOOL_FIELDS: Final = {
|
||||
"ignore_missing_stub",
|
||||
"supported_platforms",
|
||||
"ci_platforms",
|
||||
"stubtest_requirements",
|
||||
"stubtest_dependencies",
|
||||
"mypy_plugins",
|
||||
"mypy_plugins_config",
|
||||
}
|
||||
@@ -235,7 +235,7 @@ def read_metadata(distribution: str) -> StubMetadata:
|
||||
This function does some basic validation,
|
||||
but does no parsing, transforming or normalization of the metadata.
|
||||
Use `read_dependencies` if you need to parse the dependencies
|
||||
given in the `requires` field, for example.
|
||||
given in the `dependencies` field, for example.
|
||||
"""
|
||||
try:
|
||||
with metadata_path(distribution).open("rb") as f:
|
||||
@@ -255,9 +255,9 @@ def read_metadata(distribution: str) -> StubMetadata:
|
||||
version_spec = Specifier(version)
|
||||
assert version_spec.operator in {"==", "~="}, f"Invalid 'version' field in METADATA.toml for {distribution!r}"
|
||||
|
||||
requires_s: object = data.get("requires", []) # pyright: ignore[reportUnknownMemberType]
|
||||
assert isinstance(requires_s, list)
|
||||
requires = [parse_requires(distribution, req) for req in requires_s]
|
||||
dependencies_s: object = data.get("dependencies", []) # pyright: ignore[reportUnknownMemberType]
|
||||
assert isinstance(dependencies_s, list)
|
||||
dependencies = [parse_dependencies(distribution, dep) for dep in dependencies_s]
|
||||
|
||||
extra_description: object = data.get("extra_description") # pyright: ignore[reportUnknownMemberType]
|
||||
assert isinstance(extra_description, (str, type(None)))
|
||||
@@ -336,7 +336,7 @@ def read_metadata(distribution: str) -> StubMetadata:
|
||||
return StubMetadata(
|
||||
distribution=distribution,
|
||||
version_spec=version_spec,
|
||||
requires=requires,
|
||||
dependencies=dependencies,
|
||||
extra_description=extra_description,
|
||||
stub_distribution=stub_distribution,
|
||||
upstream_repository=upstream_repository,
|
||||
@@ -366,7 +366,7 @@ def update_metadata(distribution: str, **new_values: object) -> tomlkit.TOMLDocu
|
||||
return data
|
||||
|
||||
|
||||
def parse_requires(distribution: str, req: object) -> Requirement:
|
||||
def parse_dependencies(distribution: str, req: object) -> Requirement:
|
||||
assert isinstance(req, str), f"Invalid requirement {req!r} for {distribution!r}"
|
||||
return Requirement(req)
|
||||
|
||||
@@ -398,7 +398,7 @@ def read_dependencies(distribution: str) -> PackageDependencies:
|
||||
pypi_name_to_typeshed_name_mapping = get_pypi_name_to_typeshed_name_mapping()
|
||||
typeshed: list[Requirement] = []
|
||||
external: list[Requirement] = []
|
||||
for dependency in read_metadata(distribution).requires:
|
||||
for dependency in read_metadata(distribution).dependencies:
|
||||
if dependency.name in pypi_name_to_typeshed_name_mapping:
|
||||
req = Requirement(str(dependency)) # copy the requirement
|
||||
req.name = pypi_name_to_typeshed_name_mapping[dependency.name]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.6.9"
|
||||
upstream_repository = "https://github.com/authlib/authlib"
|
||||
requires = ["cryptography"]
|
||||
dependencies = ["cryptography"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "~=1.3.1"
|
||||
upstream_repository = "https://github.com/laurent-laporte-pro/deprecated"
|
||||
requires = []
|
||||
dependencies = []
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "6.0.*"
|
||||
upstream_repository = "https://github.com/corydolphin/flask-cors"
|
||||
# Requires a version of flask with a `py.typed` file
|
||||
requires = ["Flask>=2.0.0"]
|
||||
dependencies = ["Flask>=2.0.0"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "4.1.*"
|
||||
upstream_repository = "https://github.com/miguelgrinberg/Flask-Migrate"
|
||||
# Requires versions of flask and Flask-SQLAlchemy with `py.typed` files
|
||||
requires = ["Flask-SQLAlchemy>=3.0.1", "Flask>=2.0.0"]
|
||||
dependencies = ["Flask-SQLAlchemy>=3.0.1", "Flask>=2.0.0"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "5.6.*"
|
||||
requires = ["Flask>=0.9"]
|
||||
dependencies = ["Flask>=0.9"]
|
||||
upstream_repository = "https://github.com/miguelgrinberg/flask-socketio"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "0.5.*"
|
||||
upstream_repository = "https://github.com/spatialaudio/jackclient-python"
|
||||
# Requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20", "types-cffi"]
|
||||
dependencies = ["numpy>=1.20", "types-cffi"]
|
||||
|
||||
[tool.stubtest]
|
||||
# darwin and win32 are equivalent
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "0.9.*"
|
||||
upstream_repository = "https://github.com/asweigart/pyautogui"
|
||||
requires = ["types-PyScreeze"]
|
||||
dependencies = ["types-PyScreeze"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "1.0.1"
|
||||
upstream_repository = "https://github.com/asweigart/pyscreeze"
|
||||
requires = ["Pillow>=10.3.0"]
|
||||
dependencies = ["Pillow>=10.3.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
# Linux has extra constants, win32 has different definitions
|
||||
@@ -8,4 +8,4 @@ ci_platforms = ["linux", "win32"]
|
||||
# PyScreeze has an odd setup.py file
|
||||
# that doesn't list Pillow as a dependency for py312+ yet:
|
||||
# https://github.com/asweigart/pyscreeze/blob/eeca245a135cf171c163b3691300138518efa64e/setup.py#L38-L46
|
||||
stubtest_requirements = ["Pillow"]
|
||||
stubtest_dependencies = ["Pillow"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
version = "2.19.*"
|
||||
upstream_repository = "https://github.com/pygments/pygments"
|
||||
requires = ["types-docutils"]
|
||||
dependencies = ["types-docutils"]
|
||||
partial_stub = true
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["sphinx"]
|
||||
stubtest_dependencies = ["sphinx"]
|
||||
ignore_missing_stub = true
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "~= 3.2.1"
|
||||
upstream_repository = "https://github.com/pallets-eco/wtforms"
|
||||
requires = ["MarkupSafe"]
|
||||
dependencies = ["MarkupSafe"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "4.10.*"
|
||||
upstream_repository = "https://github.com/auth0/auth0-python"
|
||||
requires = ["cryptography", "types-requests"]
|
||||
dependencies = ["cryptography", "types-requests"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
version = "6.3.*"
|
||||
requires = ["types-html5lib"]
|
||||
dependencies = ["types-html5lib"]
|
||||
upstream_repository = "https://github.com/mozilla/bleach"
|
||||
|
||||
[tool.stubtest]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "2.0.*"
|
||||
upstream_repository = "https://github.com/python-cffi/cffi/"
|
||||
requires = ["types-setuptools"]
|
||||
dependencies = ["types-setuptools"]
|
||||
|
||||
[tool.stubtest]
|
||||
# linux and darwin are mostly equivalent, except for a single `RTLD_DEEPBIND` variable
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
version = "4.3.*"
|
||||
upstream_repository = "https://github.com/django/channels"
|
||||
requires = ["django-stubs>=4.2", "asgiref"]
|
||||
dependencies = ["django-stubs>=4.2", "asgiref"]
|
||||
|
||||
[tool.stubtest]
|
||||
mypy_plugins = ['mypy_django_plugin.main']
|
||||
mypy_plugins_config = {"django-stubs" = {"django_settings_module" = "@tests.django_settings"}}
|
||||
stubtest_requirements = ["daphne"]
|
||||
stubtest_dependencies = ["daphne"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "1.2.*"
|
||||
upstream_repository = "https://github.com/click-contrib/click-default-group"
|
||||
# requires a version of click with a py.typed
|
||||
requires = ["click>=8.0.0"]
|
||||
dependencies = ["click>=8.0.0"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "0.4.*"
|
||||
requires = ["click>=8.0.0"]
|
||||
dependencies = ["click>=8.0.0"]
|
||||
upstream_repository = "https://github.com/click-contrib/click-log"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "2.1"
|
||||
upstream_repository = "https://github.com/clarkperkins/click-shell"
|
||||
requires = ["click>=8.0.0"]
|
||||
dependencies = ["click>=8.0.0"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "0.8.*"
|
||||
requires = ["click>=8.0.0", "Flask>=2.3.2"]
|
||||
dependencies = ["click>=8.0.0", "Flask>=2.3.2"]
|
||||
upstream_repository = "https://github.com/fredrik-corneliusson/click-web"
|
||||
|
||||
@@ -2,4 +2,4 @@ version = "0.7.*"
|
||||
upstream_repository = "https://github.com/tiran/defusedxml"
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["lxml"]
|
||||
stubtest_dependencies = ["lxml"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "25.2.*"
|
||||
upstream_repository = "https://github.com/carltongibson/django-filter/"
|
||||
requires = ["django-stubs"]
|
||||
dependencies = ["django-stubs"]
|
||||
|
||||
[tool.stubtest]
|
||||
mypy_plugins = ["mypy_django_plugin.main"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "4.4.*"
|
||||
upstream_repository = "https://github.com/django-import-export/django-import-export"
|
||||
requires = ["django-stubs"] # Add tablib when typed, and update _Incomplete aliases in stubs
|
||||
dependencies = ["django-stubs"] # Add tablib when typed, and update _Incomplete aliases in stubs
|
||||
|
||||
[tool.stubtest]
|
||||
skip = true # Django requires configured settings at runtime
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "7.1.*"
|
||||
upstream_repository = "https://github.com/docker/docker-py"
|
||||
requires = ["types-paramiko", "types-requests", "urllib3>=2"]
|
||||
dependencies = ["types-paramiko", "types-requests", "urllib3>=2"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.7.*"
|
||||
upstream_repository = "https://github.com/zopefoundation/fanstatic"
|
||||
requires = ["types-setuptools", "types-WebOb"]
|
||||
dependencies = ["types-setuptools", "types-WebOb"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "3.1.*"
|
||||
upstream_repository = "https://github.com/gforcada/flake8-builtins"
|
||||
requires = ["types-flake8"]
|
||||
dependencies = ["types-flake8"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.7.*"
|
||||
upstream_repository = "https://github.com/pycqa/flake8-docstrings"
|
||||
requires = ["types-flake8"]
|
||||
dependencies = ["types-flake8"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "7.3.*"
|
||||
upstream_repository = "https://github.com/pycqa/flake8"
|
||||
requires = ["types-pyflakes"]
|
||||
dependencies = ["types-pyflakes"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "2.8.4"
|
||||
upstream_repository = "https://github.com/py-pdf/fpdf2"
|
||||
requires = ["Pillow>=10.3.0"]
|
||||
dependencies = ["Pillow>=10.3.0"]
|
||||
obsolete_since = "2.8.6" # Released on 2026-02-19
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["cryptography"]
|
||||
stubtest_dependencies = ["cryptography"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "1.1.3"
|
||||
# Requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20", "pandas-stubs", "types-shapely", "pyproj"]
|
||||
dependencies = ["numpy>=1.20", "pandas-stubs", "types-shapely", "pyproj"]
|
||||
upstream_repository = "https://github.com/geopandas/geopandas"
|
||||
|
||||
[tool.stubtest]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
version = "25.9.*"
|
||||
upstream_repository = "https://github.com/gevent/gevent"
|
||||
requires = ["types-greenlet", "types-psutil>=7.2.0"]
|
||||
dependencies = ["types-greenlet", "types-psutil>=7.2.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
# Run stubtest on all platforms, since there is some platform specific stuff
|
||||
# especially in the stdlib module replacement
|
||||
ci_platforms = ["linux", "darwin", "win32"]
|
||||
# for testing the ffi loop implementations on all platforms
|
||||
stubtest_requirements = ["cffi", "dnspython"]
|
||||
stubtest_dependencies = ["cffi", "dnspython"]
|
||||
apt_dependencies = ["libev4", "libev-dev", "libuv1", "libuv1-dev"]
|
||||
brew_dependencies = ["libev", "libuv"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.*"
|
||||
upstream_repository = "https://github.com/grpc/grpc"
|
||||
requires = ["types-grpcio", "types-protobuf"]
|
||||
dependencies = ["types-grpcio", "types-protobuf"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.*"
|
||||
upstream_repository = "https://github.com/grpc/grpc"
|
||||
requires = ["types-grpcio", "types-protobuf"]
|
||||
dependencies = ["types-grpcio", "types-protobuf"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.*"
|
||||
upstream_repository = "https://github.com/grpc/grpc"
|
||||
requires = ["types-grpcio", "types-protobuf"]
|
||||
dependencies = ["types-grpcio", "types-protobuf"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.*"
|
||||
upstream_repository = "https://github.com/grpc/grpc"
|
||||
requires = ["types-grpcio"]
|
||||
dependencies = ["types-grpcio"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
version = "25.3.0"
|
||||
upstream_repository = "https://github.com/benoitc/gunicorn"
|
||||
requires = ["types-gevent"]
|
||||
dependencies = ["types-gevent"]
|
||||
|
||||
[tool.stubtest]
|
||||
supported_platforms = ["linux", "darwin"]
|
||||
ci_platforms = ["linux", "darwin"]
|
||||
stubtest_requirements = ["gevent>=1.4.0", "eventlet>=0.24.1,!=0.36.0", "tornado>=0.2", "setproctitle", "PasteDeploy", "inotify"]
|
||||
stubtest_dependencies = ["gevent>=1.4.0", "eventlet>=0.24.1,!=0.36.0", "tornado>=0.2", "setproctitle", "PasteDeploy", "inotify"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "0.8.*"
|
||||
# Requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.21"]
|
||||
dependencies = ["numpy>=1.21"]
|
||||
upstream_repository = "https://github.com/nmslib/hnswlib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "1.1.*"
|
||||
upstream_repository = "https://github.com/html5lib/html5lib-python"
|
||||
requires = ["types-webencodings"]
|
||||
dependencies = ["types-webencodings"]
|
||||
|
||||
[tool.stubtest]
|
||||
extras = ["all"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "2.4.*"
|
||||
upstream_repository = "https://github.com/hvac/hvac"
|
||||
requires = ["types-requests"]
|
||||
dependencies = ["types-requests"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "6.3.2"
|
||||
upstream_repository = "https://github.com/collective/icalendar"
|
||||
requires = ["types-python-dateutil", "types-pytz"]
|
||||
dependencies = ["types-python-dateutil", "types-pytz"]
|
||||
obsolete_since = "7.0.0" # Released on 2026-02-11
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["pytz"]
|
||||
stubtest_dependencies = ["pytz"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "~=4.26.0"
|
||||
upstream_repository = "https://github.com/python-jsonschema/jsonschema"
|
||||
requires = ["referencing"]
|
||||
dependencies = ["referencing"]
|
||||
|
||||
[tool.stubtest]
|
||||
extras = ["format"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.5.*"
|
||||
upstream_repository = "https://github.com/latchset/jwcrypto"
|
||||
requires = ["cryptography"]
|
||||
dependencies = ["cryptography"]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
version = "2.9.*"
|
||||
upstream_repository = "https://github.com/cannatag/ldap3"
|
||||
requires = ["types-pyasn1"]
|
||||
dependencies = ["types-pyasn1"]
|
||||
|
||||
[tool.stubtest]
|
||||
apt_dependencies = ["libkrb5-dev"]
|
||||
# No need to install on the CI. Leaving here as information for MacOs/Windows contributors.
|
||||
# brew_dependencies = ["krb5"]
|
||||
# choco_dependencies = ["mitkerberos"]
|
||||
stubtest_requirements = ["gssapi"]
|
||||
stubtest_dependencies = ["gssapi"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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"]
|
||||
dependencies = ["numpy>=1.20"]
|
||||
|
||||
[tool.stubtest]
|
||||
# stub_uploader won't allow pandas-stubs in the requires field https://github.com/typeshed-internal/stub_uploader/issues/90
|
||||
stubtest_requirements = ["pandas"]
|
||||
stubtest_dependencies = ["pandas"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "4.0.*"
|
||||
upstream_repository = "https://github.com/paramiko/paramiko"
|
||||
# Requires a version of cryptography where cryptography.hazmat.primitives.ciphers.Cipher is generic
|
||||
requires = ["cryptography>=37.0.0"]
|
||||
dependencies = ["cryptography>=37.0.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
# linux and darwin are equivalent
|
||||
|
||||
@@ -5,6 +5,6 @@ upstream_repository = "https://github.com/coleifer/peewee"
|
||||
partial_stub = true
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["Flask>=2.0.0"]
|
||||
stubtest_dependencies = ["Flask>=2.0.0"]
|
||||
# Using stubtest_allowlist to ignore playhouse modules we don't provide.
|
||||
ignore_missing_stub = false
|
||||
|
||||
@@ -7,4 +7,4 @@ are maintained outside of typeshed.\
|
||||
"""
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["gevent", "tornado", "twisted"]
|
||||
stubtest_dependencies = ["gevent", "tornado", "twisted"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "0.7.*"
|
||||
upstream_repository = "https://github.com/ponyorm/pony"
|
||||
requires = ["types-psycopg2", "types-PyMySQL"]
|
||||
dependencies = ["types-psycopg2", "types-PyMySQL"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "2.0.*"
|
||||
upstream_repository = "https://github.com/ppwwyyxx/cocoapi"
|
||||
requires = ["numpy>=2.0.0rc1"]
|
||||
dependencies = ["numpy>=2.0.0rc1"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "20.0.*"
|
||||
upstream_repository = "https://github.com/kurtbrose/pyjks"
|
||||
requires = ["types-pyasn1"]
|
||||
dependencies = ["types-pyasn1"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version = "0.2.*"
|
||||
upstream_repository = "https://bitbucket.org/dundeemt/pysftp"
|
||||
requires = ["types-paramiko"]
|
||||
dependencies = ["types-paramiko"]
|
||||
|
||||
[tool.stubtest]
|
||||
stubtest_requirements = ["paramiko~=3.0"]
|
||||
stubtest_dependencies = ["paramiko~=3.0"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "3.3.*"
|
||||
upstream_repository = "https://gitlab.com/doctormo/python-crontab"
|
||||
requires = ["types-croniter"]
|
||||
dependencies = ["types-croniter"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "~=1.8.3"
|
||||
upstream_repository = "https://opendev.org/jjb/python-jenkins"
|
||||
requires = ["types-requests"]
|
||||
dependencies = ["types-requests"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "3.5.*"
|
||||
upstream_repository = "https://github.com/mpdavis/python-jose"
|
||||
requires = ["types-pyasn1"] # excluding pyrsa, cryptography until typing is available
|
||||
dependencies = ["types-pyasn1"] # excluding pyrsa, cryptography until typing is available
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.2.*"
|
||||
upstream_repository = "https://github.com/claudep/swiss-qr-bill"
|
||||
requires = ["types-qrcode"]
|
||||
dependencies = ["types-qrcode"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "8.2.*"
|
||||
upstream_repository = "https://github.com/lincolnloop/python-qrcode"
|
||||
# must be a version of Pillow that is py.typed
|
||||
requires = ["Pillow>=10.3.0"]
|
||||
dependencies = ["Pillow>=10.3.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
extras = ["pil"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "2.0.*"
|
||||
upstream_repository = "https://github.com/requests/requests-oauthlib"
|
||||
requires = ["types-oauthlib", "types-requests"]
|
||||
dependencies = ["types-oauthlib", "types-requests"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version = "~=2.33.0"
|
||||
upstream_repository = "https://github.com/psf/requests"
|
||||
# requires a version of urllib3 with a py.typed file
|
||||
requires = ["urllib3>=2"]
|
||||
dependencies = ["urllib3>=2"]
|
||||
extra_description = """\
|
||||
Note: `types-requests` has required `urllib3>=2` since v2.31.0.7. \
|
||||
If you need to install `types-requests` into an environment \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "0.4.*"
|
||||
upstream_repository = "https://github.com/bmcfee/resampy"
|
||||
# Requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20"]
|
||||
dependencies = ["numpy>=1.20"]
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
# When updating, also re-run the script
|
||||
version = "5.*"
|
||||
upstream_repository = "https://github.com/Blizzard/s2client-proto"
|
||||
requires = ["types-protobuf"]
|
||||
dependencies = ["types-protobuf"]
|
||||
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 27.2 on [s2client-proto 5.0.12.91115.0](https://github.com/Blizzard/s2client-proto/tree/c04df4adbe274858a4eb8417175ee32ad02fd609)."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "0.13.2"
|
||||
# Requires a version of numpy and matplotlib with a `py.typed` file
|
||||
requires = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs"]
|
||||
dependencies = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs"]
|
||||
upstream_repository = "https://github.com/mwaskom/seaborn"
|
||||
|
||||
@@ -8,4 +8,4 @@ it is no longer included with `types-setuptools`.
|
||||
[tool.stubtest]
|
||||
# darwin is equivalent to linux for OS-specific methods
|
||||
ci_platforms = ["linux", "win32"]
|
||||
stubtest_requirements = ["tomli"]
|
||||
stubtest_dependencies = ["tomli"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = "2.1.*"
|
||||
# Requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20"]
|
||||
dependencies = ["numpy>=1.20"]
|
||||
upstream_repository = "https://github.com/shapely/shapely"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "1.1.*"
|
||||
upstream_repository = "https://github.com/miguelgrinberg/simple-websocket"
|
||||
requires = ["wsproto"]
|
||||
dependencies = ["wsproto"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "0.7.*"
|
||||
upstream_repository = "https://github.com/samgiles/slumber"
|
||||
requires = ["types-requests"]
|
||||
dependencies = ["types-requests"]
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
version = "~=2.18.0"
|
||||
upstream_repository = "https://github.com/tensorflow/tensorflow"
|
||||
# requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20", "types-protobuf", "types-requests"]
|
||||
dependencies = ["numpy>=1.20", "types-protobuf", "types-requests"]
|
||||
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 27.2 on `tensorflow==2.18.0`."
|
||||
partial_stub = true
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
# TODO: Support/update to keras 3.7
|
||||
stubtest_requirements = ["keras==3.6.*"]
|
||||
stubtest_dependencies = ["keras==3.6.*"]
|
||||
# tensorflow 2.19 doesn't support Python 3.13:
|
||||
# https://github.com/tensorflow/tensorflow/issues/78774
|
||||
skip = true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
version = "4.67.3"
|
||||
upstream_repository = "https://github.com/tqdm/tqdm"
|
||||
requires = ["types-requests"]
|
||||
dependencies = ["types-requests"]
|
||||
|
||||
[tool.stubtest]
|
||||
extras = ["slack", "telegram"]
|
||||
# Add `"tensorflow"` to this list when there's a tensorflow release supporting
|
||||
# Python 3.13: https://github.com/tensorflow/tensorflow/issues/78774.
|
||||
# Also remove tqdm.keras from @tests/stubtest_allowlist.txt.
|
||||
stubtest_requirements = ["dask", "pandas", "rich"]
|
||||
stubtest_dependencies = ["dask", "pandas", "rich"]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "2026.3.17"
|
||||
upstream_repository = "https://github.com/yt-dlp/yt-dlp"
|
||||
requires = ["websockets"]
|
||||
dependencies = ["websockets"]
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ def setup_testcase_dir(package: DistributionTests, tempdir: Path, verbosity: Ver
|
||||
return
|
||||
|
||||
# HACK: we want to run these test cases in an isolated environment --
|
||||
# we want mypy to see all stub packages listed in the "requires" field of METADATA.toml
|
||||
# we want mypy to see all stub packages listed in the "dependencies" field of METADATA.toml
|
||||
# (and all stub packages required by those stub packages, etc. etc.),
|
||||
# but none of the other stubs in typeshed.
|
||||
#
|
||||
|
||||
@@ -83,7 +83,7 @@ def run_stubtest(dist: Path, *, verbose: bool = False, ci_platforms_only: bool =
|
||||
dists_to_install = [dist_req, get_mypy_req()]
|
||||
# Internal requirements are added to MYPYPATH
|
||||
dists_to_install.extend(str(r) for r in requirements.external_pkgs)
|
||||
dists_to_install.extend(stubtest_settings.stubtest_requirements)
|
||||
dists_to_install.extend(stubtest_settings.stubtest_dependencies)
|
||||
|
||||
# Since the "gdb" Python package is available only inside GDB, it is not
|
||||
# possible to install it through pip, so stub tests cannot install it.
|
||||
|
||||
Reference in New Issue
Block a user