From c8a5a6c92c3b2d8794833b120767e24679e99339 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:38:04 +0000 Subject: [PATCH 1/3] MINOR: [Python] Bump the python-stubs group in /python with 9 updates Updates the requirements on [mypy](https://github.com/python/mypy), [pandas-stubs](https://github.com/pandas-dev/pandas-stubs), [scipy-stubs](https://github.com/scipy/scipy-stubs), [ty](https://github.com/astral-sh/ty), [types-cffi](https://github.com/python/typeshed), [types-psutil](https://github.com/python/typeshed), [types-python-dateutil](https://github.com/python/typeshed), [types-requests](https://github.com/python/typeshed) and [typing-extensions](https://github.com/python/typing_extensions) to permit the latest version. Updates `mypy` from 2.4.0 to 2.4.1 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v2.4.0...v2.4.1) Updates `pandas-stubs` from 3.0.5.260914 to 3.1.0.261029 - [Changelog](https://github.com/pandas-dev/pandas-stubs/blob/main/docs/release_procedure.md) - [Commits](https://github.com/pandas-dev/pandas-stubs/compare/v3.0.5.260914...v3.1.0.261029) Updates `scipy-stubs` from 1.17.1.5 to 1.18.1.1 - [Release notes](https://github.com/scipy/scipy-stubs/releases) - [Commits](https://github.com/scipy/scipy-stubs/compare/v1.17.1.5...v1.18.1.1) Updates `ty` from 0.0.99 to 0.0.107 - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.99...0.0.107) Updates `types-cffi` from 2.1.0.20260827 to 2.1.0.20261122 - [Commits](https://github.com/python/typeshed/commits) Updates `types-psutil` from 7.2.2.20260906 to 7.2.2.20261122 - [Commits](https://github.com/python/typeshed/commits) Updates `types-python-dateutil` from 2.9.0.20261021 to 2.9.0.20261122 - [Commits](https://github.com/python/typeshed/commits) Updates `types-requests` from 2.33.0.20261006 to 2.33.0.20261030 - [Commits](https://github.com/python/typeshed/commits) Updates `typing-extensions` to 4.16.0 - [Release notes](https://github.com/python/typing_extensions/releases) - [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md) - [Commits](https://github.com/python/typing_extensions/compare/4.12.0...4.16.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: pandas-stubs dependency-version: 3.1.0.261029 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-stubs - dependency-name: scipy-stubs dependency-version: 1.18.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-stubs - dependency-name: ty dependency-version: 0.0.107 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: types-cffi dependency-version: 2.1.0.20261122 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: types-psutil dependency-version: 7.2.2.20261122 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: types-python-dateutil dependency-version: 2.9.0.20261122 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: types-requests dependency-version: 2.33.0.20261030 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-stubs - dependency-name: typing-extensions dependency-version: 4.16.0 dependency-type: direct:production dependency-group: python-stubs ... Signed-off-by: dependabot[bot] --- python/requirements-stubs.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python/requirements-stubs.txt b/python/requirements-stubs.txt index f8fb91f9850..736bcb24380 100644 --- a/python/requirements-stubs.txt +++ b/python/requirements-stubs.txt @@ -7,16 +7,16 @@ fsspec==2026.9.0 # NumPy's annotations change between releases, which changes the results of # the type checkers. numpy==2.4.6 -mypy==2.4.0 -pandas-stubs==3.0.5.260914 +mypy==2.4.1 +pandas-stubs==3.1.0.261029 pyright==1.1.414 # The scipy extra installs the matching scipy, which the type stub tests import. -scipy-stubs[scipy]==1.17.1.5 -ty==0.0.99 -types-cffi==2.1.0.20260827 -types-psutil==7.2.2.20260906 -types-python-dateutil==2.9.0.20261021 -types-requests==2.33.0.20261006 +scipy-stubs[scipy]==1.18.1.1 +ty==0.0.107 +types-cffi==2.1.0.20261122 +types-psutil==7.2.2.20261122 +types-python-dateutil==2.9.0.20261122 +types-requests==2.33.0.20261030 # Annotated dependencies of the type stub tests, usually installed already. pytest -typing_extensions>=4.12.0 +typing_extensions>=4.16.0 From e29dc9fcad0383afdb99ce3c8c2711ea6aa31a47 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Fri, 27 Nov 2026 10:17:36 +0100 Subject: [PATCH 2/3] Fix ty renames --- python/pyarrow-stubs-tests/test_array.py | 2 +- python/pyarrow-stubs/__lib/types.pyi | 6 +++--- python/pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/pyarrow-stubs-tests/test_array.py b/python/pyarrow-stubs-tests/test_array.py index ab57edd3491..d64e4277907 100644 --- a/python/pyarrow-stubs-tests/test_array.py +++ b/python/pyarrow-stubs-tests/test_array.py @@ -291,7 +291,7 @@ def test_invalid_usage() -> None: arr.slice("1") # type: ignore[arg-type] arr.equals(object()) # type: ignore[arg-type] arr.equals(None) # type: ignore[arg-type] - arr.format() # type: ignore[attr-defined] # ty: ignore[unresolved-attribute] # noqa: E501 + arr.format() # type: ignore[attr-defined] # ty: ignore[missing-attribute] # noqa: E501 pa.Array.from_pandas(1) # type: ignore[arg-type] # Arrays define __eq__ but not __hash__, hence unhashable at runtime _: Hashable = arr # type: ignore[assignment] # ty: ignore[invalid-assignment] diff --git a/python/pyarrow-stubs/__lib/types.pyi b/python/pyarrow-stubs/__lib/types.pyi index fe4dc10abc2..7810d33b762 100644 --- a/python/pyarrow-stubs/__lib/types.pyi +++ b/python/pyarrow-stubs/__lib/types.pyi @@ -364,9 +364,9 @@ class KeyValueMetadata(_Metadata, Mapping[bytes, bytes]): def key(self, i: int) -> bytes: ... def value(self, i: int) -> bytes: ... # The runtime yields generators instead of Mapping views - def keys(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 - def values(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 - def items(self) -> Iterator[tuple[bytes, bytes]]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 + def keys(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 + def values(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 + def items(self) -> Iterator[tuple[bytes, bytes]]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 def get_all(self, key: str | bytes) -> list[bytes]: ... def to_dict(self) -> dict[bytes, bytes]: ... diff --git a/python/pyproject.toml b/python/pyproject.toml index 04b7e36a906..b404c261f32 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -169,7 +169,7 @@ include = ["pyarrow-stubs", "pyarrow-stubs-tests"] include = ["pyarrow-stubs/__lib/array.pyi"] [tool.ty.overrides.rules] # Some array classes override methods with a different signature at runtime. -invalid-method-override = "ignore" +incompatible-method-override = "ignore" [[tool.ty.overrides]] include = ["pyarrow-stubs-tests/**"] From a237c159d12c88f0b8b844e730cbe3873c7d0c3c Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Fri, 27 Nov 2026 12:39:32 +0100 Subject: [PATCH 3/3] Keep scipy-stubs 1.17.1.5 --- python/requirements-stubs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/requirements-stubs.txt b/python/requirements-stubs.txt index 736bcb24380..ffda1001c33 100644 --- a/python/requirements-stubs.txt +++ b/python/requirements-stubs.txt @@ -11,7 +11,7 @@ mypy==2.4.1 pandas-stubs==3.1.0.261029 pyright==1.1.414 # The scipy extra installs the matching scipy, which the type stub tests import. -scipy-stubs[scipy]==1.18.1.1 +scipy-stubs[scipy]==1.17.1.5 ty==0.0.107 types-cffi==2.1.0.20261122 types-psutil==7.2.2.20261122