cpython: dbdd5bc4df99 (original) (raw)

Mercurial > cpython

changeset 101202:dbdd5bc4df99

Issue #26711: Fixed the comparison of plistlib.Data with other types. [#26711]

Serhiy Storchaka storchaka@gmail.com
date Sun, 01 May 2016 13:36:42 +0300
parents 5b2edc905db4(current diff)41afb83cffac(diff)
children 7188de6b50ab
files Lib/test/test_plistlib.py Misc/NEWS
diffstat 3 files changed, 7 insertions(+), 5 deletions(-)[+] [-] Lib/plistlib.py 4 Lib/test/test_plistlib.py 6 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -225,10 +225,10 @@ class Data: def eq(self, other): if isinstance(other, self.class): return self.data == other.data

def repr(self): return "%s(%s)" % (self.class.name, repr(self.data))

--- a/Lib/test/test_plistlib.py +++ b/Lib/test/test_plistlib.py @@ -514,15 +514,15 @@ class TestPlistlibDeprecated(unittest.Te cur = plistlib.loads(buf) self.assertEqual(cur, out_data)

cur = plistlib.loads(buf, use_builtin_types=False)

with self.assertWarns(DeprecationWarning): cur = plistlib.readPlistFromBytes(buf)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -256,6 +256,8 @@ Core and Builtins Library ------- +- Issue #26711: Fixed the comparison of plistlib.Data with other types. +