]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
restore slotscheck, skipping mypy extension
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 14 Aug 2023 13:46:47 +0000 (09:46 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 14 Aug 2023 13:46:47 +0000 (09:46 -0400)
in [1] it was identified that import issues in the mypy extension
in interaction with mypy 1.5 is the source of the error in slotscheck.

I'm happy to remove mypy as a dependency for the slotscheck step
in any case.

[1] https://github.com/ariebovenberg/slotscheck/issues/178

Change-Id: I750de591179840a586650d303bcaf2ede59ec048

pyproject.toml
tox.ini

index a0c198c05d9aebf47d68c4541dfdc5da45369b06..6e2a97d20bb3d99c368e5eca8b4a28223de7bbda 100644 (file)
@@ -13,7 +13,13 @@ target-version = ['py37']
 black-line-length = 79
 
 [tool.slotscheck]
-exclude-modules = '^sqlalchemy\.testing'
+exclude-modules = '''
+^sqlalchemy\.(
+  testing
+  |ext\.mypy  # see slotscheck/issues/178
+)
+'''
+
 
 # disable isort, for IDEs that just default isort to be turned on, e.g. vscode.
 # we use flake8-import-order for import sorting, using zimports to actually
diff --git a/tox.ini b/tox.ini
index be12bd23a65c1861da0ac3a2d35106a2a56b5bfa..5e00bd0c4983fc8c3110733d09852321c1a4e39d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -215,11 +215,8 @@ deps=
       pydocstyle
       pygments
       black==23.3.0
-      slotscheck>=0.17.0
+      slotscheck>=0.17.0
 
-      # this is to satisfy the mypy plugin dependency
-      # when slotscheck imports sqlalchemy.mypy modules
-      sqlalchemy[mypy]
       # required by generate_tuple_map_overloads
       zimports
 allowlist_externals =
@@ -230,8 +227,8 @@ commands =
      flake8 ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py {posargs}
      black --check ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py
      # test with cython and without cython exts running
-     slotscheck -m sqlalchemy
-     env DISABLE_SQLALCHEMY_CEXT_RUNTIME=1 slotscheck -m sqlalchemy
+     slotscheck -m sqlalchemy
+     env DISABLE_SQLALCHEMY_CEXT_RUNTIME=1 slotscheck -m sqlalchemy
      python ./tools/format_docs_code.py --check
      python ./tools/generate_tuple_map_overloads.py --check
      python ./tools/generate_proxy_methods.py --check