-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Better pep440 #60170
base: master
Are you sure you want to change the base?
Better pep440 #60170
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
Hello @T4mmi, It sounds me like a good move! But why not using https://pypi.org/project/packaging/, the official package maintained by PyPa as recommended by the PEP 440 and used by pip: |
cc @3nids and @Gustry: this PR would align plugins manager with what we chose to enforce in QGIS Plugin CI, right? It also moves in the same directions of a few QEPs as qgis/QGIS-Enhancement-Proposals#202 by @olivierdalang and qgis/QGIS-Enhancement-Proposals#179 by @s-m-e |
Hi, I totally agree with the use of But if this solution is the one we target I think it should simplify a lot of things for sure :) On the other hand I'm not sure we should mix the python and other plugins dependencies (QEP suggest it), but there is a need for python dependencies also(might be out of scope) |
+1 to move to use |
Then maybe wait before merging, I'll rework this PR first thing next week to use |
Ok, cool. In the meanwhile, please switch your PR in draft state.
Make sure it's shipped with every QGIS flavor, not only Windows or Ubuntu. I also recommend to use a strong constraint on the shipped version, like |
If you have a lead on where to start looking, I'll take it :) |
Ok, I think the PR is ready, I used Only regression I see is for Also I did NOT check if |
This one was previously failling
I think this dependency should be added to the |
Description
This PR follows up the previous 60137, going further into supporting PEP440 and semver syntaxes (see below). It also ships extended unit tests (reflecting the 2 digits used versions in the examples).
It brings "0" padding for missmatching length versions, equality for short/long hand syntaxes (alpha/beta).
Before:
0.1 < 0.1.0
0.1a1 <0.1alpha1
0.1post1 > 0.1dev1
After:
0.1 == 0.1.0
0.1a1 == 0.1alpha1
0.1post1 < 0.1dev1
TODO/FIXME:
It still misses proper handling of missmatching lengths when a tail is provided (pre/post releases):
for example it sorts
1.0a1 < 1.0.0alpha1
when they should be equal ... should we delegate these comparison to a dedicated tool such as packaging.version` ?