module documentation
.. testsetup:: from packaging.version import parse, Version
Class |
|
This class abstracts handling of a project's versions. |
Exception |
|
Raised when a version string is not a valid version. |
Function | parse |
Parse the given version string. |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Class | _ |
Undocumented |
Function | _cmpkey |
Undocumented |
Function | _parse |
Undocumented |
Function | _parse |
Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve"). |
Constant | _VERSION |
A string containing the regular expression used to match a valid version. |
Variable | _local |
Undocumented |
Variable | _ |
Undocumented |
Parse the given version string. >>> parse('1.0.dev1') <Version('1.0.dev1')> :param version: The version string to parse. :raises InvalidVersion: When the version string is not a valid version.
Undocumented
Value |
|
Undocumented
Value |
|
def _cmpkey(epoch:
int
, release: Tuple[ int, ...]
, pre: Optional[ Tuple[ str, int]]
, post: Optional[ Tuple[ str, int]]
, dev: Optional[ Tuple[ str, int]]
, local: Optional[ Tuple[ SubLocalType]]
) -> CmpKey
:
(source)
¶
Undocumented
def _parse_letter_version(letter:
str
, number: Union[ str, bytes, SupportsInt]
) -> Optional[ Tuple[ str, int]]
:
(source)
¶
Undocumented
A string containing the regular expression used to match a valid version. The pattern is not anchored at either end, and is intended for embedding in larger expressions (for example, matching a version number as part of a file name). The regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE`` flags set. :meta hide-value:
Value |
|