summaryrefslogtreecommitdiff
path: root/apt
AgeCommit message (Collapse)AuthorFilesLines
2009-07-16apt/cache.py: Support apt_pkg.OpProgress() and use ↵Julian Andres Klode1-4/+8
apt.progress.text.OpProgress()
2009-07-16apt/progress/text.py: Introduce new progress classes for text.Julian Andres Klode1-0/+122
These are based on the new classes in apt_pkg and work better, because they correctly clear the screen.
2009-07-12apt/package.py: Adjust AcquireFile() usage to future changes.Julian Andres Klode1-8/+9
The underlying C++ objects of the AcquireFile() objects are currently immortal. This should change at a later stage, to match the behavior of the C++ class. But AcquireItems needs to be fixed first to not segfault anymore.
2009-07-08doc/source/apt_pkg.rst: Update the documentation to reflect the latest changes.Julian Andres Klode1-1/+1
2009-06-22apt/package.py: Do not re-define built-in names, fix small issue in ↵Julian Andres Klode1-21/+25
Version.__eq__()
2009-06-22apt/package.py: Drop Package.get_version() again.Julian Andres Klode1-4/+0
2009-06-22Add apt_pkg.DepCache.mark_auto() and apt.Package.mark_auto() methods toJulian Andres Klode1-0/+13
mark a package as automatically installed.
2009-06-21apt/cache.py: Correctly handle rootdir on second and later invocations of ↵Julian Andres Klode1-0/+4
open() (LP: #320665).
2009-06-21apt/cache.py: Only create _weakrefs, _set once per object.Julian Andres Klode1-3/+5
2009-06-21apt/package.py: Remove duplicated code in Version.fetch_source()Julian Andres Klode1-8/+3
2009-06-15apt/cache.py: Provide broken_count, delete_count, install_count, keep_countJulian Andres Klode1-0/+20
properties (Closes: #532338)
2009-06-15apt/progress/__init__.py: Check for EINTR in select (Closes: #499296)Julian Andres Klode1-1/+7
2009-06-14apt/package.py: Return VersionList objects in Package.versions.Julian Andres Klode1-9/+84
VersionList objects provide the same features as sequences (they are even derived from collections.Sequence in Python 2.6 and newer), but also provide a mapping like interface. They are also more efficient than lists because Version objects are only created when they are accessed.
2009-06-14apt/package.py: Re-add Package.markedInstallJulian Andres Klode1-0/+1
2009-06-12apt/progress.py: Extract the package name from the status message (Closes: ↵Julian Andres Klode1-4/+7
#532660)
2009-06-09apt/package.py: Use destfile instead of dest_file.Julian Andres Klode1-2/+2
2009-06-08merge with mvojak@debian.org1-0/+20
2009-06-05apt/package.py: Add Package.get_version() which returns a Version instanceJulian Andres Klode1-0/+7
for the given version string or None (Closes: #523998)
2009-06-05apt/cache.py: Introduce Cache.actiongroup()Julian Andres Klode1-0/+21
This is a short function which creates an actiongroup on the current depcache.
2009-06-05python/progress.cc, apt/progress/*.py: Use PEP 8 naming conventions for progressJulian Andres Klode3-67/+120
This changes the progress classes to use PEP 8 names. Due to the concept of the deprecation system, this causes methods of subclasses not to be called at all. If a class implements a command with underscores, it is called. If the class also implements the version in mixedCase, this is ignored. This means that all subclasses will not work correctly, because only the method from the parent class is called.
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode2-7/+7
2009-06-04apt, aptsources, doc: Update to use the new names.Julian Andres Klode7-181/+183
2009-05-31Do not store the the Deb path and package name as an attribute of the ↵Sebastian Heinlein1-3/+1
progress class. Furthermore allow to specify more than one file.
2009-05-31Extract the package name from the status messageSebastian Heinlein1-1/+2
2009-05-05* apt/progress/__init__.py:Michael Vogt1-0/+20
- add update_status_full() that takes file_size/partial_size as additional callback arguments - add pulse_items() that takes a addtional "items" tuple that gives the user full access to the individual items that are fetched * python/progress.cc: - low level code for update_status_full and pulse_items()
2009-04-19* Update the code to use the new classes.Julian Andres Klode4-26/+26
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 Klode2-120/+148
2009-04-17* apt/deprecation.py: Add deprecated_args()Julian Andres Klode1-4/+34
The function deprecated_args() is used in case a function name is kept, but the function previously had parameters in mixedCase names.
2009-04-16* apt/*.py: Initial rename work for Bug#481061Julian Andres Klode7-105/+264
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-15* apt/cache.py: Use set() and WeakValueDictionary() for holding packages.Julian Andres Klode1-15/+23
Only create Package objects when they are requested, do not keep them in a dict. Saves 10MB for 25,000 packages on my machine. The set holds the names of all packages which have at least one version, and the WeakValueDictionary() holds weak references to created Package objects. This way accessing the same package two times should return the same object, kept by the WeakValueDictionary().
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 Klode2-7/+7
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-10Add Package.get_version() which returns a Version instance for the given ↵Sebastian Heinlein1-0/+7
version string or None
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 Klode7-23/+38
- 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-08apt/cache.py: If no progress is given for cache open, use OpProgress.Julian Andres Klode1-5/+5
Also fix doc/examples/records.py to use Package.candidate.*
2009-03-08* setup.py: Remove apt.gtk, add apt.progressJulian Andres Klode1-2/+4
2009-03-08* Merge with mvoJulian Andres Klode2-95/+95
2009-03-08* apt/cache.py, apt/package.py: Fix some bugs.Julian Andres Klode2-3/+5
2009-03-08* apt/progress/: New package, replaces apt.progress and apt.gtkJulian Andres Klode3-0/+0
- apt/progress/gtk2.py: Moved here from apt/gtk/widgets.py - apt/progress/__init__.py: Move here from apt/progress.py