Repository: Shoobx/mypy-zope (language: python)

Issue:
Follow semantic versioning in mypy version pins
I think until mypy reached 1.0.0 it was a fine policy to pin to the mypy version that was released at the time, since the plugin system is not guaranteed to be stable and the version numbering was sort of semantic, but not really, since it used number digits rather, than numbers separated by dots.

But now that mypy is following semantic versioning rules I think you should consider only pinning the mypy version to before the next minor version, so if the current version was 1.0.0, you would pin to <1.1.0, rather than ==1.0.0, so patch releases, like 1.0.1, which will often contain important bug fixes can still be installed without having to force ignore the version pin.


Discussion / hints:
I agree. Let's try that. I'll update the pin and make a release.
I realize I didn't state it explicitly, but it probably still makes sense to pin the minimum version too, so people get at least the mypy version the release was tested with, but possibly a newer patch version, when available, i.e. for a release that was tested against 1.0.0 the requirement would be `>= 1.0.0, <1.1.0`
Yeah, that's exactly what I'm planning to do.

Fix patch:
diff --git a/setup.cfg b/setup.cfg
index a379672..326be49 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -17,6 +17,7 @@ classifiers =
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
     Programming Language :: Python :: 3.10
+    Programming Language :: Python :: 3.11
     License :: OSI Approved :: MIT License
     Operating System :: OS Independent
     Topic :: Software Development
@@ -27,7 +28,7 @@ packages =
     zope-stubs
 package_dir = =src
 install_requires =
-    mypy==1.0.0
+    mypy>=1.0.0,<1.1.0
     zope.interface
     zope.schema
 include_package_data = True


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index eb394ae..2ab1853 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -11,7 +11,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ['3.7', '3.8', '3.9', '3.10']
+        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
 
     steps:
     - uses: actions/checkout@v2