Skip to content

warnings.warn(...) arguments include '\*', which is wrong - 3.12 #114811

Description

@scotscotmcc

Documentation

Looking at the online python docs at https://docs.python.org/3.11/library/warnings.html#warnings.warn. The function call is listed on the site like this:

warnings.warn(message, category=None, stacklevel=1, source=None, \*, skip_file_prefixes=None)

As far as I know (my apologies if I am very wrong), \* isn't a valid argument, and it should just be *.

Best guess is that since the actual code (here) has a linebreak in the arguments, that linebreak got formatted for the docs as a \*.

I saw this all come up in this stackoverflow question where other people thought it all through, i'm just posting the issue.

This seems to be new in 3.12

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixesdocsDocumentation in the Doc direasytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions