Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
e9736204
Kaydet (Commit)
e9736204
authored
Ock 11, 2016
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge heads.
üst
b2b12172
09880c89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
37 deletions
+11
-37
test_csv.py
Lib/test/test_csv.py
+11
-10
typeobject.c
Objects/typeobject.c
+0
-27
No files found.
Lib/test/test_csv.py
Dosyayı görüntüle @
e9736204
...
@@ -426,16 +426,17 @@ class TestDialectRegistry(unittest.TestCase):
...
@@ -426,16 +426,17 @@ class TestDialectRegistry(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
csv
.
reader
,
[],
quoting
=
-
1
)
self
.
assertRaises
(
TypeError
,
csv
.
reader
,
[],
quoting
=
-
1
)
self
.
assertRaises
(
TypeError
,
csv
.
reader
,
[],
quoting
=
100
)
self
.
assertRaises
(
TypeError
,
csv
.
reader
,
[],
quoting
=
100
)
def
test_copy
(
self
):
# See issue #22995
for
name
in
csv
.
list_dialects
():
## def test_copy(self):
dialect
=
csv
.
get_dialect
(
name
)
## for name in csv.list_dialects():
self
.
assertRaises
(
TypeError
,
copy
.
copy
,
dialect
)
## dialect = csv.get_dialect(name)
## self.assertRaises(TypeError, copy.copy, dialect)
def
test_pickle
(
self
):
for
name
in
csv
.
list_dialects
():
## def test_pickle(self):
dialect
=
csv
.
get_dialect
(
name
)
## for name in csv.list_dialects():
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
):
## dialect = csv.get_dialect(name)
self
.
assertRaises
(
TypeError
,
pickle
.
dumps
,
dialect
,
proto
)
## for proto in range(pickle.HIGHEST_PROTOCOL + 1):
## self.assertRaises(TypeError, pickle.dumps, dialect, proto)
class
TestCsvBase
(
unittest
.
TestCase
):
class
TestCsvBase
(
unittest
.
TestCase
):
def
readerAssertEqual
(
self
,
input
,
expected_result
):
def
readerAssertEqual
(
self
,
input
,
expected_result
):
...
...
Objects/typeobject.c
Dosyayı görüntüle @
e9736204
...
@@ -3866,33 +3866,6 @@ _PyObject_GetState(PyObject *obj, int required)
...
@@ -3866,33 +3866,6 @@ _PyObject_GetState(PyObject *obj, int required)
}
}
assert(slotnames == Py_None || PyList_Check(slotnames));
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) {
if (slotnames != Py_None && Py_SIZE(slotnames) > 0) {
PyObject *slots;
PyObject *slots;
Py_ssize_t slotnames_size, i;
Py_ssize_t slotnames_size, i;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment