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
b98dcc1f
Kaydet (Commit)
b98dcc1f
authored
May 03, 2013
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15535: Fix pickling of named tuples.
üst
8e596a76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
0 deletions
+9
-0
__init__.py
Lib/collections/__init__.py
+4
-0
test_collections.py
Lib/test/test_collections.py
+1
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/collections/__init__.py
Dosyayı görüntüle @
b98dcc1f
...
@@ -281,6 +281,10 @@ class {typename}(tuple):
...
@@ -281,6 +281,10 @@ class {typename}(tuple):
'Return self as a plain tuple. Used by copy and pickle.'
'Return self as a plain tuple. Used by copy and pickle.'
return tuple(self)
return tuple(self)
def __getstate__(self):
'Exclude the OrderedDict from pickling'
return None
{field_defs}
{field_defs}
'''
'''
...
...
Lib/test/test_collections.py
Dosyayı görüntüle @
b98dcc1f
...
@@ -273,6 +273,7 @@ class TestNamedTuple(unittest.TestCase):
...
@@ -273,6 +273,7 @@ class TestNamedTuple(unittest.TestCase):
q
=
loads
(
dumps
(
p
,
protocol
))
q
=
loads
(
dumps
(
p
,
protocol
))
self
.
assertEqual
(
p
,
q
)
self
.
assertEqual
(
p
,
q
)
self
.
assertEqual
(
p
.
_fields
,
q
.
_fields
)
self
.
assertEqual
(
p
.
_fields
,
q
.
_fields
)
self
.
assertNotIn
(
b
'OrderedDict'
,
dumps
(
p
,
protocol
))
def
test_copy
(
self
):
def
test_copy
(
self
):
p
=
TestNT
(
x
=
10
,
y
=
20
,
z
=
30
)
p
=
TestNT
(
x
=
10
,
y
=
20
,
z
=
30
)
...
...
Misc/ACKS
Dosyayı görüntüle @
b98dcc1f
...
@@ -811,6 +811,7 @@ Trent Mick
...
@@ -811,6 +811,7 @@ Trent Mick
Jason Michalski
Jason Michalski
Franck Michea
Franck Michea
Tom Middleton
Tom Middleton
Thomas Miedema
Stan Mihai
Stan Mihai
Stefan Mihaila
Stefan Mihaila
Aristotelis Mikropoulos
Aristotelis Mikropoulos
...
...
Misc/NEWS
Dosyayı görüntüle @
b98dcc1f
...
@@ -47,6 +47,9 @@ Library
...
@@ -47,6 +47,9 @@ Library
- Issue #17802: Fix an UnboundLocalError in html.parser. Initial tests by
- Issue #17802: Fix an UnboundLocalError in html.parser. Initial tests by
Thomas Barlow.
Thomas Barlow.
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
instead of just the underlying tuple.
- Issue #17192: Restore the patch for Issue #11729 which was ommitted in
- Issue #17192: Restore the patch for Issue #11729 which was ommitted in
3.3.1 when updating the bundled version of libffi used by ctypes. Update
3.3.1 when updating the bundled version of libffi used by ctypes. Update
many libffi files that were missed in 3.3.1'
s
update
to
libffi
-
3.0.13
.
many libffi files that were missed in 3.3.1'
s
update
to
libffi
-
3.0.13
.
...
...
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