Skip to content

lib2to3 doesn't work when zipped #76588

Closed

Description

@benjaminp
BPO 32407
Nosy @benjaminp, @bitdancer
Superseder
  • bpo-24960: Can't use lib2to3 with embeddable zip file.
  • 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 2017-12-22.13:54:56.584>
    created_at = <Date 2017-12-22.05:49:45.848>
    labels = ['3.7', '3.8', 'type-bug', 'expert-2to3']
    title = "lib2to3 doesn't work when zipped"
    updated_at = <Date 2017-12-22.16:33:44.944>
    user = 'https://github.com/benjaminp'

    bugs.python.org fields:

    activity = <Date 2017-12-22.16:33:44.944>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-12-22.13:54:56.584>
    closer = 'r.david.murray'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2017-12-22.05:49:45.848>
    creator = 'benjamin.peterson'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32407
    keywords = []
    message_count = 4.0
    messages = ['308923', '308936', '308937', '308938']
    nosy_count = 2.0
    nosy_names = ['benjamin.peterson', 'r.david.murray']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '24960'
    type = 'behavior'
    url = 'https://bugs.python.org/issue32407'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    Activity

    1. benjaminp commented on Dec 22, 2017

      @benjaminp
      ContributorAuthor

      2to3 pokes around on the file system to find the grammar files it needs in source or pickled form. This makes it not work if lib2to3 is running from a zip file. lib2to3 should use pkgutil.get_data() instead to load grammar files.

    2. bitdancer commented on Dec 22, 2017

      @bitdancer
      Member

      Duplicate of bpo-24960.

    3. bitdancer commented on Dec 22, 2017

      @bitdancer
      Member

      Funny, you are already nosy on that issue. Does this one have a different goal, or did you just forget about that one?

    4. benjaminp commented on Dec 22, 2017

      @benjaminp
      ContributorAuthor

      I tend to get nosied on all 2to3 issues, but I only just started caring about this one. :)

      Thanks for finding the prior art.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions