Skip to content

Update testing dependencies and fix tests for mypy 1.20#143

Merged
binaryDiv merged 8 commits into
dev-mypyfrom
update-mypy-1.20
Apr 13, 2026
Merged

Update testing dependencies and fix tests for mypy 1.20#143
binaryDiv merged 8 commits into
dev-mypyfrom
update-mypy-1.20

Conversation

@binaryDiv
Copy link
Copy Markdown
Contributor

Please note that the target branch is dev-mypy instead of main. This will likely be the last PR on dev-mypy, after this is merged I'll merge dev-mypy to main.


mypy introduced some changes in version 1.20 which causes error messages (and reveal_type output) to look different than before. Most of this is just stripping the builtins. from builtin types (e.g. int instead of builtins.int), which is a change I quite like because it improves readability. But it also means I had to update a lot in the typing tests. 😅

This PR updates all testing dependencies to their latest versions (including mypy 1.20.0) and fixes anything that broke because of that.

Since the mypy update broke our pipelines, I've also decided to pin the versions of all testing dependencies to minor versions instead of major versions (it used to be mypy ~= 1.19 which is equivalent to mypy >= 1.19, < 2.0, now we specify still a minimum version but only allow patch level updates).

I also did some smaller changes in the test environment (e.g. modernizing the tox config a little bit, fixed some deprecated config options), and updated the GitHub Actions versions.

@binaryDiv binaryDiv self-assigned this Apr 8, 2026
@binaryDiv binaryDiv added the testing Related to testing (e.g. unit tests) label Apr 8, 2026
Comment thread pyproject.toml
[tool.setuptools_scm]
write_to = "src/validataclass/_version.py"
version_scheme = "post-release"
version_scheme = "no-guess-dev"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: "post-release" has been deprecated for a while now, "no-guess-dev" is the recommended replacement. It doesn't affect normal builds, only local development builds.

Comment thread setup.cfg
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This was removed because license classifiers are deprecated. We still set license = MIT in the metadata above.

@binaryDiv binaryDiv merged commit a67eda3 into dev-mypy Apr 13, 2026
6 checks passed
@binaryDiv binaryDiv deleted the update-mypy-1.20 branch April 13, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to testing (e.g. unit tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants