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

Clarify that assret_called_once_with sample code is intended typo #91391

Closed
Mariatta opened this issue Apr 5, 2022 · 5 comments
Closed

Clarify that assret_called_once_with sample code is intended typo #91391

Mariatta opened this issue Apr 5, 2022 · 5 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir

Comments

@Mariatta
Copy link
Member

Mariatta commented Apr 5, 2022

BPO 47235
Nosy @gpshead, @Mariatta, @miss-islington
PRs
  • bpo-47235: Note where a typo is intentional in examples #32348
  • [3.10] bpo-47235: Note where a typo is intentional in code. (GH-32348) #32367
  • [3.9] bpo-47235: Note where a typo is intentional in code. (GH-32348) #32368
  • 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/gpshead'
    closed_at = <Date 2022-04-06.15:13:40.203>
    created_at = <Date 2022-04-05.22:46:09.867>
    labels = ['3.11', '3.9', '3.10', 'docs']
    title = 'Clarify that `assret_called_once_with` sample code is intended typo'
    updated_at = <Date 2022-04-06.15:32:29.604>
    user = 'https://github.com/Mariatta'

    bugs.python.org fields:

    activity = <Date 2022-04-06.15:32:29.604>
    actor = 'miss-islington'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2022-04-06.15:13:40.203>
    closer = 'gregory.p.smith'
    components = ['Documentation']
    creation = <Date 2022-04-05.22:46:09.867>
    creator = 'Mariatta'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47235
    keywords = ['patch']
    message_count = 5.0
    messages = ['416826', '416836', '416875', '416877', '416879']
    nosy_count = 4.0
    nosy_names = ['gregory.p.smith', 'docs@python', 'Mariatta', 'miss-islington']
    pr_nums = ['32348', '32367', '32368']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47235'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @Mariatta
    Copy link
    Member Author

    Mariatta commented Apr 5, 2022

    In unittest.mock documentation, there is an example code which intentionally contains typo.

    Source: https://github.com/python/cpython/blame/main/Doc/library/unittest.mock.rst#L2553

    We've received quite a number of false "bug report" regarding this text. Basically people saw the sample code containing assret then they rushed to create an issue/PR, before actually reading the rest of the section. This typo was intentionally placed there, so it should not be fixed. However since this is definitely confusing to readers, perhaps the documentation should be improved.

    On Discord, Brandt suggested to add a comment on the sample code like:

    # Intended typo!
    

    so hopefully people will stop trying to fix it.

    Previous false "bug reports":
    bpo-35789
    bpo-38700

    @Mariatta Mariatta added 3.8 only security fixes 3.10 only security fixes 3.11 only security fixes 3.9 only security fixes docs Documentation in the Doc dir labels Apr 5, 2022
    @Mariatta Mariatta added 3.8 only security fixes 3.10 only security fixes 3.11 only security fixes 3.9 only security fixes docs Documentation in the Doc dir labels Apr 5, 2022
    @gpshead
    Copy link
    Member

    gpshead commented Apr 6, 2022

    LOL... we didn't anticipate this happening when adding the commonly found typo detection feature.

    @gpshead gpshead assigned gpshead and unassigned docspython Apr 6, 2022
    @gpshead
    Copy link
    Member

    gpshead commented Apr 6, 2022

    New changeset ac1fb07 by Gregory P. Smith in branch 'main':
    bpo-47235: Note where a typo is intentional in code. (GH-32348)
    ac1fb07

    @gpshead gpshead removed the 3.8 only security fixes label Apr 6, 2022
    @gpshead gpshead closed this as completed Apr 6, 2022
    @gpshead gpshead removed the 3.8 only security fixes label Apr 6, 2022
    @gpshead gpshead closed this as completed Apr 6, 2022
    @miss-islington
    Copy link
    Contributor

    New changeset 3856b49 by Miss Islington (bot) in branch '3.10':
    bpo-47235: Note where a typo is intentional in code. (GH-32348)
    3856b49

    @miss-islington
    Copy link
    Contributor

    New changeset 770780e by Miss Islington (bot) in branch '3.9':
    bpo-47235: Note where a typo is intentional in code. (GH-32348)
    770780e

    @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

    3 participants