[Python-checkins] cpython (3.5): Comment out some tests that won't pass now that we've reverted the
barry.warsaw
python-checkins at python.org
Mon Jan 11 15:53:57 EST 2016
https://hg.python.org/cpython/rev/54dd5c105334
changeset: 99856:54dd5c105334
branch: 3.5
parent: 99848:e79eddcdff63
user: Barry Warsaw <barry at python.org>
date: Mon Jan 11 15:14:53 2016 -0500
summary:
Comment out some tests that won't pass now that we've reverted the
picklability regression. Also, as per further discussion, remove the
regressing code.
files:
Lib/test/test_csv.py | 19 ++++++++++---------
Objects/typeobject.c | 27 ---------------------------
2 files changed, 10 insertions(+), 36 deletions(-)
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -426,16 +426,17 @@
self.assertRaises(TypeError, csv.reader, [], quoting = -1)
self.assertRaises(TypeError, csv.reader, [], quoting = 100)
- def test_copy(self):
- for name in csv.list_dialects():
- dialect = csv.get_dialect(name)
- self.assertRaises(TypeError, copy.copy, dialect)
+ # See issue #22995
+ ## def test_copy(self):
+ ## for name in csv.list_dialects():
+ ## dialect = csv.get_dialect(name)
+ ## self.assertRaises(TypeError, copy.copy, dialect)
- def test_pickle(self):
- for name in csv.list_dialects():
- dialect = csv.get_dialect(name)
- for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- self.assertRaises(TypeError, pickle.dumps, dialect, proto)
+ ## def test_pickle(self):
+ ## for name in csv.list_dialects():
+ ## dialect = csv.get_dialect(name)
+ ## for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ ## self.assertRaises(TypeError, pickle.dumps, dialect, proto)
class TestCsvBase(unittest.TestCase):
def readerAssertEqual(self, input, expected_result):
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3866,33 +3866,6 @@
}
assert(slotnames == Py_None || PyList_Check(slotnames));
-#if 0
- /* 2016-01-11 barry - This clause breaks at least three packages which
- rely on Cython: kivy, pysam, and s3ql. Cython may be doing
- something funny under the hood, but as this is clearly a regression
- and the rationale for this prohibition is suspect, I am commenting
- this out. Perhaps it should just be removed. See issue #22995 for
- details.
- */
- if (required) {
- Py_ssize_t basicsize = PyBaseObject_Type.tp_basicsize;
- if (obj->ob_type->tp_dictoffset)
- basicsize += sizeof(PyObject *);
- if (obj->ob_type->tp_weaklistoffset)
- basicsize += sizeof(PyObject *);
- if (slotnames != Py_None)
- basicsize += sizeof(PyObject *) * Py_SIZE(slotnames);
- if (obj->ob_type->tp_basicsize > basicsize) {
- Py_DECREF(slotnames);
- Py_DECREF(state);
- PyErr_Format(PyExc_TypeError,
- "can't pickle %.200s objects",
- Py_TYPE(obj)->tp_name);
- return NULL;
- }
- }
-#endif
-
if (slotnames != Py_None && Py_SIZE(slotnames) > 0) {
PyObject *slots;
Py_ssize_t slotnames_size, i;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list