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
7338ebc4
Kaydet (Commit)
7338ebc4
authored
Eki 04, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
üst
7fd9f4b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
plistlib.py
Lib/plistlib.py
+1
-1
test_plistlib.py
Lib/test/test_plistlib.py
+7
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/plistlib.py
Dosyayı görüntüle @
7338ebc4
...
@@ -918,7 +918,7 @@ class _BinaryPlistWriter (object):
...
@@ -918,7 +918,7 @@ class _BinaryPlistWriter (object):
self
.
_write_size
(
0x50
,
len
(
value
))
self
.
_write_size
(
0x50
,
len
(
value
))
except
UnicodeEncodeError
:
except
UnicodeEncodeError
:
t
=
value
.
encode
(
'utf-16be'
)
t
=
value
.
encode
(
'utf-16be'
)
self
.
_write_size
(
0x60
,
len
(
value
)
)
self
.
_write_size
(
0x60
,
len
(
t
)
//
2
)
self
.
_fp
.
write
(
t
)
self
.
_fp
.
write
(
t
)
...
...
Lib/test/test_plistlib.py
Dosyayı görüntüle @
7338ebc4
...
@@ -361,6 +361,13 @@ class TestPlistlib(unittest.TestCase):
...
@@ -361,6 +361,13 @@ class TestPlistlib(unittest.TestCase):
plistlib
.
dumps
,
plistlib
.
dumps
,
testString
)
testString
)
def
test_non_bmp_characters
(
self
):
pl
=
{
'python'
:
'
\U0001f40d
'
}
for
fmt
in
ALL_FORMATS
:
with
self
.
subTest
(
fmt
=
fmt
):
data
=
plistlib
.
dumps
(
pl
,
fmt
=
fmt
)
self
.
assertEqual
(
plistlib
.
loads
(
data
),
pl
)
def
test_nondictroot
(
self
):
def
test_nondictroot
(
self
):
for
fmt
in
ALL_FORMATS
:
for
fmt
in
ALL_FORMATS
:
with
self
.
subTest
(
fmt
=
fmt
):
with
self
.
subTest
(
fmt
=
fmt
):
...
...
Misc/NEWS
Dosyayı görüntüle @
7338ebc4
...
@@ -89,6 +89,8 @@ Core and Builtins
...
@@ -89,6 +89,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
- Issue #28322: Fixed possible crashes when unpickle itertools objects from
- Issue #28322: Fixed possible crashes when unpickle itertools objects from
incorrect pickle data. Based on patch by John Leitch.
incorrect pickle data. Based on patch by John Leitch.
...
...
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