]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
happy mypy day; backport the bump to pytest 9
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Nov 2025 16:55:36 +0000 (11:55 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Nov 2025 16:55:36 +0000 (11:55 -0500)
Change-Id: I5beb5770e916b41438720c2d4e474eef1ba6598c

lib/sqlalchemy/orm/mapped_collection.py
lib/sqlalchemy/util/langhelpers.py
pyproject.toml
tox.ini

index ca085c4037675e445b30725c2192c5c49cc29b13..1ca281f07895f7284dee07b59c6e41602036d3d9 100644 (file)
@@ -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,
index d20427bf85b84817282d290c904ddfa38cb48d21..6db82fb212a182a31f6cafd8240d87c684f64ddc 100644 (file)
@@ -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):
index fa6880caa2207d87141a3f21b65cfb7bc1c9f997..0af836aa30ff4fa75abf9c754dd7a65e7b150ccc 100644 (file)
@@ -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 0b435ddbbd0c7e1ba407c230dc38c66e007cc17c..d4474d452b7682001ef193d25df035c1d25caa04 100644 (file)
--- 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}