Upgrade python version to 3.12 and fix linting errors#166
Upgrade python version to 3.12 and fix linting errors#166DrPaulSharp merged 4 commits intomasterfrom
Conversation
rprospero
left a comment
There was a problem hiding this comment.
Looks good. There was one thing that surprised me, but I'm marking this as approved because I don't know uv well enough to know if it's wrong. Mostly, I'm used to other systems where the lock file is kept under version control so that all devs are sure to be on the exact same version.
Also interesting to see how many strings were still explicitly marked as unicode from the old Python 2 days.
.gitignore
Outdated
| # INSTALL.md recommends a venv that should not be committed | ||
| venv | ||
| .venv | ||
| uv.lock |
There was a problem hiding this comment.
Are we supposed to commit the lock file to keep versions the same for all developers? I'm not that familiar with uv, so this is a genuine question.
There was a problem hiding this comment.
In general, the uv.lock file should be added to version control. Now that we have the same requirements for the master and refactor_24 branches, and it would likely be useful for developers using uv (who may be at the contributor camp), I think we should go ahead and add it here. Thanks for the prompt!
There was a problem hiding this comment.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
|
There's a flow-on effect to sasview with increasing the minimum version. There should be no issue doing so, but probably makes sense to also raise it in SasView. (Tests already all pass with 3.12 and 3.13 so no issues there; checking that Qt is happy on random platforms is also needed.) Landing SasView/sasview#3642 first makes sense for sequencing - it's easy to update python versions following that. |
|
I've merged SasView/sasview#3642, and updated to python 3.12 in SasView/sasview#3649 |
This PR upgrades the minimum version of python to 3.12 to prepare for merging in features of the refactoring project.
It also introduces the full ruff ruleset to the main branch, and fixes the linting errors in the code. These errors were fixed on the
refactor_24branch in PRs: #140, #144, #146, #147, and the pre-commit hook was introduced in #164.