summaryrefslogtreecommitdiff
path: root/python/cache.cc
AgeCommit message (Collapse)AuthorFilesLines
2011-04-05Add an 'is_multi_arch' attribute to apt_pkg.Cache Julian Andres Klode1-0/+7
2011-04-04* python/cache.cc:Julian Andres Klode1-1/+30
- Add Package.get_fullname() and Package.architecture
2010-08-31python/cache.cc: revert docstring changeMichael Vogt1-2/+3
2010-08-27python/cache.cc: improve documentationMichael Vogt1-2/+3
2010-08-27python/cache.cc: doc update for provides_listMichael Vogt1-3/+2
2010-04-21python: Commit documentation changes suggested by debian-l10n-english.Julian Andres Klode1-32/+39
2010-04-21python/cache.cc: Add Package.has_provides to see which packages are provided ↵Julian Andres Klode1-0/+8
at least once.
2010-04-21Add rich compare methods to the Version object.Julian Andres Klode1-1/+20
2010-04-21Add Package.has_versions to see which packages have at least one version.Julian Andres Klode1-0/+9
2010-04-01python: Document every class, function, property.Julian Andres Klode1-72/+208
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-8/+8
2010-04-01Fix PackageFile.not_automatic to use NotAutomatic instead of NotSource.Julian Andres Klode1-1/+1
2010-03-31* python/cache.cc:Julian Andres Klode1-1/+2
- Check that 2nd argument to Cache.update() really is a SourceList object.
2010-02-27* python:Julian Andres Klode1-82/+6
- Handle deprecated attributes and methods in the tp_gettattro slot, this allows us to easily warn if a deprecated function is used.
2010-02-27* python/cache.cc:Julian Andres Klode1-5/+22
- Implement Cache.__len__() and Cache.__contains__() (Closes: #571443).
2010-01-27Merge the CppOwnedPyObject C++ class into CppPyObject.Julian Andres Klode1-57/+57
2010-01-15Merge 0.7.13.5 pre.Julian Andres Klode1-11/+26
2010-01-13* python/cache.cc:Michael Vogt1-11/+16
- add UntranslatedDepType attribute to DependencyType - add DepTypeEnum that returns a value from {DepDepends, DepPreDepends, ...} * python/apt_pkgmodule.cc: - add DepDpkgBreaks, DepEnhances constants * doc/source/apt_pkg/{cache.rst, index.rst}: - update documentation as well
2009-08-21Merge 0.7.13.0 from unstable.Julian Andres Klode1-2/+3
2009-08-21python/cache.cc: Set default pulseInterval to 0 (matches apt-pkg's default).Julian Andres Klode1-1/+1
2009-08-19* apt/cache.py, python/cache.cc:Michael Vogt1-2/+3
- add optional pulseIntevall option to "update()" * po/python-apt.pot: - refreshed
2009-07-31python: Remove the progress classes in apt_pkg.Julian Andres Klode1-6/+0
They have been replaced with apt.progress.base, so stuff like GTK+ or Qt progress classes can be written using subclassing.
2009-07-30* python/cache.cc:Julian Andres Klode1-1/+1
- Support Breaks, Enhances dependency types (Closes: #416247)
2009-07-24python: Fix some more possible NULL issues.Julian Andres Klode1-2/+4
2009-07-24python/cache.cc: Fix segfault if Pkg->Section == NULL.Julian Andres Klode1-14/+15
2009-07-17python/cache.cc: Only support new OpProgress() objects in apt_pkg.Cache().Julian Andres Klode1-1/+9
2009-07-17python: Use PyString_FromFormat instead of snprintf.Julian Andres Klode1-37/+30
2009-07-13python: No zero-size arrays for char *kwlist[].Julian Andres Klode1-1/+1
2009-07-13python: Rename all PyTypeObject's to conform to PEP 7.Julian Andres Klode1-30/+30
This is the first step towards implementing coding guidelines for the C++ code and providing an usable C++ API.
2009-07-12python/cache.cc: Set NoDelete for Caches, instead of using the wrong dealloc ↵Julian Andres Klode1-1/+3
function.
2009-07-12python/cache.cc: Py_DECREF the CacheFile, so it can be deleted.Julian Andres Klode1-1/+1
2009-06-25python: Use PyVarObject_HEAD_INIT() instead of PyObject_HEAD_INIT().Julian Andres Klode1-36/+9
This is related to PEP 3123 and fixes some compiler warnings.
2009-06-25python: Fix some build warnings.Julian Andres Klode1-5/+4
2009-06-25python/cache.cc: Support unicode objects and str objects in Python 2.Julian Andres Klode1-7/+6
2009-06-22python/cache.cc: Drop apt_pkg.Cache.open() and apt_pkg.Cache.close().Julian Andres Klode1-2/+5
Drop these functions, because they cause segfaults and memory leaks. To replace this functionality, simply create/delete a Cache object. This way, reference counting can work.
2009-06-21python: Make all CppOwnedPyObjects and similar support garbage collection.Julian Andres Klode1-34/+28
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: Add DeprecationWarning to functions which were replaced by classes.Julian Andres Klode1-0/+2
2009-06-21python/cache.cc: Give more information on TypeErrors in CacheMapOpJulian Andres Klode1-1/+3
2009-06-15Add support for Enhances as a dependency type (Closes: #416247)Julian Andres Klode1-1/+1
2009-06-14python/cache.cc,depcache.cc: Do not delete the depcache and cache pointers.Julian Andres Klode1-1/+3
Deleting the pointers caused a crash because those pointers will also be deleted by closing the cache file.
2009-06-12Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149)Julian Andres Klode1-2/+2
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-1/+2
2009-06-09python/cache.cc: Fix segfaults using the new allocation methods.Julian Andres Klode1-1/+19
We switched to using tp_alloc() to create new objects. Some types had no tp_flags set and were not initialized using PyType_Ready, causing tp_alloc (PyType_GenericAlloc) to crash.
2009-06-05python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7.Julian Andres Klode1-1/+2
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode1-1/+1
2009-06-04python/cache.cc: Remove some (char*) to make migrate-0.8.py work again.Julian Andres Klode1-13/+13
2009-06-04python/: Unify naming conventions for all new names.Julian Andres Klode1-15/+15
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-04python/cache.cc, python/metaindex.cc: Convert remaining stuff to getset ↵Julian Andres Klode1-118/+278
descriptors.
2009-06-03python/: Convert most names to PEP8 naming conventions (except ↵Julian Andres Klode1-1/+48
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-1/+1