Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
rocon_semantic_version.base.Version Class Reference

List of all members.

Public Member Functions

def __cmp__
def __eq__
def __ge__
def __gt__
def __hash__
def __init__
def __iter__
def __le__
def __lt__
def __ne__
def __repr__
def __str__
def coerce
def parse

Public Attributes

 build
 major
 minor
 partial
 patch
 prerelease

Static Public Attributes

tuple partial_version_re = re.compile('^(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:-([0-9a-zA-Z.-]*))?(?:\+([0-9a-zA-Z.-]*))?$')
tuple version_re = re.compile('^(\d+)\.(\d+)\.(\d+)(?:-([0-9a-zA-Z.-]+))?(?:\+([0-9a-zA-Z.-]+))?$')

Private Member Functions

def _coerce
def _comparison_functions
def _validate_identifiers

Detailed Description

Definition at line 69 of file base.py.


Constructor & Destructor Documentation

def rocon_semantic_version.base.Version.__init__ (   self,
  version_string,
  partial = False 
)

Definition at line 74 of file base.py.


Member Function Documentation

def rocon_semantic_version.base.Version.__cmp__ (   self,
  other 
)

Definition at line 324 of file base.py.

def rocon_semantic_version.base.Version.__eq__ (   self,
  other 
)

Definition at line 339 of file base.py.

def rocon_semantic_version.base.Version.__ge__ (   self,
  other 
)

Definition at line 372 of file base.py.

def rocon_semantic_version.base.Version.__gt__ (   self,
  other 
)

Definition at line 366 of file base.py.

Definition at line 345 of file base.py.

Definition at line 230 of file base.py.

def rocon_semantic_version.base.Version.__le__ (   self,
  other 
)

Definition at line 360 of file base.py.

def rocon_semantic_version.base.Version.__lt__ (   self,
  other 
)

Definition at line 354 of file base.py.

def rocon_semantic_version.base.Version.__ne__ (   self,
  other 
)

Definition at line 348 of file base.py.

Definition at line 246 of file base.py.

Definition at line 233 of file base.py.

def rocon_semantic_version.base.Version._coerce (   cls,
  value,
  allow_none = False 
) [private]

Definition at line 86 of file base.py.

def rocon_semantic_version.base.Version._comparison_functions (   cls,
  partial = False 
) [private]
Retrieve comparison methods to apply on version components.

This is a private API.

Args:
    partial (bool): whether to provide 'partial' or 'strict' matching.

Returns:
    5-tuple of cmp-like functions.

Definition at line 253 of file base.py.

def rocon_semantic_version.base.Version._validate_identifiers (   cls,
  identifiers,
  allow_leading_zeroes = False 
) [private]

Definition at line 222 of file base.py.

def rocon_semantic_version.base.Version.coerce (   cls,
  version_string,
  partial = False 
)
Coerce an arbitrary version string into a semver-compatible one.

The rule is:
- If not enough components, fill minor/patch with zeroes; unless
  partial=True
- If more than 3 dot-separated components, extra components are "build"
  data. If some "build" data already appeared, append it to the
  extra components

Examples:
    >>> Version.coerce('0.1')
    Version(0, 1, 0)
    >>> Version.coerce('0.1.2.3')
    Version(0, 1, 2, (), ('3',))
    >>> Version.coerce('0.1.2.3+4')
    Version(0, 1, 2, (), ('3', '4'))
    >>> Version.coerce('0.1+2-3+4_5')
    Version(0, 1, 0, (), ('2-3', '4-5'))

Definition at line 92 of file base.py.

def rocon_semantic_version.base.Version.parse (   cls,
  version_string,
  partial = False,
  coerce = False 
)
Parse a version string into a Version() object.

Args:
    version_string (str), the version string to parse
    partial (bool), whether to accept incomplete input
    coerce (bool), whether to try to map the passed in string into a
valid Version.

Definition at line 162 of file base.py.


Member Data Documentation

Definition at line 74 of file base.py.

Definition at line 74 of file base.py.

Definition at line 74 of file base.py.

Definition at line 74 of file base.py.

tuple rocon_semantic_version::base.Version::partial_version_re = re.compile('^(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:-([0-9a-zA-Z.-]*))?(?:\+([0-9a-zA-Z.-]*))?$') [static]

Definition at line 72 of file base.py.

Definition at line 74 of file base.py.

Definition at line 74 of file base.py.

tuple rocon_semantic_version::base.Version::version_re = re.compile('^(\d+)\.(\d+)\.(\d+)(?:-([0-9a-zA-Z.-]+))?(?:\+([0-9a-zA-Z.-]+))?$') [static]

Definition at line 71 of file base.py.


The documentation for this class was generated from the following file:


rocon_semantic_version
Author(s): Raphaƫl Barrois
autogenerated on Fri May 2 2014 10:35:51