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

Documented return type of sysconfig.get_path() is wrong #88619

Closed
JelleZijlstra opened this issue Jun 18, 2021 · 1 comment
Closed

Documented return type of sysconfig.get_path() is wrong #88619

JelleZijlstra opened this issue Jun 18, 2021 · 1 comment
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir

Comments

@JelleZijlstra
Copy link
Member

BPO 44453
Nosy @JelleZijlstra, @miss-islington
PRs
  • bpo-44453: Fix return type documentation for sysconfig.get_path() #26785
  • [3.10] bpo-44453: The current documentation says it returns None if the name is not found, but (GH-26785) #27371
  • [3.9] bpo-44453: The current documentation says it returns None if the name is not found, but (GH-26785) #27372
  • 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 = 'https://github.com/JelleZijlstra'
    closed_at = <Date 2021-07-26.19:36:14.691>
    created_at = <Date 2021-06-18.13:39:19.646>
    labels = ['3.11', '3.9', '3.10', 'docs']
    title = 'Documented return type of sysconfig.get_path() is wrong'
    updated_at = <Date 2021-07-26.19:36:14.690>
    user = 'https://github.com/JelleZijlstra'

    bugs.python.org fields:

    activity = <Date 2021-07-26.19:36:14.690>
    actor = 'lukasz.langa'
    assignee = 'JelleZijlstra'
    closed = True
    closed_date = <Date 2021-07-26.19:36:14.691>
    closer = 'lukasz.langa'
    components = ['Documentation']
    creation = <Date 2021-06-18.13:39:19.646>
    creator = 'JelleZijlstra'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44453
    keywords = ['patch']
    message_count = 1.0
    messages = ['396065']
    nosy_count = 2.0
    nosy_names = ['JelleZijlstra', 'miss-islington']
    pr_nums = ['26785', '27371', '27372']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44453'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @JelleZijlstra
    Copy link
    Member Author

    https://docs.python.org/3/library/sysconfig.html#sysconfig.get_path says it returns None if the name is not found, but the implementation (https://github.com/python/cpython/blame/main/Lib/sysconfig.py) uses [] and will raise KeyError instead.

    Noticed by @srittau in python/typeshed#5659. I will submit a PR.

    @JelleZijlstra JelleZijlstra added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Jun 18, 2021
    @JelleZijlstra JelleZijlstra self-assigned this Jun 18, 2021
    @JelleZijlstra JelleZijlstra added docs Documentation in the Doc dir 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Jun 18, 2021
    @JelleZijlstra JelleZijlstra self-assigned this Jun 18, 2021
    @JelleZijlstra JelleZijlstra added the docs Documentation in the Doc dir label Jun 18, 2021
    @ambv ambv closed this as completed Jul 26, 2021
    @ambv ambv closed this as completed Jul 26, 2021
    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants