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
c869529e
Kaydet (Commit)
c869529e
authored
Nis 03, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
Łukasz Langa
Nis 03, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-33209: End framing at the end of C implementation of pickle.Pickler.dump(). (GH-6363)
üst
629338f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
pickletester.py
Lib/test/pickletester.py
+18
-17
2018-04-03-10-37-13.bpo-33209.9sGWE_.rst
...S.d/next/Library/2018-04-03-10-37-13.bpo-33209.9sGWE_.rst
+1
-0
_pickle.c
Modules/_pickle.c
+3
-2
No files found.
Lib/test/pickletester.py
Dosyayı görüntüle @
c869529e
...
...
@@ -2781,29 +2781,30 @@ class AbstractPicklerUnpicklerObjectTests(unittest.TestCase):
# object again, the third serialized form should be identical to the
# first one we obtained.
data
=
[
"abcdefg"
,
"abcdefg"
,
44
]
f
=
io
.
BytesIO
()
pickler
=
self
.
pickler_class
(
f
)
for
proto
in
protocols
:
f
=
io
.
BytesIO
()
pickler
=
self
.
pickler_class
(
f
,
proto
)
pickler
.
dump
(
data
)
first_pickled
=
f
.
getvalue
()
pickler
.
dump
(
data
)
first_pickled
=
f
.
getvalue
()
# Reset BytesIO object.
f
.
seek
(
0
)
f
.
truncate
()
# Reset BytesIO object.
f
.
seek
(
0
)
f
.
truncate
()
pickler
.
dump
(
data
)
second_pickled
=
f
.
getvalue
()
pickler
.
dump
(
data
)
second_pickled
=
f
.
getvalue
()
# Reset the Pickler and BytesIO objects.
pickler
.
clear_memo
()
f
.
seek
(
0
)
f
.
truncate
()
# Reset the Pickler and BytesIO objects.
pickler
.
clear_memo
()
f
.
seek
(
0
)
f
.
truncate
()
pickler
.
dump
(
data
)
third_pickled
=
f
.
getvalue
()
pickler
.
dump
(
data
)
third_pickled
=
f
.
getvalue
()
self
.
assertNotEqual
(
first_pickled
,
second_pickled
)
self
.
assertEqual
(
first_pickled
,
third_pickled
)
self
.
assertNotEqual
(
first_pickled
,
second_pickled
)
self
.
assertEqual
(
first_pickled
,
third_pickled
)
def
test_priming_pickler_memo
(
self
):
# Verify that we can set the Pickler's memo attribute.
...
...
Misc/NEWS.d/next/Library/2018-04-03-10-37-13.bpo-33209.9sGWE_.rst
0 → 100644
Dosyayı görüntüle @
c869529e
End framing at the end of C implementation of :func:`pickle.Pickler.dump`.
Modules/_pickle.c
Dosyayı görüntüle @
c869529e
...
...
@@ -4152,9 +4152,10 @@ dump(PicklerObject *self, PyObject *obj)
}
if
(
save
(
self
,
obj
,
0
)
<
0
||
_Pickler_Write
(
self
,
&
stop_op
,
1
)
<
0
)
_Pickler_Write
(
self
,
&
stop_op
,
1
)
<
0
||
_Pickler_CommitFrame
(
self
)
<
0
)
return
-
1
;
self
->
framing
=
0
;
return
0
;
}
...
...
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