diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-04-15 16:19:12 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-04-15 16:19:12 +0200 |
| commit | c876c5095673a2f1c0f2c0eef6eadef2ce200e19 (patch) | |
| tree | f0832dbbdeb688e0176294e9b487f996108555ad /python/configuration.cc | |
| parent | 97d985d73d12da5578628418aa787d78a33b652d (diff) | |
| download | python-apt-c876c5095673a2f1c0f2c0eef6eadef2ce200e19.tar.gz | |
* Introduce support for Python 3 (Closes: #523645)
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.
Diffstat (limited to 'python/configuration.cc')
| -rw-r--r-- | python/configuration.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/configuration.cc b/python/configuration.cc index b4adf357..eaac48ec 100644 --- a/python/configuration.cc +++ b/python/configuration.cc @@ -481,7 +481,9 @@ static PyMappingMethods ConfigurationMap = {0,CnfMap,CnfMapSet}; PyTypeObject ConfigurationType = { PyObject_HEAD_INIT(&PyType_Type) + #if PY_MAJOR_VERSION < 3 0, // ob_size + #endif "Configuration", // tp_name sizeof(CppPyObject<Configuration>), // tp_basicsize 0, // tp_itemsize @@ -515,7 +517,9 @@ PyTypeObject ConfigurationType = PyTypeObject ConfigurationPtrType = { PyObject_HEAD_INIT(&PyType_Type) + #if PY_MAJOR_VERSION < 3 0, // ob_size + #endif "ConfigurationPtr", // tp_name sizeof(CppPyObject<Configuration *>), // tp_basicsize 0, // tp_itemsize @@ -549,7 +553,9 @@ PyTypeObject ConfigurationPtrType = PyTypeObject ConfigurationSubType = { PyObject_HEAD_INIT(&PyType_Type) + #if PY_MAJOR_VERSION < 3 0, // ob_size + #endif "ConfigurationSub", // tp_name sizeof(SubConfiguration), // tp_basicsize 0, // tp_itemsize |
