summaryrefslogtreecommitdiff
path: root/python/indexfile.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-10-08apt_pkg: Support paths supplied as bytes objects (See: #680971)Julian Andres Klode1-2/+2
We should be done now. DO NOT MERGE
2011-04-12apt_pkg: Fix unsigned/long-vs-int issues (LP: #610820)Julian Andres Klode1-1/+1
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-04-01python: Document every class, function, property.Julian Andres Klode1-8/+21
Finally, a complete reference to apt_pkg available via pydoc and __doc__ attributes.
2010-04-01python: Return bool instead of int to Python where possible, looks better.Julian Andres Klode1-3/+3
2010-02-27* python:Julian Andres Klode1-12/+1
- Handle deprecated attributes and methods in the tp_gettattro slot, this allows us to easily warn if a deprecated function is used.
2010-01-27Merge the CppOwnedPyObject C++ class into CppPyObject.Julian Andres Klode1-4/+4
2010-01-20Rename apt_pkg.PackageIndexFile to apt_pkg.IndexFile.Julian Andres Klode1-29/+29
2009-07-24python: Fix some more possible NULL issues.Julian Andres Klode1-1/+3
2009-07-17python: Use PyString_FromFormat instead of snprintf.Julian Andres Klode1-4/+1
2009-07-13python: Rename all PyTypeObject's to conform to PEP 7.Julian Andres Klode1-1/+1
This is the first step towards implementing coding guidelines for the C++ code and providing an usable C++ API.
2009-07-12python/indexfile.cc: Deallocate the pointer correctly.Julian Andres Klode1-2/+2
2009-06-25python: Use PyVarObject_HEAD_INIT() instead of PyObject_HEAD_INIT().Julian Andres Klode1-4/+1
This is related to PEP 3123 and fixes some compiler warnings.
2009-06-25python: Fix some build warnings.Julian Andres Klode1-1/+1
2009-06-21python: Make all CppOwnedPyObjects and similar support garbage collection.Julian Andres Klode1-3/+3
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-21python/acquire.cc, python/indexfile.cc: Do not delete the pointers for some ↵Julian Andres Klode1-2/+2
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-12Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149)Julian Andres Klode1-1/+1
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-03python/: Convert most names to PEP8 naming conventions (except ↵Julian Andres Klode1-0/+11
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-19* python/*.cc: Export all types and add a __new__() method to them.Julian Andres Klode1-1/+1
Some names may be changed before the release, but this is a good draft.
2009-04-15* Introduce support for Python 3 (Closes: #523645)Julian Andres Klode1-0/+2
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/indexfile.cc: Use tp_methods and tp_getset for PackageIndexFileTypeJulian Andres Klode1-25/+52
2008-05-16Remove trailing whitespace.Ben Finney1-6/+6
2007-07-25* apt/package.py:Michael Vogt1-1/+1
* apt/cache.py: * python/indexfile.cc: - increase str buffer in PackageIndexFileRepr
2006-03-22* added indexFile.ArchiveURI(string)Michael Vogt1-2/+18
2006-01-04* added support for pkgIndexFileMichael Vogt1-0/+76