Skip to content

Commit

Permalink
Remove numpy pins from several stubs (python#12993)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdanal authored Nov 11, 2024
1 parent ea368c7 commit a870a4e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
4 changes: 1 addition & 3 deletions stubs/JACK-Client/METADATA.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions stubs/networkx/METADATA.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion stubs/networkx/networkx/classes/graph.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 1 addition & 3 deletions stubs/seaborn/METADATA.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions stubs/shapely/METADATA.toml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 1 addition & 3 deletions stubs/tensorflow/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a870a4e

Please sign in to comment.