Package portage :: Module versions :: Class _pkg_str
[hide private]

Class _pkg_str

source code

object --+        
         |        
basestring --+    
             |    
       unicode --+
                 |
                _pkg_str

This class represents a cpv. It inherits from str (unicode in python2) and has attributes that cache results for use by functions like catpkgsplit and cpv_getkey which are called frequently (especially in match_from_list). Instances are typically created in dbapi.cp_list() or the Atom contructor, and propagate from there. Generally, code that pickles these objects will manually convert them to a plain unicode object first.

Instances of this class will have missing attributes for metadata that has not been passed into the constructor. The missing attributes are used to distinguish missing metadata values from undefined metadata values. For example, the repo attribute will be missing if the 'repository' key is missing from the metadata dictionary.

Instance Methods [hide private]
 
__init__(self, cpv, metadata=None, settings=None, eapi=None, repo=None, slot=None, build_time=None, build_id=None, file_size=None, mtime=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__setattr__(self, name, value)
x.__setattr__('name', value) <==> x.name = value
source code

Inherited from unicode: __add__, __contains__, __eq__, __format__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __repr__, __rmod__, __rmul__, __sizeof__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, format, index, isalnum, isalpha, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from unicode (private): _formatter_field_name_split, _formatter_parser

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, cpv, metadata=None, settings=None, eapi=None, repo=None, slot=None, build_time=None, build_id=None, file_size=None, mtime=None) source code
 
_long(var, default) source code
Properties [hide private]
  stable

Inherited from object: __class__

Method Details [hide private]

__new__(cls, cpv, metadata=None, settings=None, eapi=None, repo=None, slot=None, build_time=None, build_id=None, file_size=None, mtime=None)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, cpv, metadata=None, settings=None, eapi=None, repo=None, slot=None, build_time=None, build_id=None, file_size=None, mtime=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__setattr__(self, name, value)

source code 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__
(inherited documentation)

Property Details [hide private]

stable

Get Method:
unreachable.stable(self)