New submission from Anthony Sottile <asott...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue35312>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to