This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile
Date 2018-11-26.04:03:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543205038.25.0.788709270274.issue35312@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2018-11-26 04:03:58Anthony Sottilesetrecipients: + Anthony Sottile
2018-11-26 04:03:58Anthony Sottilesetmessageid: <1543205038.25.0.788709270274.issue35312@psf.upfronthosting.co.za>
2018-11-26 04:03:58Anthony Sottilelinkissue35312 messages
2018-11-26 04:03:56Anthony Sottilecreate