summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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 Klode10-9/+29
2009-06-05python/apt_pkgmodule.cc: Fix refcount problem.Julian Andres Klode1-1/+3
2009-06-05doc/source/conf.py: Force compatibility to be off when creating documentation.Julian Andres Klode1-0/+4
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode11-46/+124
2009-06-04apt, aptsources, doc: Update to use the new names.Julian Andres Klode16-529/+531
2009-06-04python/apt_pkgmodule.cc: Make sure all types are ready.Julian Andres Klode1-18/+1
2009-06-04python/cache.cc: Remove some (char*) to make migrate-0.8.py work again.Julian Andres Klode1-13/+13
2009-06-04utils/migrate-0.8.py: Handle constants in the apt_pkg extension.Julian Andres Klode1-0/+14
2009-06-04python/: Unify naming conventions for all new names.Julian Andres Klode8-60/+60
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 Klode2-170/+356
descriptors.
2009-06-03python/apt_pkgmodule.cc: Rename STATE_* constants.Julian Andres Klode1-15/+15
2009-06-03utils/migrate-0.8.py: Fix function detection.Julian Andres Klode1-1/+8
2009-06-03python/: Convert most names to PEP8 naming conventions (except ↵Julian Andres Klode13-22/+329
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-05-18* debian/python-apt.doc-base: register the documentation with the doc-base ↵Stefano Zacchiroli2-0/+16
system (Closes: #525134)
2009-04-24* debian/rules: Support multiple PY3K versions.Julian Andres Klode1-16/+25
Introduce PY3K_VERSIONS, a list of all py3k versions the package should be built for. The default is to build for the currently installed versions. Introduce 2TO3_VERSION to select a 2to3 version which will convert the python code to python 3. Points to the latest version by default.
2009-04-24* python/*.cc: Fix build failures with python2.4-dbg.Julian Andres Klode5-9/+9
2009-04-24* debian/control: Do not require python >= 2.5, mistake in previous commit.Julian Andres Klode1-1/+1
2009-04-24* utils/migrate-0.8.py: Add a warning that there may be false positives.Julian Andres Klode1-4/+5
2009-04-24* utils/migrate-0.8.py: Correctly import modules, improve attribute detectionJulian Andres Klode1-5/+7
In order to import modules from a package, 'fromlist' may not be empty. Therefore, we pass ['*'] now. When attributes where checked, we just checked their names and did not check their classes. This meant that in e.g. Compat-API: A.alpha, B.alpha Clean-API: A.alpha The attribute 'alpha' would not be considered deprecated because it is provided by A.alpha. Now we treat an 'alpha' attribute as deprecated, if at least one class loses it.
2009-04-24* utils/migrate-0.8.py: Fix detection of functions, methods and attributes.Julian Andres Klode1-1/+1
There was a problem in find_deprecated_cpp() which added '.' to the module-level functions. Caused by a missing 'not'.
2009-04-20* utils/migrate-0.8.py: Handle attributes specially, reduces false positives.Julian Andres Klode1-4/+9
We now prefix attributes with ., so we do not match global variable names when checking. This should reduce the number of false positives in some applications.
2009-04-20* utils/migrate-0.8.py: Helper to check Python code for deprecated ↵Julian Andres Klode2-0/+197
functions, attributes, etc. Has to be run from the python-apt source tree, but can be used for all Python code using python-apt. The output may not be completely correct, but false positives are better than not checking the code.
2009-04-19* doc: Update the documentation to the current state.Julian Andres Klode6-961/+968
2009-04-19* Update the code to use the new classes.Julian Andres Klode30-88/+88
2009-04-19ActionGroups can be used as a context manager for the 'with' statement.Julian Andres Klode2-5/+28
2009-04-19* python/*.cc: Export all types and add a __new__() method to them.Julian Andres Klode14-174/+519
Some names may be changed before the release, but this is a good draft.
2009-04-17* python/apt_pkgmodule.cc: Do not access the modules __dict__.Julian Andres Klode1-60/+44
Instead of accessing the modules __dict__ directly, we should use the functions provided by Python to add objects to the module.
2009-04-17* python/generic.h: Force 0.7 compatibility to be off in Python 3 buildsJulian Andres Klode1-0/+2
2009-04-17* doc: Update the documentation to use the new names.Julian Andres Klode3-8/+8
2009-04-17* apt/package.py: Where possible, derive apt.package.Record from ↵Julian Andres Klode2-2/+14
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* python/cache.cc: Correct the 'Auto' descriptor of the Package class.Julian Andres Klode1-1/+1
2009-04-16* apt/*.py: Initial rename work for Bug#481061Julian Andres Klode13-112/+290
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-15python-apt (0.7.90) experimental; urgency=lowJulian Andres Klode34-701/+1749
* Introduce support for Python 3 (Closes: #523645) * Support the 'in' operator (e.g. "k in d") in Configuration{,Ptr,Sub} objects (e.g. apt_pkg.Config) and in TagSections (apt_pkg.ParseSection()) * Replace support for file objects with a more generic support for any object providing a fileno() method and for file descriptors (integers). * Add support for the Breaks fields * Only create Package objects when they are requested, do not keep them in a dict. Saves 10MB for 25,000 packages on my machine. * apt/package.py: Allow to set the candidate of a package (Closes: #523997) - Support assignments to the 'candidate' property of Package objects. - Initial patch by Sebastian Heinlein -- Julian Andres Klode <jak@debian.org> Wed, 15 Apr 2009 13:47:42 +0200
2009-04-15* Upload as 0.7.90 to experimentalJulian Andres Klode4-14/+14
This is the first pre-release of python-apt 0.8. It is completely backward compatible (even on Python 3), API changes will appear in 0.7.91.
2009-04-15* debian/rules: Fix building.Julian Andres Klode1-4/+4
2009-04-15* python: Port AcquireItem,Package,Description to GetSetJulian Andres Klode4-118/+188
2009-04-15* apt/package.py: Allow to set the candidate of a package (Closes: #523997)Julian Andres Klode2-1/+15
- 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 Klode22-33/+307
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* python/pkgrecords.cc: Use GetSet for PkgRecordsTypeJulian Andres Klode2-36/+94
2009-04-15* apt/cache.py: Use set() and WeakValueDictionary() for holding packages.Julian Andres Klode2-16/+26
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* python/pkgsrcrecords.cc: Use GetSet properties for PkgSrcRecordsTypeJulian Andres Klode3-61/+119
This time, it is a bit more complicated because we have to raise an AttributeError when no package has been looked up.
2009-04-14* python/pkgmanager.cc: Use tp_methods and tp_getset for PkgManagerTypeJulian Andres Klode2-18/+35
2009-04-14* python/indexfile.cc: Use tp_methods and tp_getset for PackageIndexFileTypeJulian Andres Klode2-25/+53
2009-04-14* python/acquire.cc: Use tp_methods and tp_getset for PkgAcquireTypeJulian Andres Klode2-35/+62
2009-04-14* python/depcache.cc: Use tp_methods and tp_getset for PkgDepCacheTypeJulian Andres Klode2-28/+50
2009-04-14* python/cache.cc: Add tp_getset and tp_methods to DependencyType.Julian Andres Klode2-24/+74