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

improve signature (in help, etc) for functions taking sentinel defaults #87190

Closed
iritkatriel opened this issue Jan 25, 2021 · 5 comments
Closed
Labels
3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

BPO 43024
Nosy @ZackerySpytz, @pablogsal, @miss-islington, @iritkatriel
PRs
  • bpo-43024: improve signature (in help, etc) for functions taking sent… #24331
  • [3.10] bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331) #26773
  • 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-06-17.16:42:40.262>
    created_at = <Date 2021-01-25.15:03:19.478>
    labels = ['type-feature', 'library', '3.10', '3.11']
    title = 'improve signature (in help, etc) for functions taking sentinel defaults'
    updated_at = <Date 2021-06-17.16:42:40.262>
    user = 'https://github.com/iritkatriel'

    bugs.python.org fields:

    activity = <Date 2021-06-17.16:42:40.262>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-06-17.16:42:40.262>
    closer = 'iritkatriel'
    components = ['Library (Lib)']
    creation = <Date 2021-01-25.15:03:19.478>
    creator = 'iritkatriel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43024
    keywords = ['patch', '3.10regression']
    message_count = 5.0
    messages = ['385636', '385637', '389973', '396010', '396011']
    nosy_count = 4.0
    nosy_names = ['ZackerySpytz', 'pablogsal', 'miss-islington', 'iritkatriel']
    pr_nums = ['24331', '26773']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43024'
    versions = ['Python 3.10', 'Python 3.11']

    @iritkatriel iritkatriel added 3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jan 25, 2021
    @iritkatriel
    Copy link
    Member Author

    The "sentinel" default value don't render nicely in the signature:

    >>> import traceback
    >>> help(traceback.print_exception)
    Help on function print_exception in module traceback:
    print_exception(exc, /, value=<object object at 0x000002825DF09650>, tb=<object object at 0x000002825DF09650>, limit=None, file=None, chain=True)

    @iritkatriel
    Copy link
    Member Author

    The PR changes the output to:

    >>> help(traceback.print_exception)
    Help on function print_exception in module traceback:
    print_exception(exc, /, value=<optional>, tb=<optional>, limit=None, file=None, chain=True)

    @iritkatriel
    Copy link
    Member Author

    Marking as a 3.10 regression because the sentinel was added in 3.10.

    @iritkatriel iritkatriel added 3.11 only security fixes labels Jun 17, 2021
    @miss-islington
    Copy link
    Contributor

    New changeset f73377d by Irit Katriel in branch 'main':
    bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331)
    f73377d

    @iritkatriel
    Copy link
    Member Author

    New changeset eb0a680 by Miss Islington (bot) in branch '3.10':
    bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331) (GH-26773)
    eb0a680

    @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.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants