Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2015-06-10 | Acquire: Document that items may have transient errors on run() success | Julian Andres Klode | 1 | -4/+5 | |
If run() succeeded, items may still have transient errors, like a Not Found error. Closes: #680997 | |||||
2013-09-11 | Remove old API compatibility C++ support code | Julian Andres Klode | 1 | -8/+0 | |
2012-06-19 | python/acquire.cc: Use pkgAcquire::Setup() to setup the acquire class | Julian Andres Klode | 1 | -5/+4 | |
and handle errors from this (Closes: #629624) | |||||
2011-04-12 | apt_pkg: Fix unsigned/long-vs-int issues (LP: #610820) | Julian Andres Klode | 1 | -7/+7 | |
This fix is large, but simple in concept. Instead of relying on Py_BuildValue and type signatures, or type-specific conversion functions, create a new set of overloaded MkPyNumber() functions that automatically do the right thing for each numerical type. | |||||
2010-08-10 | * python/acquire.cc: | Michael Vogt | 1 | -3/+3 | |
- return long long when calling TotalNeeded(), FetchNeeded() and PartialPresent() from pkgAcquire(). This follows the change in libapt. | |||||
2010-04-21 | python: Commit documentation changes suggested by debian-l10n-english. | Julian Andres Klode | 1 | -21/+29 | |
2010-04-01 | python: Document every class, function, property. | Julian Andres Klode | 1 | -22/+46 | |
Finally, a complete reference to apt_pkg available via pydoc and __doc__ attributes. | |||||
2010-02-27 | * python: | Julian Andres Klode | 1 | -11/+1 | |
- Handle deprecated attributes and methods in the tp_gettattro slot, this allows us to easily warn if a deprecated function is used. | |||||
2010-02-02 | python: Update PyAcquire_FromCpp to the new API rules (add Owner parameter). | Julian Andres Klode | 1 | -2/+2 | |
2010-02-02 | Remove inline functions from the C++ API, export them instead (part 2). | Julian Andres Klode | 1 | -1/+1 | |
2010-01-27 | Merge the CppOwnedPyObject C++ class into CppPyObject. | Julian Andres Klode | 1 | -12/+12 | |
2010-01-27 | Drop the segfault prevention measures from the Acquire code, as they fail | Julian Andres Klode | 1 | -92/+32 | |
to work. A replacement will be added once destruction callbacks are added in APT. | |||||
2010-01-23 | python: Export a PyAcquire_FromCpp which sets up a correct PyAcquireObject. | Julian Andres Klode | 1 | -0/+11 | |
2009-07-24 | python/apt_pkgmodule.cc: Move all constants here. | Julian Andres Klode | 1 | -19/+0 | |
Now the constants are accessible from the types, and not only from instances. | |||||
2009-07-24 | python/acquire.cc: Adjust coding style. | Julian Andres Klode | 1 | -212/+234 | |
There were two different coding styles in this file, which was a bit confusing. | |||||
2009-07-22 | python: 2nd part of the acquire fixes (one PyObject per C++ object). | Julian Andres Klode | 1 | -31/+32 | |
2009-07-22 | python: First step of fixing acquire stuff. | Julian Andres Klode | 1 | -313/+43 | |
Basically, we only want to have on PyAcquireItem per pkgAcquire::Item, and one PyAcquireItemDesc per pkgAcquire::ItemDesc. Therefore, we store them so we can return them at a later time. | |||||
2009-07-21 | python/acquire.cc: Hack support for Acquire object created by PyAcquire_FromCpp. | Julian Andres Klode | 1 | -3/+10 | |
2009-07-21 | python/acquire.cc: Replace items vector with item_map. | Julian Andres Klode | 1 | -47/+54 | |
2009-07-17 | python: Use PyString_FromFormat instead of snprintf. | Julian Andres Klode | 1 | -3/+2 | |
2009-07-16 | python/acquire.cc, python/progress.cc: More fixes. | Julian Andres Klode | 1 | -5/+38 | |
2009-07-16 | python/acquire.cc: Add AcquireItem.mode | Julian Andres Klode | 1 | -1/+14 | |
2009-07-16 | python/acquire.cc: Introduce PyAcquireWorker_Type, make ↵ | Julian Andres Klode | 1 | -10/+98 | |
PyAcquireItemDesc_Type contain a pointer. | |||||
2009-07-15 | python/acquire.cc: Add AcquireItemDesc. | Julian Andres Klode | 1 | -1/+72 | |
2009-07-14 | python/acquire.cc: Replace PyAcquireItem_ToCpp with acquireitem_tocpp. | Julian Andres Klode | 1 | -3/+3 | |
2009-07-14 | python/acquire.cc: Check that an owner exists in AcquireItemDealloc. | Julian Andres Klode | 1 | -0/+6 | |
2009-07-13 | python: No zero-size arrays for char *kwlist[]. | Julian Andres Klode | 1 | -1/+1 | |
2009-07-13 | python: Rename all PyTypeObject's to conform to PEP 7. | Julian Andres Klode | 1 | -9/+9 | |
This is the first step towards implementing coding guidelines for the C++ code and providing an usable C++ API. | |||||
2009-07-12 | python/acquire.cc: Fix segmentation faults, introduce PyAcquireObject. | Julian Andres Klode | 1 | -26/+70 | |
Make AcquireItem objects raise ValueError instead of segfaulting when the Acquire() object is shut down or the main object (e.g. AcquireFile) is deallocated. This is implemented by using a vector of the AcquireItem objects, and setting AcquireItem->Object = NULL, when the memory 'Object' previously pointed to is going to be deleted. | |||||
2009-06-25 | python: Use PyVarObject_HEAD_INIT() instead of PyObject_HEAD_INIT(). | Julian Andres Klode | 1 | -13/+4 | |
This is related to PEP 3123 and fixes some compiler warnings. | |||||
2009-06-25 | python: Fix some build warnings. | Julian Andres Klode | 1 | -2/+2 | |
2009-06-23 | python/acquire.cc: Make AcquireFile a subclass of AcquireItem | Julian Andres Klode | 1 | -18/+32 | |
Generalized the code a bit, so we can now access the various attributes of AcquireItem in the AcquireFile (pkgAcqFile is a subclass of pkgAcquire::Item). This will allow us to implement a raw object with a single pointer to an Item later, which we will need for the new progress interface. | |||||
2009-06-21 | python: Make all CppOwnedPyObjects and similar support garbage collection. | Julian Andres Klode | 1 | -3/+4 | |
If you want to subclass apt_pkg.Cache() and create an apt_pkg.DepCache() object in it (e.g. as self.depcache) this is needed because otherwise, Python would not know about the cyclic dependency and refuse to free any of them. This also changes apt_pkg.Cache to the standard deallocation schema, because the underlying CacheFile deletes its pointers automatically on deletion. Thus a second call is not needed. | |||||
2009-06-21 | python/acquire.cc, python/indexfile.cc: Do not delete the pointers for some ↵ | Julian Andres Klode | 1 | -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-21 | python: Add DeprecationWarning to functions which were replaced by classes. | Julian Andres Klode | 1 | -0/+5 | |
2009-06-12 | Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149) | Julian Andres Klode | 1 | -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-09 | Allow types providing __new__() to be subclassed. | Julian Andres Klode | 1 | -2/+4 | |
2009-06-05 | python/acquire.cc(AcquireItemType): Use "apt_pkg.AcquireItem" as tp_name | Julian Andres Klode | 1 | -1/+1 | |
2009-06-05 | python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7. | Julian Andres Klode | 1 | -1/+4 | |
2009-06-05 | Introduce the rename rules formally, and add some exceptions. | Julian Andres Klode | 1 | -5/+5 | |
2009-06-04 | python/: Unify naming conventions for all new names. | Julian Andres Klode | 1 | -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-03 | python/: Convert most names to PEP8 naming conventions (except ↵ | Julian Andres Klode | 1 | -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 Klode | 1 | -2/+2 | |
2009-04-19 | * python/*.cc: Export all types and add a __new__() method to them. | Julian Andres Klode | 1 | -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 GetSet | Julian Andres Klode | 1 | -41/+61 | |
2009-04-15 | * Introduce support for Python 3 (Closes: #523645) | Julian Andres Klode | 1 | -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 PkgAcquireType | Julian Andres Klode | 1 | -35/+61 | |
2009-04-14 | * python/acquire.cc, python/sourcelist.cc: Type cleanup | Julian Andres Klode | 1 | -18/+1 | |
Use GetSet for PkgSourceListType and remove tp_getattr from PkgAcquireFileType. | |||||
2009-01-11 | Merge Ben Finney's whitespace changes (Closes: #481563) | Julian Andres Klode | 1 | -19/+19 | |
2008-11-07 | python/acquire.cc (GetPkgAcqFile): Support DestDir and DestFilename. | Michael Vogt | 1 | -4/+8 | |