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

[easy] undefined names in platform.py #84639

Closed
vstinner opened this issue Apr 30, 2020 · 4 comments
Closed

[easy] undefined names in platform.py #84639

vstinner opened this issue Apr 30, 2020 · 4 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes easy OS-windows stdlib Python modules in the Lib dir

Comments

@vstinner
Copy link
Member

BPO 40459
Nosy @pfmoore, @vstinner, @tjguk, @zware, @zooba, @corona10, @miss-islington, @sweeneyde
PRs
  • bpo-40459: Fix NameError in platform.py #19855
  • [3.8] bpo-40459: Fix NameError in platform.py (GH-19855) #19912
  • [3.7] bpo-40459: Fix NameError in platform.py (GH-19855) #19913
  • 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-05-05.02:57:49.034>
    created_at = <Date 2020-04-30.23:45:08.727>
    labels = ['easy', '3.8', '3.9', '3.7', 'library', 'OS-windows']
    title = '[easy] undefined names in platform.py'
    updated_at = <Date 2020-05-05.02:57:49.029>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-05-05.02:57:49.029>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-05.02:57:49.034>
    closer = 'vstinner'
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2020-04-30.23:45:08.727>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40459
    keywords = ['patch', 'newcomer friendly']
    message_count = 4.0
    messages = ['367808', '368099', '368100', '368101']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'zach.ware', 'steve.dower', 'corona10', 'miss-islington', 'Dennis Sweeney']
    pr_nums = ['19855', '19912', '19913']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40459'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @vstinner
    Copy link
    Member Author

    pyflakes found the two following issues in platform.py:

    Lib/platform.py:401:35 undefined name 'HKEY_LOCAL_MACHINE'
    Lib/platform.py:402:25 undefined name 'QueryValueEx'

    Line 353:

                with winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, cvkey) as key:
                    return winreg.QueryValueEx(key, 'EditionId')[0]

    vs Line 401:

                with winreg.OpenKeyEx(HKEY_LOCAL_MACHINE, cvkey) as key:
                    ptype = QueryValueEx(key, 'CurrentType')[0]

    This issue seems easy to fix ;-)

    @vstinner vstinner added 3.9 only security fixes stdlib Python modules in the Lib dir easy labels Apr 30, 2020
    @corona10
    Copy link
    Member

    corona10 commented May 5, 2020

    New changeset 1e7e451 by Dennis Sweeney in branch 'master':
    bpo-40459: Fix NameError in platform.py (GH-19855)
    1e7e451

    @miss-islington
    Copy link
    Contributor

    New changeset 8ddf915 by Miss Islington (bot) in branch '3.7':
    bpo-40459: Fix NameError in platform.py (GH-19855)
    8ddf915

    @miss-islington
    Copy link
    Contributor

    New changeset efc782d by Miss Islington (bot) in branch '3.8':
    bpo-40459: Fix NameError in platform.py (GH-19855)
    efc782d

    @vstinner vstinner added 3.7 (EOL) end of life 3.8 only security fixes labels May 5, 2020
    @vstinner vstinner closed this as completed May 5, 2020
    @vstinner vstinner added 3.7 (EOL) end of life 3.8 only security fixes labels May 5, 2020
    @vstinner vstinner closed this as completed May 5, 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 only security fixes 3.9 only security fixes easy OS-windows stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants