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
pre-commit: increase vermin version #5173
Conversation
Problem: vermin did not detect some "obvious" version incompatability issues. Update the pre-commit check version of vermin from 1.4.2 to 1.5.1.
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.
Great, thanks! Just one nit in a comment, I don't think tomllib
was added until Python 3.11...
src/bindings/python/flux/util.py
Outdated
@@ -30,8 +30,10 @@ | |||
|
|||
import yaml | |||
|
|||
# tomllib added to standard library in Python 3.10 |
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.
# tomllib added to standard library in Python 3.10 | |
# tomllib added to standard library in Python 3.11 |
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.
yeah, i got conflicting information about 3.10 vs 3.11. Seems we got it wrong in this prior commit too :-( 6298a36. But googling it does seem it is 3.11.
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.
Yeah, oops!
Problem: tomllib is included on Python 3.11 and newer versions and is loaded when available. This can cause a vermin check failure because the minimum required version for flux-core is 3.6. Add a "novermin" comment to pass the vermin check. Add a small comment to explain code as well.
723be9a
to
3b9b6e3
Compare
Codecov Report
@@ Coverage Diff @@
## master #5173 +/- ##
==========================================
- Coverage 83.12% 83.10% -0.02%
==========================================
Files 453 453
Lines 77856 77856
==========================================
- Hits 64717 64705 -12
- Misses 13139 13151 +12
|
thanks, setting MWP. |
In #5055 some code that was only supported in Python 3.11 did not get caught by the vermin check, which surprised me. It ended up it was caught in a newer version of vermin.
So lets increase the version and add a
novermin
comment for one place that needs it. Also add a comment to the place that needs the novermin override.