summaryrefslogtreecommitdiff
path: root/python/configuration.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-10-08apt_pkg: Support paths supplied as bytes objects (See: #680971)Julian Andres Klode1-6/+6
We should be done now. DO NOT MERGE
2012-06-17* python/configuration.cc:Julian Andres Klode1-2/+5
- Handle the use of "del" on configuration values. Those are represented by calling the setter with NULL, which we did not handle before, causing a segmentation fault (Closes: #661062)
2011-11-10fix build against apt in experimentalMichael Vogt1-1/+1
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.
2011-04-11apt_pkg: Raise error when parse_commandline gets empty argv (LP: #707416)Julian Andres Klode1-0/+4
2010-09-13python/configuration.cc: fix typo in doc stringMichael Vogt1-1/+1
2010-07-29* python/configuration.cc:Michael Vogt1-1/+16
- add binding for the "dump()" method to configruation objects
2010-04-21python: Commit documentation changes suggested by debian-l10n-english.Julian Andres Klode1-16/+25
2010-04-01python: Document every class, function, property.Julian Andres Klode1-24/+95
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-2/+2
2010-02-27* python:Julian Andres Klode1-15/+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-02Remove inline functions from the C++ API, export them instead (part 2).Julian Andres Klode1-4/+4
2010-01-27Merge the CppOwnedPyObject C++ class into CppPyObject.Julian Andres Klode1-4/+4
2009-07-31python/configuration.cc, apt_pkgmodule.cc: Fix Configuration segfaults.Julian Andres Klode1-1/+3
In apt_pkgmodule, change the type to Configuration*. In configuration.cc, check that GetSelf(Self).Tree(0) != 0 before doing GetSelf(Self).Tree(0)->Parent.
2009-07-23python/configuration: Hack-in unicode character support in parse_commandline().Julian Andres Klode1-0/+4
2009-07-14python/configuration.cc: Unify all ↵Julian Andres Klode1-108/+8
Configuration,ConfigurationPtr,ConfigurationSub into one type. This makes the whole API easier. The disadvantage is that we require 8 bytes (??) more per object for the owner object pointer, which is NULL for most cases (the only exception being objects created by Configuration.sub_tree).
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-8/+8
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-12/+3
This is related to PEP 3123 and fixes some compiler warnings.
2009-06-23python/configuration.cc: Make ConfigurationPtr,ConfigurationSub subclasses ↵Julian Andres Klode1-0/+6
of Configuration. This makes isinstance(apt_pkg.config, apt_pkg.Configuration) return True instead of False.
2009-06-09Allow types providing __new__() to be subclassed.Julian Andres Klode1-1/+2
2009-06-08python/generic.h,tag.cc,configuration.cc: Use tp_alloc/tp_free instead of ↵Julian Andres Klode1-1/+2
PyObject_NEW/DEL This allows us to finally implement subclassing. Previously deletion of an instance of a subclass caused segmentation faults, this is not the case anymore.
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-3/+3
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-3/+18
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-3/+20
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/+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* Remove any trailing whitespaceJulian Andres Klode1-9/+9
2009-04-13* python/configuration.cc: Support the 'in' operator for ConfigurationJulian Andres Klode1-15/+55
Support the replacement of mapping.has_key() for Configuration,ConfigurationPtr and ConfigurationSub objects. This is implemented by extending the various types with the tp_as_sequence slot, which refers to a PySequenceMethods containing only this method. The CnfGetAttr() function has been removed and replaced by the use of the tp_method slot. This helps the py3k port because the previously used Py_FindMethod() is not avilable anymore. This completes the support of the 'in' operator in all python-apt objects, which makes it even easier to convert python-apt-using applications to py3k once python-apt supports it, as 2to3 converts 'm.has_key(k)' to 'k in m'. Also finalize the types in apt_pkgmodule.cc and add the new 'key in conf' description to the documentation.
2009-01-29* apt/cache.py:Michael Vogt1-0/+18
- when setting a alternative rootdir, read the config from it as well * python/configuration.cc, python/apt_pkgmodule.cc: - add apt_pkg.ReadConfigDir()
2008-05-16Remove trailing whitespace.Ben Finney1-41/+41
2006-10-04* python/configuration.cc:Michael Vogt1-1/+1
- and the final(!?!) incorrect PyMem_{DEL,Free} usage
2004-11-24Avoid null pointer deref in CnfKeys()Arch Librarian1-2/+4
Author: mdz Date: 2003-06-03 03:22:27 GMT Avoid null pointer deref in CnfKeys()
2004-11-24Fix g++-3.0 compilation issuesArch Librarian1-10/+9
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/+523
Author: jgg Date: 2001-02-20 06:32:01 GMT Initial revision