From: Mike Bayer Date: Fri, 28 Nov 2025 16:55:36 +0000 (-0500) Subject: happy mypy day; backport the bump to pytest 9 X-Git-Tag: rel_2_0_45~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ad2add30d1b762ddd27fcfd829e56fc109be0a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git happy mypy day; backport the bump to pytest 9 Change-Id: I5beb5770e916b41438720c2d4e474eef1ba6598c --- diff --git a/lib/sqlalchemy/orm/mapped_collection.py b/lib/sqlalchemy/orm/mapped_collection.py index ca085c4037..1ca281f078 100644 --- a/lib/sqlalchemy/orm/mapped_collection.py +++ b/lib/sqlalchemy/orm/mapped_collection.py @@ -443,8 +443,8 @@ class KeyFuncDict(Dict[_KT, _VT]): f"parameter on the mapped collection factory." ) - @collection.appender # type: ignore[misc] - @collection.internally_instrumented # type: ignore[misc] + @collection.appender # type: ignore[untyped-decorator] + @collection.internally_instrumented # type: ignore[untyped-decorator] def set( self, value: _KT, @@ -472,8 +472,8 @@ class KeyFuncDict(Dict[_KT, _VT]): self.__setitem__(key, value, _sa_initiator) # type: ignore[call-arg] - @collection.remover # type: ignore[misc] - @collection.internally_instrumented # type: ignore[misc] + @collection.remover # type: ignore[untyped-decorator] + @collection.internally_instrumented # type: ignore[untyped-decorator] def remove( self, value: _KT, diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index d20427bf85..6db82fb212 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -77,7 +77,7 @@ if compat.py314: return None # this is ported from py3.13.0a7 - _BASE_GET_ANNOTATIONS = type.__dict__["__annotations__"].__get__ # type: ignore # noqa: E501 + _BASE_GET_ANNOTATIONS = type.__dict__["__annotations__"].__get__ def _get_dunder_annotations(obj): if isinstance(obj, type): diff --git a/pyproject.toml b/pyproject.toml index fa6880caa2..0af836aa30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ [dependency-groups] tests = [ - "pytest>=7.0.0,<8.4", + "pytest>=7.0.0,<10", "pytest-xdist", ] @@ -96,9 +96,9 @@ lint = [ mypy = [ {include-group = "tests-greenlet"}, - "mypy>=1.16.0", + "mypy>=1.19.0", "nox", # because we check noxfile.py - "pytest>8,<8.4", # alembic/testing imports pytest + "pytest>8,<10", # alembic/testing imports pytest "types-greenlet", ] diff --git a/tox.ini b/tox.ini index 0b435ddbbd..d4474d452b 100644 --- a/tox.ini +++ b/tox.ini @@ -66,7 +66,7 @@ deps= # if newer versions will fix the segfault or not mysql: mariadb<1.1.13 - pytest>=7.0.0,<8.4 + pytest>=7.0.0,<10 # tracked by https://github.com/pytest-dev/pytest-xdist/issues/907 pytest-xdist!=3.3.0 @@ -205,7 +205,7 @@ commands= deps= greenlet >= 1 importlib_metadata; python_version < '3.8' - mypy >= 1.17.0 + mypy >= 1.19.0 types-greenlet commands = mypy {env:MYPY_COLOR} ./lib/sqlalchemy @@ -215,11 +215,11 @@ extras = [testenv:mypy] deps= - pytest>=7.0.0rc1,<8.4 + pytest>=7.0.0rc1,<10 pytest-xdist types-greenlet importlib_metadata; python_version < '3.8' - mypy >= 1.17.0 + mypy >= 1.19.0 patch==1.* extras= {[greenletextras]extras}