Expand 'typing' reqs to all python versions #883
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were building our pinned requirements data for typing only under the python version used for
mypy
linting in CI: Python 3.11.This makes mypy-linting of code non-functional on lower interpreter versions. While some SDK developers are using pyenv or a similar solution to install multiple pythons in their home dirs, so we didn't notice the constraint, this is not meant to be a requirement for all contributors.
To make
tox r -e mypy
work on all pythons, thetox
target for "freezedeps" has been modified to generate the extra requirements, and the freezedeps job has been run.The fix was verified with
It is possible that this will cause some drift and issues, especially around our lower-bound for python version (e.g. latest
mypy
drops support for a version we use), but at present such issues are speculative. We can deal with additional tightening of bounds and adjustments to CI to run some of these versions in the future.NB: This was found by someone trying to contribute a change on py3.9 specifically, and running into issues with
make lint
.The fact that it works there is therefore one of the important litmus tests for this fix.
📚 Documentation preview 📚: https://globus-sdk-python--883.org.readthedocs.build/en/883/