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
23058673
Kaydet (Commit)
23058673
authored
Ock 26, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #23094: Fixed readline with frames in Python implementation of pickle.
üst
0e992b35
21d7533c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
pickle.py
Lib/pickle.py
+1
-1
pickletester.py
Lib/test/pickletester.py
+8
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/pickle.py
Dosyayı görüntüle @
23058673
...
@@ -242,7 +242,7 @@ class _Unframer:
...
@@ -242,7 +242,7 @@ class _Unframer:
if
not
data
:
if
not
data
:
self
.
current_frame
=
None
self
.
current_frame
=
None
return
self
.
file_readline
()
return
self
.
file_readline
()
if
data
[
-
1
]
!=
b
'
\n
'
:
if
data
[
-
1
]
!=
b
'
\n
'
[
0
]
:
raise
UnpicklingError
(
raise
UnpicklingError
(
"pickle exhausted before end of frame"
)
"pickle exhausted before end of frame"
)
return
data
return
data
...
...
Lib/test/pickletester.py
Dosyayı görüntüle @
23058673
...
@@ -1584,6 +1584,14 @@ class AbstractPickleTests(unittest.TestCase):
...
@@ -1584,6 +1584,14 @@ class AbstractPickleTests(unittest.TestCase):
count_opcode
(
pickle
.
FRAME
,
pickled
))
count_opcode
(
pickle
.
FRAME
,
pickled
))
self
.
assertEqual
(
obj
,
self
.
loads
(
some_frames_pickle
))
self
.
assertEqual
(
obj
,
self
.
loads
(
some_frames_pickle
))
def
test_frame_readline
(
self
):
pickled
=
b
'
\x80\x04\x95\x05\x00\x00\x00\x00\x00\x00\x00
I42
\n
.'
# 0: \x80 PROTO 4
# 2: \x95 FRAME 5
# 11: I INT 42
# 15: . STOP
self
.
assertEqual
(
self
.
loads
(
pickled
),
42
)
def
test_nested_names
(
self
):
def
test_nested_names
(
self
):
global
Nested
global
Nested
class
Nested
:
class
Nested
:
...
...
Misc/NEWS
Dosyayı görüntüle @
23058673
...
@@ -218,6 +218,8 @@ Core and Builtins
...
@@ -218,6 +218,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
23094
:
Fixed
readline
with
frames
in
Python
implementation
of
pickle
.
-
Issue
#
23268
:
Fixed
bugs
in
the
comparison
of
ipaddress
classes
.
-
Issue
#
23268
:
Fixed
bugs
in
the
comparison
of
ipaddress
classes
.
-
Issue
#
21408
:
Removed
incorrect
implementations
of
__ne__
()
which
didn
't
-
Issue
#
21408
:
Removed
incorrect
implementations
of
__ne__
()
which
didn
't
...
...
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