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: support non-ASCII identifiers #78696

Closed
holymonson mannequin opened this issue Aug 27, 2018 · 3 comments
Closed

lib2to3: support non-ASCII identifiers #78696

holymonson mannequin opened this issue Aug 27, 2018 · 3 comments
Labels
3.8 only security fixes stdlib Python modules in the Lib dir

Comments

@holymonson
Copy link
Mannequin

holymonson mannequin commented Aug 27, 2018

BPO 34515
Nosy @benjaminp, @holymonson, @miss-islington
PRs
  • bpo-34515: lib2to3: support non-ASCII identifiers #8950
  • [3.7] closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950) #9333
  • 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 2018-09-15.17:32:33.841>
    created_at = <Date 2018-08-27.06:47:47.478>
    labels = ['3.8', 'library']
    title = 'lib2to3: support non-ASCII identifiers'
    updated_at = <Date 2018-09-15.17:53:02.447>
    user = 'https://github.com/holymonson'

    bugs.python.org fields:

    activity = <Date 2018-09-15.17:53:02.447>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-09-15.17:32:33.841>
    closer = 'benjamin.peterson'
    components = ['Library (Lib)']
    creation = <Date 2018-08-27.06:47:47.478>
    creator = 'monson'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34515
    keywords = ['patch']
    message_count = 3.0
    messages = ['324148', '325451', '325452']
    nosy_count = 3.0
    nosy_names = ['benjamin.peterson', 'monson', 'miss-islington']
    pr_nums = ['8950', '9333']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34515'
    versions = ['Python 3.8']

    @holymonson
    Copy link
    Mannequin Author

    holymonson mannequin commented Aug 27, 2018

    Python 3.0 introduces additional characters from outside the ASCII range (see PEP-3131). see https://docs.python.org/3/reference/lexical_analysis.html#identifiers

    But lib2to3 can't tokenize them corretly.

    $ echo '中 = 1' | python3.7 -m lib2to3.pgen2.tokenize
    1,0-1,1:	ERRORTOKEN	'中'
    1,2-1,3:	OP	'='
    1,4-1,5:	NUMBER	'1'
    1,5-1,6:	NEWLINE	'\n'
    2,0-2,0:	ENDMARKER	''
    

    '中' should be tokenized as NAME instead of ERRORTOKEN.

    @holymonson holymonson mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir 3.8 only security fixes and removed 3.7 (EOL) end of life labels Aug 27, 2018
    @benjaminp
    Copy link
    Contributor

    New changeset 10a428b by Benjamin Peterson (Monson Shao) in branch 'master':
    closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950)
    10a428b

    @miss-islington
    Copy link
    Contributor

    New changeset 51dbae8 by Miss Islington (bot) in branch '3.7':
    closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950)
    51dbae8

    @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.8 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants