summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-12-22 14:33:16 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-12-22 14:33:16 +0100
commitb221e38a33871bc7040e457051c38ef222e618e5 (patch)
tree6890fa1e14b92d11cadb4d3c229066c25d530869
parent33dd13058d468772153e3182c7d8b126f1e0f6ba (diff)
parent45100d466f6c392758ff2e490cdfee9aae7e55a7 (diff)
downloadpython-apt-b221e38a33871bc7040e457051c38ef222e618e5.tar.gz
merged from the debian branch
-rw-r--r--debian/changelog29
-rw-r--r--debian/control2
-rw-r--r--python/depcache.cc1
-rw-r--r--python/generic.h4
4 files changed, 25 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog
index 61b9864b..69356be3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,5 @@
-python-apt (0.7.100.1) UNRELEASED; urgency=low
+python-apt (0.7.100.2) UNRELEASED; urgency=low
- * python/generic.h:
- - set Object to NULL in CppDeallocPtr
- * python/depcache.cc:
- - don't run "actiongroup.release()" if the object was already
- deallocated
* apt/progress/text.py:
- only run ioctl for termios.TIOCGWINSZ if the fd is a tty
* apt/debfile.py, tests/test_debfile.py:
@@ -15,7 +10,25 @@ python-apt (0.7.100.1) UNRELEASED; urgency=low
on enter and leave. this should fix the instablity issues
that aptdaemon runs into (LP: #691134)
- -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 07 Dec 2010 13:41:07 +0100
+ -- Michael Vogt <mvo@debian.org> Tue, 07 Dec 2010 13:41:07 +0100
+
+python-apt (0.7.100.1) unstable; urgency=low
+
+ [ Julian Andres Klode ]
+ * python/generic.h: Fix a memory leak (leaking on every unicode string).
+ * debian/control: add Replaces to python-apt-common, python3-apt; to
+ avoid file conflicts with files previously in python-apt (Closes: #605136).
+
+ [ Michael Vogt ]
+ * python/generic.h:
+ - set Object to NULL in CppDeallocPtr
+ * python/depcache.cc:
+ - don't run "actiongroup.release()" if the object was already
+ deallocated
+ * tests/test_apt_cache.py:
+ - fix tests to work if apt compressed indexes are enabled
+
+ -- Julian Andres Klode <jak@debian.org> Sun, 12 Dec 2010 14:30:33 +0100
python-apt (0.7.100) unstable; urgency=low
@@ -78,8 +91,6 @@ python-apt (0.7.98) unstable; urgency=low
- do use PyString_FromFormat(), in python versions below 2.7 it
does not support long long (%llu), use strprintf() from libapt
instead
- * tests/test_apt_cache.py:
- - fix tests to work if apt compressed indexes are enabled
[ Kiwinote ]
* apt/debfile:
diff --git a/debian/control b/debian/control
index 2e5226af..475827e7 100644
--- a/debian/control
+++ b/debian/control
@@ -88,6 +88,7 @@ Architecture: all
Depends: ${misc:Depends}, python | python3
Enhances: python-apt, python3-apt
Breaks: python-apt (<< 0.7.98+nmu1)
+Replaces: python-apt (<< 0.7.98+nmu1)
Description: Python interface to libapt-pkg (locales)
The apt_pkg Python interface will provide full access to the internal
libapt-pkg structures allowing Python programs to easily perform a
@@ -121,6 +122,7 @@ Priority: extra
Architecture: any
Section: debug
Breaks: python-apt (<< 0.7.98+nmu1)
+Replaces: python-apt (<< 0.7.98+nmu1)
Depends: python3-dbg, python3-apt (= ${binary:Version}), ${shlibs:Depends},
${misc:Depends}
Description: Python 3 interface to libapt-pkg (debug extension)
diff --git a/python/depcache.cc b/python/depcache.cc
index a84eb615..cfa4f5d6 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -1000,7 +1000,6 @@ static PyObject *PkgActionGroupExit(PyObject *Self,PyObject *Args) {
pkgDepCache::ActionGroup *ag = GetCpp<pkgDepCache::ActionGroup*>(Self);
if (ag != NULL)
ag->release();
- Py_DECREF(Self);
Py_RETURN_FALSE;
}
diff --git a/python/generic.h b/python/generic.h
index 7abf7e7a..ce9e5091 100644
--- a/python/generic.h
+++ b/python/generic.h
@@ -79,7 +79,9 @@ typedef int Py_ssize_t;
static inline const char *PyUnicode_AsString(PyObject *op) {
// Convert to bytes object, using the default encoding.
- PyObject *bytes = PyUnicode_AsEncodedString(op,0,0);
+ // Use Python-internal API, there is no other way to do this
+ // without a memory leak.
+ PyObject *bytes = _PyUnicode_AsDefaultEncodedString(op, 0);
return bytes ? PyBytes_AS_STRING(bytes) : 0;
}