New submission from Ethan Furman:
enum34, the Enum backport, specifically uses `protocol=HIGHEST_PROTOCOL`, while
the current enum tests just use the default.
Running the enum34 test expose an issue with pickle protocol 4:
======================================================================
ERROR: test_subclasses_with_getnewargs (__main__.TestEnum)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_enum.py", line 1022, in test_subclasses_with_getnewargs
self.assertEqual(loads(dumps(NI5, protocol=HIGHEST_PROTOCOL)), 5)
_pickle.PicklingError: Can't pickle <class
'__main__.TestEnum.test_subclasses_with_getnewargs.<locals>.NamedInt'>:
attribute lookup TestEnum.test_subclasses_with_getnewargs.<locals>.NamedInt on
__main__ failed
======================================================================
ERROR: test_tuple_subclass (__main__.TestEnum)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_enum.py", line 1100, in test_tuple_subclass
self.assertTrue(loads(dumps(SomeTuple.first, protocol=HIGHEST_PROTOCOL)) is
SomeTuple.first)
_pickle.PicklingError: Can't pickle <enum 'SomeTuple'>: attribute lookup
TestEnum.test_tuple_subclass.<locals>.SomeTuple on __main__ failed
----------
messages: 210419
nosy: alexandre.vassalotti, ethan.furman, pitrou
priority: high
severity: normal
stage: test needed
status: open
title: Enum tests fail with pickle protocol 4
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20534>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com