-
Notifications
You must be signed in to change notification settings - Fork 119
SG-40319 SG-41241 version normalize function #1066
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
Merged
eduardoChaucaGallegos
merged 18 commits into
master
from
ticket/SG-40319-version-normalize
Nov 27, 2025
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a9f8919
new function to normalize version format to compare version correctly
eduardoChaucaGallegos ca6dd5e
using sgre
eduardoChaucaGallegos 729b03b
_normalize_version_format improved
eduardoChaucaGallegos 35defe9
_normalize_version_format improved
eduardoChaucaGallegos 44c2a67
version_parse improved and also imrpoved cases for _normalized_versio…
eduardoChaucaGallegos 00414ce
black format
eduardoChaucaGallegos bdeb090
New version patterns are needed because the previous version_parsing …
eduardoChaucaGallegos 6584708
New version patterns are needed because the previous version_parsing …
eduardoChaucaGallegos f7ed7cb
black format
eduardoChaucaGallegos cfcc7b3
test fixed
eduardoChaucaGallegos f85d0f1
black format
eduardoChaucaGallegos ba252ca
commentts abut tests fixed
eduardoChaucaGallegos e16f896
comments fixed
eduardoChaucaGallegos 47b7619
black format
eduardoChaucaGallegos 25e19a0
end of files fixed
eduardoChaucaGallegos f8a2761
Vendor packaging.version to ensure consistent version parsing
eduardoChaucaGallegos 2e2cb68
Add packaging license in software_credits
julien-lang 4295e1e
Fix version normalization for software names with v-format versions
eduardoChaucaGallegos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # This file is dual licensed under the terms of the Apache License, Version | ||
| # 2.0, and the BSD License. See the LICENSE file in the root of this repository | ||
| # for complete details. | ||
|
|
||
| __title__ = "packaging" | ||
| __summary__ = "Core utilities for Python packages" | ||
| __uri__ = "https://github.com/pypa/packaging" | ||
|
|
||
| __version__ = "25.0" | ||
|
|
||
| __author__ = "Donald Stufft and individual contributors" | ||
| __email__ = "donald@stufft.io" | ||
|
|
||
| __license__ = "BSD-2-Clause or Apache-2.0" | ||
| __copyright__ = f"2014 {__author__}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # This file is dual licensed under the terms of the Apache License, Version | ||
| # 2.0, and the BSD License. See the LICENSE file in the root of this repository | ||
| # for complete details. | ||
|
|
||
|
|
||
| class InfinityType: | ||
| def __repr__(self) -> str: | ||
| return "Infinity" | ||
|
|
||
| def __hash__(self) -> int: | ||
| return hash(repr(self)) | ||
|
|
||
| def __lt__(self, other: object) -> bool: | ||
| return False | ||
|
|
||
| def __le__(self, other: object) -> bool: | ||
| return False | ||
|
|
||
| def __eq__(self, other: object) -> bool: | ||
| return isinstance(other, self.__class__) | ||
|
|
||
| def __gt__(self, other: object) -> bool: | ||
| return True | ||
|
|
||
| def __ge__(self, other: object) -> bool: | ||
| return True | ||
|
|
||
| def __neg__(self: object) -> "NegativeInfinityType": | ||
| return NegativeInfinity | ||
|
|
||
|
|
||
| Infinity = InfinityType() | ||
|
|
||
|
|
||
| class NegativeInfinityType: | ||
| def __repr__(self) -> str: | ||
| return "-Infinity" | ||
|
|
||
| def __hash__(self) -> int: | ||
| return hash(repr(self)) | ||
|
|
||
| def __lt__(self, other: object) -> bool: | ||
| return True | ||
|
|
||
| def __le__(self, other: object) -> bool: | ||
| return True | ||
|
|
||
| def __eq__(self, other: object) -> bool: | ||
| return isinstance(other, self.__class__) | ||
|
|
||
| def __gt__(self, other: object) -> bool: | ||
| return False | ||
|
|
||
| def __ge__(self, other: object) -> bool: | ||
| return False | ||
|
|
||
| def __neg__(self: object) -> InfinityType: | ||
| return Infinity | ||
|
|
||
|
|
||
| NegativeInfinity = NegativeInfinityType() |
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.