summaryrefslogtreecommitdiff
path: root/python/acquire.cc
AgeCommit message (Collapse)AuthorFilesLines
2009-06-21python/acquire.cc, python/indexfile.cc: Do not delete the pointers for some ↵Julian Andres Klode1-1/+3
objects. We can not delete the AcquireFile object's pointer on deallocation because this would cause the item to be removed from the fetcher, which would be incompatible to the previous behaviour. We can not delete the IndexFile object's pointer on deallocation because it is managed by other objects like MetaIndex.
2009-06-21python: Add DeprecationWarning to functions which were replaced by classes.Julian Andres Klode1-0/+5
2009-06-12Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149)Julian Andres Klode1-4/+4
We previously called the destructor of the pointer. This resulted in no object using pointers being deallocated. This patch introduces CppDeallocPtr() and CppOwnedDeallocPtr() which do the same as the other CppDealloc() and CppOwnedDealloc(), but use 'delete' on the pointer instead of the deconstructor. Furthermore, this patch also changes AcquireFile to be a CppOwnedPyObject, owned by the Acquire object. Without this change, deleting the Acquire object would cause a crash when AcquireFile is deallocated.
2009-06-09Allow types providing __new__() to be subclassed.Julian Andres Klode1-2/+4
2009-06-05python/acquire.cc(AcquireItemType): Use "apt_pkg.AcquireItem" as tp_nameJulian Andres Klode1-1/+1
2009-06-05python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7.Julian Andres Klode1-1/+4
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode1-5/+5
2009-06-04python/: Unify naming conventions for all new names.Julian Andres Klode1-4/+4
Unify all names to follow these rules: 1. Replace the first [A-Z] with the lowercase version [a-z] 2. Replace multiple [A-Z] with [A-Z][a-z] (one upper, remaining ones lowercase) 3. Replace all remaining [A-Z] with _[a-z] This brings us from 'FileName' to 'file_name' and from 'DescURI' to 'desc_uri'. We will at a later stage add some exceptions to this rule, like 'filename' instead of 'file_name', to improve readability.
2009-06-03python/: Convert most names to PEP8 naming conventions (except ↵Julian Andres Klode1-0/+29
Version,PackageFile,MetaIndex). On our way to close Bug#481061, this converts almost all names to PEP 8 naming conventions. Missing are now apt_pkg.Version, apt_pkg.PackageFile, apt_pkg.MetaIndex and apt.progress.*. In case of the missing apt_pkg classes, they are not converted yet because they do not use getset descriptors yet. apt.progress.* has not been converted yet because the extension interacts with it, and we first need to modify the extension to recognize the new names, as well as the old names (old applications shouldn't break).
2009-04-24* python/*.cc: Fix build failures with python2.4-dbg.Julian Andres Klode1-2/+2
2009-04-19* python/*.cc: Export all types and add a __new__() method to them.Julian Andres Klode1-21/+98
Some names may be changed before the release, but this is a good draft.
2009-04-15* python: Port AcquireItem,Package,Description to GetSetJulian Andres Klode1-41/+61
2009-04-15* Introduce support for Python 3 (Closes: #523645)Julian Andres Klode1-0/+6
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* python/acquire.cc: Use tp_methods and tp_getset for PkgAcquireTypeJulian Andres Klode1-35/+61
2009-04-14* python/acquire.cc, python/sourcelist.cc: Type cleanupJulian Andres Klode1-18/+1
Use GetSet for PkgSourceListType and remove tp_getattr from PkgAcquireFileType.
2009-01-11Merge Ben Finney's whitespace changes (Closes: #481563)Julian Andres Klode1-19/+19
2008-11-07python/acquire.cc (GetPkgAcqFile): Support DestDir and DestFilename.Michael Vogt1-4/+8
2008-05-16Remove trailing whitespace.Ben Finney1-19/+19
2005-12-07* make pkgAcqFile use the old interface so that we don't depend on a new apt ↵Michael Vogt1-8/+4
and still work with breezys apt
2005-12-06* bugfix in the acquire.FetchNeeded codeMichael Vogt1-3/+3
2005-12-01* fix uninitialized size member in pkgAcqFileMichael Vogt1-1/+1
2005-12-01* pkgAcqFile wrapper addedMichael Vogt1-0/+67
2005-11-28* rewrote the cache.commit() code to make use of the new ↵Michael Vogt1-3/+4
pkgAcquire/pkgPackageManager interface
2005-11-22* fixes in the acquire interface code (use CppPyObject with pkgAcquire* ↵Michael Vogt1-15/+14
directly instead of using a PkgAcquireStruct)
2005-11-22* fix in the pkgmanager.cc code (/me needs to be hit with a clue-stick)Michael Vogt1-2/+6
2005-11-18* added stat constants to the acquire-item interfaceMichael Vogt1-0/+12
2005-11-18* support for the pkgAcquire::ItemIterator added Michael Vogt1-0/+75
2005-11-18* acquire interface works with progress reporting nowMichael Vogt1-1/+15
2005-11-18* basic pkgAcquire + pkgPackageManager support addedMichael Vogt1-0/+106