summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/mappings.py
Commit message (Collapse)AuthorAgeFilesLines
* OrderedDict: fix setitem bug #436974Zac Medico2012-10-021-3/+3
| | | | | | This fixes some strange behavior triggered during fetch, which is only observable with Python 2.6 since it doesn't have collections.OrderedDict.
* Replace @returns with @return.Zac Medico2012-03-271-1/+1
|
* portage/cache/mappings.py: Remove deprecated functionsSebastian Luther2010-08-111-25/+0
|
* Implement SlotDict.__repr__() to behave like dict.Zac Medico2010-06-041-0/+3
|
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Define __slots__ in all classes.Zac Medico2010-01-301-0/+8
| | | | svn path=/main/trunk/; revision=15287
* Add OrderedDict class.Zac Medico2009-12-081-0/+26
| | | | svn path=/main/trunk/; revision=14967
* Use dict.__iter__ instead of keys(), since it behaves identically in pythonZac Medico2009-09-241-2/+2
| | | | | | 2 and 3. svn path=/main/trunk/; revision=14412
* Optimize SlotDict.iteritems() a little.Zac Medico2009-09-221-1/+2
| | | | svn path=/main/trunk/; revision=14391
* Make SlotDict use call self.iteritems() where appropriate since it implementsZac Medico2009-09-221-5/+5
| | | | | | that method even when running in python 3.x. svn path=/main/trunk/; revision=14390
* Replace dict.keys() usage with __iter__(), since it behaves identically inZac Medico2009-09-221-2/+2
| | | | | | both python 2.x and 3.x. svn path=/main/trunk/; revision=14382
* Use next(iterator) instead of iterator.next() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-211-2/+2
| | | | | | (2to3-3.1 -f next -nw ${FILES}) svn path=/main/trunk/; revision=14355
* Fix infinite recursion in items and values methods.Zac Medico2009-09-211-4/+4
| | | | svn path=/main/trunk/; revision=14328
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-17/+17
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Initialize UserDict.data in the constructor.Zac Medico2009-03-101-0/+2
| | | | svn path=/main/trunk/; revision=12816
* Make the first argument of update() methods be an optional positional argumentZac Medico2009-03-051-2/+16
| | | | | | instead of a keyword argument. svn path=/main/trunk/; revision=12755
* Make the UserDict and LazyItemsDict constructors use an optional positionalZac Medico2009-02-211-4/+10
| | | | | | argument instead of a keyword argument. svn path=/main/trunk/; revision=12674
* Fix update() methods to work with python-3.0.Zac Medico2009-02-191-8/+24
| | | | svn path=/main/trunk/; revision=12647
* Fix classes that implement __iter__() to copy it to their keys() methodZac Medico2009-02-191-0/+9
| | | | | | when running under >=python-3.0. svn path=/main/trunk/; revision=12632
* Implement UserDict.__contains__() and __iter__().Zac Medico2009-02-191-0/+6
| | | | svn path=/main/trunk/; revision=12630
* Implement a substitute for UserDict.UserDict so that code converted viaZac Medico2009-02-191-2/+38
| | | | | | | | 2to3 will run: http://bugs.python.org/issue2876 svn path=/main/trunk/; revision=12629
* In python-3.0, the UserDict.DictMixin class has been replaced byZac Medico2009-02-191-23/+123
| | | | | | | | | | | | | Mapping and MutableMapping from the collections module, but 2to3 doesn't currently account for this change: http://bugs.python.org/issue2876 As a workaround for the above issue, implement Mapping and MutableMapping classes as substitutes for UserDict.DictMixin so that code converted via 2to3 will run. svn path=/main/trunk/; revision=12628
* For python-3.0 compatibility, make dict-like classes modify their keys(),Zac Medico2009-02-041-0/+14
| | | | | | items(), and values() methods appropriatly for the current python version. svn path=/main/trunk/; revision=12584
* Optimize `emaint` --fix binhost so that it the Packages file isn't re-readZac Medico2008-08-011-0/+3
| | | | | | | and re-written for each package that's updated. Instead, hold a lock for the whole time the command is running and just update it once. svn path=/main/trunk/; revision=11307
* Fix arg count when constructing a TypeError in the SlotDict constructor.Zac Medico2008-07-281-1/+1
| | | | svn path=/main/trunk/; revision=11234
* Create a SlotDict constructor which can take an optional positional arg thatZac Medico2008-07-281-0/+13
| | | | | | | | | is passed to the update() method (similar to the dict constructor), and also pass keyword arguments into the update() method if any are given. This makes it possible to use the constructor similarly to the way that the _emerge.SlotObject constructor is used. svn path=/main/trunk/; revision=11230
* Py3k compatibility patch #6 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-011-1/+10
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10875
* Add a "prefix" keyword parameter to slot_dict_class() which controls theZac Medico2008-07-011-10/+14
| | | | | | | | prefix used when mapping attribute names from keys. Use this to change the syntax from files["foo"] to files.foo (it's fewer characters to look at). svn path=/main/trunk/; revision=10869
* Make PackageIndex use SlotDict for package metadata storage. The set ofZac Medico2008-06-261-5/+6
| | | | | | | | | allowed keys is passed into the PackageIndex constructor (normal dict instances will be used if the set of keys is not passed in for some reason). A SlotDict.allowed_keys attribute now provides access to a frozenset of allowed keys. svn path=/main/trunk/; revision=10797
* Fix typo.Zac Medico2008-06-251-1/+1
| | | | svn path=/main/trunk/; revision=10795
* Add docstring to slot_dict_class().Zac Medico2008-06-251-0/+11
| | | | svn path=/main/trunk/; revision=10794
* Fix typo.Zac Medico2008-06-251-1/+1
| | | | svn path=/main/trunk/; revision=10793
* Fix KeyError constructor style.Zac Medico2008-06-251-1/+1
| | | | svn path=/main/trunk/; revision=10792
* Fix indentation.Zac Medico2008-06-251-1/+1
| | | | svn path=/main/trunk/; revision=10791
* Add a generic portage.cache.mappings.slot_dict_class() function whichZac Medico2008-06-251-0/+126
| | | | | | | | | | generates mapping classes that behave similar to a dict but store values as object attributes that are allocated via __slots__. Instances of these objects have a smaller memory footprint than a normal dict object. These classes are used to reduce the memory footprint of the dbapi.aux_get() caches and the Package.metadata attribute. svn path=/main/trunk/; revision=10790
* Namespace sanitizing, step 1Marius Mauch2007-01-251-0/+103
svn path=/main/trunk/; revision=5778