[New-bugs-announce] [issue35312] lib2to3.pgen2.parser.ParseError is not roundtrip pickleable
Anthony Sottile
report at bugs.python.org
Sun Nov 25 23:03:58 EST 2018
New submission from Anthony Sottile <asottile at umich.edu>:
related to https://bugs.python.org/issue35311
encountered here: https://gitlab.com/pycqa/flake8/issues/473
minimal reproduction:
class TestPickleableException(unittest.TestCase):
def test_ParseError(self):
err = ParseError('msg', 2, None, (1, 'context'))
err2 = pickle.loads(pickle.dumps(err))
self.assertEqual(vars(err), vars(err2))
======================================================================
ERROR: test_ParseError (lib2to3.tests.test_parser.TestPickleableException)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/asottile/workspace/cpython/Lib/lib2to3/tests/test_parser.py", line 628, in test_ParseError
err2 = pickle.loads(pickle.dumps(err))
TypeError: __init__() missing 3 required positional arguments: 'type', 'value', and 'context'
----------
components: Library (Lib)
messages: 330404
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: lib2to3.pgen2.parser.ParseError is not roundtrip pickleable
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35312>
_______________________________________
More information about the New-bugs-announce
mailing list