From a870a4e63a1ec214a8f4f0fae0576fbfaafdbbcf Mon Sep 17 00:00:00 2001 From: Ali Hamdan Date: Mon, 11 Nov 2024 17:47:11 +0100 Subject: [PATCH] Remove numpy pins from several stubs (#12993) --- stubs/JACK-Client/METADATA.toml | 4 +--- stubs/networkx/METADATA.toml | 4 +--- stubs/networkx/networkx/classes/graph.pyi | 2 +- stubs/seaborn/METADATA.toml | 4 +--- stubs/shapely/METADATA.toml | 4 +--- stubs/tensorflow/METADATA.toml | 4 +--- 6 files changed, 6 insertions(+), 16 deletions(-) diff --git a/stubs/JACK-Client/METADATA.toml b/stubs/JACK-Client/METADATA.toml index 1660b2aae..bd070e6d0 100644 --- a/stubs/JACK-Client/METADATA.toml +++ b/stubs/JACK-Client/METADATA.toml @@ -1,9 +1,7 @@ version = "0.5.*" upstream_repository = "https://github.com/spatialaudio/jackclient-python" # Requires a version of numpy with a `py.typed` file -# see https://github.com/python/typeshed/issues/12551 -# on why we need the upper bound for numpy -requires = ["numpy>=1.20,<2.1.0", "types-cffi"] +requires = ["numpy>=1.20", "types-cffi"] [tool.stubtest] # darwin and win32 are equivalent diff --git a/stubs/networkx/METADATA.toml b/stubs/networkx/METADATA.toml index ceb9213e9..13f24dd25 100644 --- a/stubs/networkx/METADATA.toml +++ b/stubs/networkx/METADATA.toml @@ -1,9 +1,7 @@ version = "3.3" upstream_repository = "https://github.com/networkx/networkx" # requires a version of numpy with a `py.typed` file -# see https://github.com/python/typeshed/issues/12551 -# on why we need the upper bound -requires = ["numpy>=1.20,<2.1.0"] +requires = ["numpy>=1.20"] partial_stub = true [tool.stubtest] diff --git a/stubs/networkx/networkx/classes/graph.pyi b/stubs/networkx/networkx/classes/graph.pyi index ea92cb7e3..a1b61109a 100644 --- a/stubs/networkx/networkx/classes/graph.pyi +++ b/stubs/networkx/networkx/classes/graph.pyi @@ -22,7 +22,7 @@ _Data: TypeAlias = ( | dict[_Node, dict[_Node, dict[str, Any]]] | dict[_Node, Iterable[_Node]] | Iterable[_EdgePlus[_Node]] - | numpy.ndarray[_Node, Any] + | numpy.ndarray[Any, Any] # | scipy.sparse.base.spmatrix ) diff --git a/stubs/seaborn/METADATA.toml b/stubs/seaborn/METADATA.toml index bbbc2a5f7..6e08e2f6d 100644 --- a/stubs/seaborn/METADATA.toml +++ b/stubs/seaborn/METADATA.toml @@ -1,14 +1,12 @@ version = "0.13.2" # Requires a version of numpy and matplotlib with a `py.typed` file -# see https://github.com/python/typeshed/issues/12551 -# on why we need the upper bound for numpy # # TODO: Specifying the python-version for matplotlib should not be necessary, # because of the requires_python field. However, this needs changes to # get_typeshed_stub_version.py (see there). requires = [ "matplotlib>=3.8; python_version>='3.9'", - "numpy>=1.20,<2.1.0", + "numpy>=1.20", "pandas-stubs", ] # matplotlib>=3.8 requires Python >=3.9 diff --git a/stubs/shapely/METADATA.toml b/stubs/shapely/METADATA.toml index db229f692..e12eb3f77 100644 --- a/stubs/shapely/METADATA.toml +++ b/stubs/shapely/METADATA.toml @@ -1,6 +1,4 @@ version = "2.0.*" # Requires a version of numpy with a `py.typed` file -# see https://github.com/python/typeshed/issues/12551 -# on why we need the upper bound for numpy -requires = ["numpy>=1.20,<2.1.0"] +requires = ["numpy>=1.20"] upstream_repository = "https://github.com/shapely/shapely" diff --git a/stubs/tensorflow/METADATA.toml b/stubs/tensorflow/METADATA.toml index f01007573..775d11434 100644 --- a/stubs/tensorflow/METADATA.toml +++ b/stubs/tensorflow/METADATA.toml @@ -2,9 +2,7 @@ version = "~=2.18.0" upstream_repository = "https://github.com/tensorflow/tensorflow" # requires a version of numpy with a `py.typed` file -# see https://github.com/python/typeshed/issues/12551 -# on why we need the upper bound for numpy -requires = ["numpy>=1.20,<2.1.0", "types-protobuf", "types-requests"] +requires = ["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