cpython: c7b9645a6f35 (original) (raw)

Mercurial > cpython

changeset 96204:c7b9645a6f35 3.4

Issue #24257: Fixed incorrect uses of PyObject_IsInstance(). Fixed segmentation fault in sqlite3.Row constructor with faked cursor type. Fixed system error in the comparison of faked types.SimpleNamespace. [#24257]

Serhiy Storchaka storchaka@gmail.com
date Fri, 22 May 2015 11:02:49 +0300
parents 16c42506fbdf
children a5101529a8a9 645a03e93008
files Lib/sqlite3/test/factory.py Lib/test/test_types.py Misc/NEWS Modules/_sqlite/row.c Objects/genobject.c Objects/namespaceobject.c
diffstat 6 files changed, 36 insertions(+), 8 deletions(-)[+] [-] Lib/sqlite3/test/factory.py 8 Lib/test/test_types.py 16 Misc/NEWS 6 Modules/_sqlite/row.c 2 Objects/genobject.c 5 Objects/namespaceobject.c 7

line wrap: on

line diff

--- a/Lib/sqlite3/test/factory.py +++ b/Lib/sqlite3/test/factory.py @@ -162,6 +162,14 @@ class RowFactoryTests(unittest.TestCase) self.assertEqual(list(reversed(row)), list(reversed(as_tuple))) self.assertIsInstance(row, Sequence)

+ def tearDown(self): self.con.close()

--- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -1169,6 +1169,22 @@ class SimpleNamespaceTests(unittest.Test self.assertEqual(ns, ns_roundtrip, pname)

+ def test_main(): run_unittest(TypesTests, MappingProxyTests, ClassCreationTests,

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ Release date: tba Core and Builtins ----------------- +- Issue #24257: Fixed system error in the comparison of faked

--- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -46,7 +46,7 @@ pysqlite_row_new(PyTypeObject *type, PyO if (!PyArg_ParseTuple(args, "OO", &cursor, &data)) return NULL;

--- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -398,8 +398,7 @@ int PyErr_Fetch(&et, &ev, &tb); if (ev) { /* exception will usually be normalised already */

@@ -409,7 +408,7 @@ int } else { /* normalisation required */ PyErr_NormalizeException(&et, &ev, &tb);

--- a/Objects/namespaceobject.c +++ b/Objects/namespaceobject.c @@ -164,12 +164,11 @@ namespace_clear(_PyNamespaceObject *ns) static PyObject * namespace_richcompare(PyObject *self, PyObject *other, int op) {

}