-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Preceding v character from PEP 0440 #89
Comments
Can you give me more details about a specific failure case? PEP 440 says to ignore the leading "v" when comparing version numbers, but I would think anyone using scriv would either have a "v" everywhere, or have it nowhere. How is Tutor using versions numbers, and what problem is scriv causing? |
The probelm comes when
Regarding PEP 440, if I understood correctly for that PEP v.1.2.3 == 1.2.3, and then as I understood when normalizing a version it should be stripped. When I used the referred package from the same PEP 440 it sripped the >>> from packaging import version
>>> version.parse('v1.2.3')
<Version('1.2.3')>
>>> version.parse('1.2.3')
<Version('1.2.3')> |
Why not put the "v" character into the |
CC: @regisb |
In the context of Tutor: the So we can't really include the preceding "v" in Alternatives include:
Sidenote: while writing this issue, I realized that the |
This is now released as part of scriv 1.3.1.
Yes, so that it can be used even on projects that don't use scriv to create their changelog (like coverage.py). |
Awesome, thanks! |
The util
extract_version
function is not ignoring a preceding 'v' when existsIs this intentional ? hence in testing it expect to keep it
scriv/tests/test_util.py
Line 11 in d86dc04
Following the linked PEP 0440 it says it should be removed ref
This would lead to not detecting if a version already exists in the entries because 'version' would be
x.y.z
whileeverion
would bevx.y.z
v
exists in the tempalte of the entry, e.g. the pattern followed in tutorThis would lead to
scriv
failing the following condition:scriv/src/scriv/collect.py
Line 74 in d86dc04
scriv/src/scriv/util.py
Lines 53 to 72 in d86dc04
The text was updated successfully, but these errors were encountered: