![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Classes | |
| class | LegacyMatcher |
| class | LegacyVersion |
| class | Matcher |
| class | NormalizedMatcher |
| class | NormalizedVersion |
| class | SemanticMatcher |
| class | SemanticVersion |
| class | UnsupportedVersionError |
| class | Version |
| class | VersionScheme |
Functions | |
| _pep_440_key (s) | |
| _match_prefix (x, y) | |
| _suggest_semantic_version (s) | |
| _suggest_normalized_version (s) | |
| _legacy_key (s) | |
| is_semver (s) | |
| _semantic_key (s) | |
| get_scheme (name) | |
Variables | |
| logger = logging.getLogger(__name__) | |
| PEP440_VERSION_RE | |
| _normalized_key = _pep_440_key | |
| tuple | _REPLACEMENTS |
| tuple | _SUFFIX_REPLACEMENTS |
| _NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)') | |
| _VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I) | |
| dict | _VERSION_REPLACE |
| _SEMVER_RE | |
| dict | _SCHEMES |
Implementation of a flexible versioning scheme providing support for PEP-440, setuptools-compatible and semantic versioning.
|
protected |
Suggest a normalized version close to the given version string.
If you have a version string that isn't rational (i.e. NormalizedVersion
doesn't like it) then you might be able to get an equivalent (or close)
rational version from this function.
This does a number of simple normalizations to the given string, based
on observation of versions currently in use on PyPI. Given a dump of
those version during PyCon 2009, 4287 of them:
- 2312 (53.93%) match NormalizedVersion without change
with the automatic suggestion
- 3474 (81.04%) match when using this suggestion method
@param s {str} An irrational version string.
@returns A rational version string, or None, if couldn't determine one.
|
protected |
Try to suggest a semantic form for a version for which _suggest_normalized_version couldn't come up with anything.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| pip._vendor.distlib.version.PEP440_VERSION_RE |