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

Typo in JSON documentation #90315

Closed
jordan-bonecutter mannequin opened this issue Dec 22, 2021 · 10 comments
Closed

Typo in JSON documentation #90315

jordan-bonecutter mannequin opened this issue Dec 22, 2021 · 10 comments
Labels
3.11 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@jordan-bonecutter
Copy link
Mannequin

jordan-bonecutter mannequin commented Dec 22, 2021

BPO 46157
Nosy @asvetlov, @serhiy-storchaka, @kumaraditya303, @180909, @jordan-bonecutter
PRs
  • bpo-46157: fix typo in docs #30237
  • bpo-46157: fix more typos #30239
  • bpo-46157: Fix a typo #30846
  • 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 2022-01-24.08:46:43.799>
    created_at = <Date 2021-12-22.19:12:06.752>
    labels = ['3.11', 'type-feature', 'docs']
    title = 'Typo in JSON documentation'
    updated_at = <Date 2022-01-24.08:46:43.798>
    user = 'https://github.com/jordan-bonecutter'

    bugs.python.org fields:

    activity = <Date 2022-01-24.08:46:43.798>
    actor = 'serhiy.storchaka'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2022-01-24.08:46:43.799>
    closer = 'serhiy.storchaka'
    components = ['Documentation']
    creation = <Date 2021-12-22.19:12:06.752>
    creator = 'jordan-bonecutter'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46157
    keywords = ['patch']
    message_count = 10.0
    messages = ['409051', '409071', '409072', '409074', '409075', '409076', '409077', '409078', '409082', '409083']
    nosy_count = 6.0
    nosy_names = ['asvetlov', 'docs@python', 'serhiy.storchaka', 'kumaraditya', 'wangjiahua', 'jordan-bonecutter']
    pr_nums = ['30237', '30239', '30846']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue46157'
    versions = ['Python 3.11']

    @jordan-bonecutter
    Copy link
    Mannequin Author

    jordan-bonecutter mannequin commented Dec 22, 2021

    In this doc: https://docs.python.org/3/library/json.html#json.dump

    The section on check_circular has a typo:

    ...a circular reference will result in an RecursionError => a RecursionError

    @jordan-bonecutter jordan-bonecutter mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Dec 22, 2021
    @serhiy-storchaka
    Copy link
    Member

    There are other similar errors:

    Doc/library/json.rst:162: will result in an :exc:`RecursionError` (or worse).
    Doc/library/json.rst:435: prevent an infinite recursion (which would cause an :exc:`RecursionError`).
    Doc/library/tarfile.rst:66: | | Raise an :exc:`FileExistsError` exception |
    Doc/library/tarfile.rst:70: | | Raise an :exc:`FileExistsError` exception |
    Doc/library/tarfile.rst:74: | | Raise an :exc:`FileExistsError` exception |
    Doc/library/tarfile.rst:78: | | Raise an :exc:`FileExistsError` exception |
    Doc/library/poplib.rst:124:An :class:`POP3` instance has the following methods:
    Doc/library/urllib.request.rst:1112: implementation will raise an :exc:`ValueError` in that case.
    Doc/library/enum.rst:180: Returns the Enum member in *cls* matching *name*, or raises an :exc:`KeyError`::
    Doc/library/os.rst:2084: If *exist_ok* is ``False`` (the default), an :exc:`FileExistsError` is
    Doc/library/os.rst:2360: not empty, an :exc:`FileNotFoundError` or an :exc:`OSError` is raised
    Doc/library/asyncio-eventloop.rst:900: method, before Python 3.7 it returned an :class:`Future`.
    Doc/library/asyncio-eventloop.rst:1085: The *executor* argument should be an :class:`concurrent.futures.Executor`
    Doc/whatsnew/3.9.rst:700::pep:`593` introduced an :data:`typing.Annotated` type to decorate existing

    @kumaraditya303
    Copy link
    Contributor

    I'll fix them all :)

    @serhiy-storchaka
    Copy link
    Member

    Doc/using/cmdline.rst:474: * ``-X warn_default_encoding`` issues a :class:`EncodingWarning` when the
    Doc/c-api/init_config.rst:601: If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io.TextIOWrapper`
    Doc/library/fractions.rst:90: and *denominator*. :func:`math.gcd` always return a :class:`int` type.
    Doc/library/asyncio-future.rst:122: a :exc:`InvalidStateError` exception.
    Doc/library/asyncio-future.rst:128: Raises a :exc:`InvalidStateError` error if the Future is
    Doc/library/asyncio-future.rst:135: Raises a :exc:`InvalidStateError` error if the Future is
    Doc/library/inspect.rst:402: wrapped function is a :term:`asynchronous generator` function.
    Doc/library/importlib.rst:881: Returns a :class:`importlib.abc.Traversable` object for the loaded
    Doc/library/importlib.rst:960: Given a :class:`importlib.resources.abc.Traversable` object representing
    Doc/library/pathlib.rst:721: Return a :class:`os.stat_result` object containing information about this path, like :func:`os.stat`.
    Doc/library/os.rst:3412: Provide semaphore-like semantics for reads from a :func:`eventfd` file
    Doc/library/asyncio-task.rst:947: a :exc:`InvalidStateError` exception.
    Doc/library/ast.rst:782: be a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`.
    Doc/library/ast.rst:1772: must be wrapped in a :class:`Expr` node if the value sent back is not used.
    Doc/library/asyncio-eventloop.rst:116: is implicitly scheduled to run as a :class:`asyncio.Task`.
    Doc/library/asyncio-eventloop.rst:357: must return a :class:`asyncio.Future`-compatible object.
    Doc/library/asyncio-eventloop.rst:1129: This method returns a :class:`asyncio.Future` object.
    Doc/glossary.rst:113: An object created by a :term:`asynchronous generator` function.
    Doc/reference/expressions.rst:216:clause may be used to iterate over a :term:`asynchronous iterator`.
    Doc/reference/expressions.rst:710: This method is normally called implicitly by a :keyword:`async for` loop.
    Doc/whatsnew/3.7.rst:607:a :class:`importlib.abc.ResourceReader` instance to support this
    Misc/NEWS.d/3.10.0a1.rst:825:``True``, ``False`` and ``None`` are used within a :class:`ast.Name` node.
    Misc/NEWS.d/3.9.0a4.rst:407:always return a :class:`int` type. Previously, the GCD type depended on
    Misc/NEWS.d/3.9.0b1.rst:394:When a :class:`asyncio.Task` is cancelled, the exception traceback now

    @serhiy-storchaka
    Copy link
    Member

    Thank you Kumar.

    These errors were found with the following one-liners:

    $ find -name '*.rst' -exec egrep --color -i '\ban +:[a-z:]+:`[qwrtpsdfghjklzxcvbnm]' '{}' +
    $ find -name '*.rst' -exec egrep --color -i '\ba +:[a-z:]+:`[eyuioa]' '{}' +

    They produce a lot of false positive results because of signatures and different reading of initial "y" and "u" (and "o", but there are no such cases here).

    @kumaraditya303
    Copy link
    Contributor

    I have fixed most of them in the PR which I found correct, rest can be fixed later on.

    @serhiy-storchaka
    Copy link
    Member

    And more errors can be found with:

    $ find -name '*.rst' -exec egrep --color -i '\ban +[qwrtpsdfghjklzxcvbnm]' '{}' +
    $ find -name '*.rst' -exec egrep --color -i '\ba +[eioa]' '{}' +

    It is worth to check also:

    $ find -name '*.rst' -exec egrep --color -i '\ban +[yu]' '{}' +
    $ find -name '*.rst' -exec egrep --color -i '\ba +[yu]' '{}' +

    Most of them should be correct, but there may be some new errors.

    @serhiy-storchaka serhiy-storchaka added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Dec 23, 2021
    @asvetlov
    Copy link
    Contributor

    New changeset 71ef0b4 by Kumar Aditya in branch 'main':
    bpo-46157: fix typo in docs (GH-30237)
    71ef0b4

    @serhiy-storchaka
    Copy link
    Member

    PR 30237 introduced few new errors.

    @kumaraditya303
    Copy link
    Contributor

    Fixed in a new PR @serhiy

    @serhiy-storchaka serhiy-storchaka removed 3.9 only security fixes 3.10 only security fixes labels Jan 24, 2022
    @serhiy-storchaka serhiy-storchaka removed 3.9 only security fixes 3.10 only security fixes labels Jan 24, 2022
    @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.11 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    Status: Done
    Development

    No branches or pull requests

    3 participants