Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib2to3.pgen2.parse.ParseError is not roundtrip pickleable #79493

Closed
asottile mannequin opened this issue Nov 26, 2018 · 3 comments
Closed

lib2to3.pgen2.parse.ParseError is not roundtrip pickleable #79493

asottile mannequin opened this issue Nov 26, 2018 · 3 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented Nov 26, 2018

BPO 35312
Nosy @serhiy-storchaka, @asottile
PRs
  • bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able #10710
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-03-16.17:50:10.619>
    created_at = <Date 2018-11-26.04:03:58.131>
    labels = ['3.8', '3.7', 'library']
    title = 'lib2to3.pgen2.parse.ParseError is not roundtrip pickleable'
    updated_at = <Date 2020-03-16.17:50:10.619>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2020-03-16.17:50:10.619>
    actor = 'Anthony Sottile'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-16.17:50:10.619>
    closer = 'Anthony Sottile'
    components = ['Library (Lib)']
    creation = <Date 2018-11-26.04:03:58.131>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35312
    keywords = ['patch']
    message_count = 3.0
    messages = ['330404', '330547', '332955']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'Anthony Sottile']
    pr_nums = ['10710']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35312'
    versions = ['Python 3.7', 'Python 3.8']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Nov 26, 2018

    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'

    @asottile asottile mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir labels Nov 26, 2018
    @asottile asottile mannequin changed the title lib2to3.pgen2.parser.ParseError is not roundtrip pickleable lib2to3.pgen2.parse.ParseError is not roundtrip pickleable Nov 26, 2018
    @serhiy-storchaka
    Copy link
    Member

    New changeset c57e6e2 by Serhiy Storchaka (Anthony Sottile) in branch 'master':
    bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. (GH-10710)
    c57e6e2

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Jan 4, 2019

    Looks like this was merged and can be marked as resolved -- should this be backported to 3.7?

    @asottile asottile mannequin closed this as completed Mar 16, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant