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

2to3 no-ops on embeddable distribution #81835

Closed
mrginglymus mannequin opened this issue Jul 22, 2019 · 1 comment
Closed

2to3 no-ops on embeddable distribution #81835

mrginglymus mannequin opened this issue Jul 22, 2019 · 1 comment
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error

Comments

@mrginglymus
Copy link
Mannequin

mrginglymus mannequin commented Jul 22, 2019

BPO 37654
Nosy @mrginglymus
Superseder
  • bpo-45544: Close 2to3 issues and list them here
  • 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 2021-10-20.22:58:02.021>
    created_at = <Date 2019-07-22.19:17:59.211>
    labels = ['3.7', '3.8', 'type-bug', 'expert-2to3', '3.9']
    title = '2to3 no-ops on embeddable distribution'
    updated_at = <Date 2021-10-20.22:58:02.018>
    user = 'https://github.com/mrginglymus'

    bugs.python.org fields:

    activity = <Date 2021-10-20.22:58:02.018>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-20.22:58:02.021>
    closer = 'iritkatriel'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2019-07-22.19:17:59.211>
    creator = 'Bill Collins'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37654
    keywords = []
    message_count = 1.0
    messages = ['348304']
    nosy_count = 1.0
    nosy_names = ['Bill Collins']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'resolved'
    status = 'closed'
    superseder = '45544'
    type = 'behavior'
    url = 'https://bugs.python.org/issue37654'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9']

    @mrginglymus
    Copy link
    Mannequin Author

    mrginglymus mannequin commented Jul 22, 2019

    Firstly, I'd acknowledge that expecting 2to3 to work on the embeddable distribution might be the problem, but the mode of failure is silent and delayed.

    The problem is that 2to3 loads fix names by searching for files in a package that end in '.py' (https://github.com/python/cpython/blame/master/Lib/lib2to3/refactor.py#L30) which isn't much use on the embeddable distribution where everything is pre-comipled.

    So, installing an sdist package that relies on 2to3 will succeed, but any attempt to then actually use the installed package will fail.

    I'm not sure whether the correct behavior here might be to

    1. Fix 2to3 to load from pyc files (explicitly enabling 2to3 based installation on embeddable)
    2. Fix 2to3 to fail when no converters are found (or similar; explicitly *disabling* 2to3 based installation on embeddable).

    Or something else entirely.

    @mrginglymus mrginglymus mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error labels Jul 22, 2019
    @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 only security fixes 3.9 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant