Major Series Two
The project v440
is a PyPI
project that provides mutable version objects
that allow flexible manipulation of version identifiers
following the PEP440 standard.
This abstract base class
is the ancestor of all core classes.
It enforces some standards in its decendents.
All properties have always a getter, never a deleter,
and sometimes a setter.
The property without setter are explained under
NestedABC.
The properties with setter are of an immutable builtin type.
The setter allows allows
for replacing the value with another.
If the setter receives an invalid value
then a VersionError
is raised and the instance is left unchanged.
This magic method implements bool(self).
It is defined as equivalent to self == type(self)().
This magic method implements self == other.
It is defined as equivalent
to type(self) is type(other) and self.string == other.string.
The instances of each class can be formatted.
A format spec is always either valid or invalid for a certain class.
The empty string is valid for all classes and provides the standardized string.
The format function always returns
a PEP440-conforming string notation
of the formatted object.
Each possible PEP440-conforming notation
of an object has at least one valid format spec
that allows for its recreation in formatting.
This magic method implements self >= other.
See also __le__.
This magic method implements self > other.
See also __le__.
See unhash.
This magic method implements self <= other.
Each class implements a total order of all of its possible instances
- with the sole exception of Pre("")
which is neither greater than nor lesser than
any instances of Pre.
Each class is ordered in accordance with PEP440.
This magic method implements self < other.
See also __le__.
This magic classmethod always
returns NotImplemented.
This classmethod takes
PEP440-conforming strings
and returns the shorted possible format spec
that can recreate all of them in formatting.
The classmethod raises a VersionError
iff an argument is not actually PEP440-conforming
or no common format spec exists.
This property connects v440
with the packaging project.
Its getter converts self
to an appropriate value
for the packaging project.
Its setter takes such a value and configures self to match.
This property represents self as a string.
self.string returns the same value as str(self).
Setting this property allows to change the object in question
to the state represented by the provided value.
The string property accepts any value
iff that value provides a PEP440-conforming string.
It (and therefore also calling str) always returns
a standardized PEP440-conforming string.
Two objects of the same type are equal iff their string properties are equal.
This abstract base class inherits
from CoreABC
and from datahold.OkayList.
This magic method implements self < other.
See also __le__.
This magic classmethod always
returns NotImplemented.
This classmethod takes
PEP440-conforming strings
and returns the shorted possible format spec
that can recreate all of them in formatting.
The classmethod raises a VersionError
iff an argument is not actually PEP440-conforming
or no common format spec exists.
This property connects v440
with the packaging project.
Its getter converts self
to an appropriate value
for the packaging project.
Its setter takes such a value and configures self to match.
This property represents self as a string.
self.string returns the same value as str(self).
Setting this property allows to change the object in question
to the state represented by the provided value.
The string property accepts any value
iff that value provides a PEP440-conforming string.
It (and therefore also calling str) always returns
a standardized PEP440-conforming string.
Two objects of the same type are equal iff their string properties are equal.
This abstract base class inherits
from CoreABC.
This abstract base class inherits
from CoreABC.
This subpackage contains the principle classes of the project.
Each of these classes has a dedicated module
inside of core.
This class represents the base part of a public version identifier.
This property represents the epoch.
This property represents the equivalent packaging.version.Version.base_version value.
It is defined as an alias of Base.string.
This property represents the release.
This class represents the developmental release information.
This property represents the literal part of the information.
It can take the values "" (with the numeral 0)
and "dev" (with any non-negative numeral).
This property represents the numeral part of the information.
It can only take non-negative values and is restricted to 0
if lit is "".
This property represents the equivalent packaging.version.Version.dev value.
This list-like class represents
the local part of version identifiers.
Its items are integers and strings.
Asside from the members listed below it also implements indeces and methods
exactly as list does.
This class represents the post-release information.
This property represents the literal part of the information.
It can take the values "" (with the numeral 0)
and "post" (with any non-negative numeral).
This property represents the numeral part of the information.
It can only take non-negative values and is restricted to 0
if lit is "".
This property represents the equivalent packaging.version.Version.post value.
This property represents the Post object as a string.
This class represents the pre-release information.
This property represents the literal part of the information.
It can take the values "", "a", "b", and "rc".
The value "" demands the numeral 0.
It signifies that we are not dealing with a pre-release.
All other values tolerate any non-negative numeral.
Each of them represents another phase of the pre-release process:
alpha-releases, beta-releases, and previews.
This property represents the numeral part of the information.
It can only take non-negative values and is restricted to 0
if lit is "".
This property represents the equivalent packaging.version.Version.pre value.
This property represents the Pre object as a string.
This property represents the equivalent packaging.version.Version.public value.
It is defined as an alias of Public.string.
This property represents the Public object as a string.
This method returns whether the current instance denotes a dev-release.
This method returns whether the current instance denotes a pre-release.
This method returns whether the current instance denotes a post-release.
Strictly speaking, the Qual class does not have
a counterpart in packaging.
From inference this property is defined as an alias
of Qual.string.
This property represents the Qual object as a string.
This class is the centrepiece of the v440 project.
This property represents the local part of the version identifier.
This property represents the equivalent packaging.version.Version.
This property represents the public part of the version identifier.
This property represents the Version object as a string.
This subpackage allows for testing with unittest.
The documentation of the prior implementation of this project can be found here.