summaryrefslogtreecommitdiff
path: root/apt/package.py
AgeCommit message (Collapse)AuthorFilesLines
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode1-5/+5
2009-06-04apt, aptsources, doc: Update to use the new names.Julian Andres Klode1-104/+104
2009-04-19* Update the code to use the new classes.Julian Andres Klode1-11/+11
2009-04-17* apt/package.py: Where possible, derive apt.package.Record from ↵Julian Andres Klode1-1/+12
collections.Mapping. This works on Python 2.6 and newer and enhances the Record class with some new methods on these platforms, e.g. keys().
2009-04-17* apt/package.py: Introduce Version._translated_records.Julian Andres Klode1-5/+9
This new property allows us to get the translated record. This was previously done in 'summary', but because 'description' also uses translated descriptions, the lookup has been moved in this property.
2009-04-17* apt/cache.py, apt/package.py: Rename the remaining arguments and variables.Julian Andres Klode1-45/+47
2009-04-16* apt/*.py: Initial rename work for Bug#481061Julian Andres Klode1-41/+85
A new module, apt.deprecation, is introduced containing functions and classes which assist in the deprecation. The apt_pkg extension gets a new attribute, _COMPAT_0_7 which can be set by defining COMPAT_0_7 at compile time (-DCOMPAT_0_7). The names are changed, and compatibility functions are enabled if bool(apt_pkg._COMPAT_0_7) == True, i.e. if the package has been built with backward compatibility fixes. This commit changes the apt and aptsources packages, the apt_pkg and apt_inst extensions will be the next renames.
2009-04-15* apt/package.py: Allow to set the candidate of a package (Closes: #523997)Julian Andres Klode1-1/+12
- Support assignments to the 'candidate' property of Package objects. - Initial patch by Sebastian Heinlein
2009-04-15* Introduce support for Python 3 (Closes: #523645)Julian Andres Klode1-1/+5
This is the first initial port to Python 3. The API is almost completely identical to the one found in Python 2, except that functions working with binary data require bytes (md5sum,sha1sum,sha256sum,Base64Encode). Using setup3.py to install the modules will not work, because the apt package still has to be converted to Python 3. For the package, we call 2to3-3.1 in debian/rules to do this automatically.
2009-04-14* Remove any trailing whitespaceJulian Andres Klode1-2/+1
2009-04-13* doc: Documentation updatesJulian Andres Klode1-69/+152
Extended the documentation, renamed 'Coding for python-apt' to 'Contributing to python-apt' and other stuff.
2009-04-13* python/tag.cc: Support 'key in mapping' for TagSectionsJulian Andres Klode1-2/+2
Support the replacement of mapping.has_key() for sections, and update the usage in apt/package.py and apt/debfile accordingly. This is implemented by extending the TagSecType with sequence methods, but only settings the contains method there. The TagSecGetAttr() function has been removed and replaced by the use of the tp_methods slot.
2009-04-12apt/package.py: Handle cases where no candidate is available, by returningJulian Andres Klode1-1/+3
None in the candidate property. (Closes: #523801)
2009-04-12apt/package.py: Handle cases where no candidate is available andJulian Andres Klode1-13/+15
one of the deprecated properties (e.g. candidateVersion) is requested. (Closes: #523801)
2009-04-10Allow to change the candidate version of a packageSebastian Heinlein1-0/+6
2009-04-10* apt/package.py(DeprecatedProperty.__get__): Only warn when used on objects.Julian Andres Klode1-4/+5
This makes it easier to use e.g. pydoc,sphinx,pychecker, which use inspect the classes and therefore also have to access the properties.
2009-04-10* apt/package.py(Package.candidateRecord): Fix missing 'd' in 'record'Julian Andres Klode1-1/+1
2009-04-01* Copyright updates: debian/copyright, etc.Julian Andres Klode1-1/+1
- debian/copyright: Switch to machine-interpretable copyright - apt/*.py: Fix the copyright years and comments.
2009-04-01* apt/package.py: Introduce Version.{uri,uris,fetch_binary()}Julian Andres Klode1-9/+107
2009-03-08* Merge with mvoJulian Andres Klode1-92/+90
2009-03-08* apt/cache.py, apt/package.py: Fix some bugs.Julian Andres Klode1-1/+4
2009-03-08* apt/: Adjust modules to use Package.{installed,candidate}.*Julian Andres Klode1-6/+6
2009-03-08* apt/package.py: Introduce the Version classJulian Andres Klode1-222/+328
- Deprecate Package.candidate*() and Package.installed*(), except for installedFiles. - Provide Version.get_source() (LP: #118788)
2009-02-26avoid duplicated internal references of the Package object for _cache, ↵Michael Vogt1-45/+41
_depcache, _records, _list - they add up to ~10mb for the full cache on my test system and all information is available via Package._pcache
2009-01-29apt/package.py: add Origin.not_automaticMichael Vogt1-0/+1
2009-01-26apt/package.py: typo in getdefaulttimeout, add changelog to simple testMichael Vogt1-1/+3
2009-01-26apt/package.py: compatibility with python2.4 (pep 341 missing)Michael Vogt1-51/+54
2009-01-23* apt/package.py:Michael Vogt1-4/+7
- make sure to set the defaulttimeout back to the original value (in getChangelog(), LP: #314212)
2009-01-13* apt/package.py:Michael Vogt1-0/+4
- fix bug in candidateInstalledSize property * aptsources/distinfo.py: - fix too restrictive mirror url check * aptsources/distro.py: - only add nearest_server and server to the mirrors if they are defined
2009-01-09* apt/package.py: Cleanup, move Origin to module-level, enhance RecordJulian Andres Klode1-165/+277
This commit includes multiple changes: First of all, the code has been adjusted to follow PEP 8 and the documentation has been improved. Secondly, the Origin class has been moved out of the Package class into the module, and its __repr__ has been changed. Thirdly, the Record class has been enhances with some new methods, and the attribute containing the string has been removed, as we can reproduce the string using the TagSection in the _rec attribute. The methods added are __contains__(), __iter__(), get() and iteritems(). Fourthly, the method getChangelog() has been fixed in some areas, especially in the exception handling. The method/property installedFiles() is now enclosing its file access into a try/finally block. All the testing code has been moved into a _test() function for now, until the new testing functionality is implemented.
2009-01-09* apt/debfile.py, apt/package.py: Use @propertyJulian Andres Klode1-39/+39
Use @property instead of x = property(x), where x is the function name.
2009-01-09Cleanup: Remove whitespace at the end of line in all python codes.Julian Andres Klode1-19/+19
2009-01-08fix bug in candidateInstalledSize propertyMichael Vogt1-0/+4
2008-12-15* setup.py:Michael Vogt1-2/+5
- build html/ help of the apt and aptsources modules into /usr/share/doc/python-apt/html
2008-11-24merged from the consolidation-bracn (with some modificatins)Michael Vogt1-6/+193
2008-09-18fix typoMichael Vogt1-1/+1
2008-09-18* apt/package.py:Michael Vogt1-1/+2
- do not return None in sourcePackageName (LP: #123062) - add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
2008-08-30Remove logging statement. (Was c&p error from PackageKit)Sebastian Heinlein1-2/+1
2008-08-30Reformat the package description according to the Debian PolicySebastian Heinlein1-12/+28
2008-08-28Fix: not installed files can have installed filesSebastian Heinlein1-2/+0
2008-08-27For emptSebastian Heinlein1-4/+7
2008-08-20Add the installedFiles property to the Package classSebastian Heinlein1-1/+15
2008-08-15Add Package.getChangelog(): returns the changelog as unicodeSebastian Heinlein1-0/+142
2008-08-14Enhance the package description by using line breaks only for abstracts and ↵Sebastian Heinlein1-8/+23
replacing the ASCII art bullets by an unicode dot. This was implemented in several applications e.g. gnome-app-install, update-manager or packagekit. As a side effect it breaks the behavior of those.
2008-07-14* apt/package.py:Michael Vogt1-0/+8
- add "isAutoRemovable()" method
2008-02-11apt/package.py: make the homepage field accessableMichael Vogt1-0/+8
2007-10-01* apt/package.py:Michael Vogt1-1/+1
- fix apt.package.Dependency.relation initialization
2007-06-28* python/package.py:Michael Vogt1-2/+19
- added Record class that can be accessed like a dictionary and return it in candidateRecord and installedRecord (thanks to Alexander Sack for discussing this with me) * doc/examples/records.py: - added example how to use the new Records class
2007-04-02* fix error in invalid unicode handler (LP#99753)Michael Vogt1-1/+1
2007-03-22* use the correct gettext domainMichael Vogt1-1/+3