summaryrefslogtreecommitdiff
path: root/python/pkgrecords.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-06-01revert commit 346 (this re-enable the deprecation warnings)Michael Vogt1-4/+3
2010-06-01* merge from debian bzr, remaining changes:Michael Vogt1-17/+43
- different mirror list * data/templates/gNewSense.info.in, data/templates/gNewSense.mirrors: - add gNewSense template and mirrors, thanks to Karl Goetz * apt/cache.py: - Make Cache.get_changes() much (~35x) faster (Closes: #578074). - Make Cache.req_reinstall_pkgs much faster as well. - Make Cache.get_providing_packages() about 1000 times faster. - Use has_versions and has_provides from apt_pkg.Package where possible. * apt/package.py: - Decode using utf-8 in installed_files (LP: #407953). - Fix fetch_source() to work when source name = binary name (LP: #552400). - Merge a patch from Sebastian Heinlein to make get_changelog() only check sources where source version >= binary version (Closes: #581831). - Add Version.source_version and enhance Sebastian's patch to make use of it, in order to find the best changelog for the package. * python: - Return bool instead of int to Python where possible, looks better. - Document every class, function, property. * python/cache.cc: - Check that 2nd argument to Cache.update() really is a SourceList object. - Fix PackageFile.not_automatic to use NotAutomatic instead of NotSource. - Add Package.has_versions to see which packages have at least one version, and Package.has_provides for provides. - Add rich compare methods to the Version object. * python/generic.cc: - Fix a memory leak when using old attribute names. - Map ArchiveURI property to archive_uri * python/progress.cc: - Do not pass arguments to InstallProgress.wait_child(). * doc: - Update the long documentation. * debian/control: - Change priority to standard, keep -doc and -dev on optional. * utils/migrate-0.8.py: - Open files in universal newline support and pass filename to ast.parse. - Add has_key to the list of deprecated functions. - Don't abort if parsing failed. - do not require files to end in .py if they are passed on the command line or if they contain python somewhere in the shebang line. * apt/cache.py: - make cache open silent by default (use apt.progress.base.OpProgress) * tests/data/aptsources_ports/sources.list: - fix ports test-data * tests/test_apt_cache.py: - add simple test for basic cache/dependency iteration
2010-04-01python: Document every class, function, property.Julian Andres Klode1-16/+42
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-1/+1
2010-03-29If PYTHON_APT_DEPRECATION_WARNINGS is unset, also disable theJulian Andres Klode1-3/+4
deprecation warnings in apt_pkg directly; and don't just disable any deprecation warning in apt/__init__.py (LP: #548623)
2010-02-27* python:Julian Andres Klode1-18/+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-5/+5
2009-07-13python: Rename all PyTypeObject's to conform to PEP 7.Julian Andres Klode1-4/+4
This is the first step towards implementing coding guidelines for the C++ code and providing an usable C++ API.
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-21python: Make all CppOwnedPyObjects and similar support garbage collection.Julian Andres Klode1-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-21python: Add DeprecationWarning to functions which were replaced by classes.Julian Andres Klode1-0/+3
2009-06-09Allow types providing __new__() to be subclassed.Julian Andres Klode1-1/+2
2009-06-05python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7.Julian Andres Klode1-2/+2
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode1-1/+1
2009-06-04python/: Unify naming conventions for all new names.Julian Andres Klode1-8/+8
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/+17
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-7/+24
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-15* python/pkgrecords.cc: Use GetSet for PkgRecordsTypeJulian Andres Klode1-36/+93
2009-01-11* Add support for PkgRecords.SHA256Hash (Closes: #456113)Julian Andres Klode1-0/+2
2008-05-16Remove trailing whitespace.Ben Finney1-9/+9
2008-02-11* python/pkgrecords.cc:Michael Vogt1-0/+2
- export the Homepage field
2007-05-23* python/pkgrecords.cc:Michael Vogt1-0/+2
- added SourceVer
2006-12-19* python/pkgrecords.cc:Michael Vogt1-0/+2
- export SHA1Sum() as well * debian/changelog: - updated
2006-03-22* fixes for the pkgSrcRecords codeMichael Vogt1-1/+1
2006-01-24* added pkgRecords.RecordMichael Vogt1-0/+6
2005-11-18* basic pkgAcquire + pkgPackageManager support addedMichael Vogt1-9/+1
2005-05-04* more tests addedMichael Vogt1-2/+3
* tests/cache.py: - test that iterates over all the cache and dependencies * tests/pkgrecords.py - test that iterates over all the pkgrecords * python/cache.cc - added a comment * python/pkgrecords.cc - return "True" from pkgRecord.Lookup() (to make it consistent with the PkgSrcRecords object)
2004-11-24Fix g++-3.0 compilation issuesArch Librarian1-26/+25
Author: mdz Date: 2002-02-26 01:36:15 GMT Fix g++-3.0 compilation issues
2004-11-24Changed include pathsArch Librarian1-2/+2
Author: jgg Date: 2002-01-08 06:53:04 GMT Changed include paths
2004-11-24Initial revisionArch Librarian1-0/+119
Author: jgg Date: 2001-02-20 06:32:01 GMT Initial revision