-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: pin the dev requirements to major.minor compatible #1054
Conversation
…rsion. pyright doesn't use semvar, and breaks some checks in versions newer than the one we use, so exclude that.
Hmm, this keeps installing the older flake8. Will check on that. |
Ah, the latest flake8 also has the 3.12 issue. |
Ah, it's not flake8, it's pyproject-flake8. A PR to fix it is still open |
So some options:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed write-up. I think this is fine in the interim, till either pyproject-flake8 is fixed or we move to Ruff.
Adjust the dev requirements to be pinned to the latest compatible version of the currently used major.minor version.
This should make breakage like the current issue with flake8 & Python 3 less common, and generally encourage developing using the latest versions of the dev tools (picking up bug fixes and security fixes in particular).
Pyright doesn't use semvar and newer versions have issues with some of the hinting we use (it's unclear whether this is limitations in Python, or a pyright bug, or something we should fix ourselves) so leave it tightly pinned to the same version.
Changes one line of (ops.testing) code to avoid an issue raised by newer flake8 (using
!=
to compare types, rather thanis not
for an exact match ornot isinstance
for looser checks).Temporarily use Python 3.11 for the CI linting check (rather than whatever the setup-python tool provides by default, currently 3.12), to work around an incompatibility between pyproject-flake8 and Python 3.12. This should be reverted when (a) we move away from flake8, or (b) pyproject-flake8 has a fix in a released version.
Temporarily use Python 3.11 for the CI
build sdist
check. We need to either explicitly installsetuptools
in that action, or modernise thesetup.py
to not require it (since we're considering moving to be more purely pyproject.toml, that might end up the solution).