This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: JSON module documentation mentions OverflowError for case that raises RecursionError
Type: Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: SnoopJeDi, docs@python, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-12-06 16:45 by SnoopJeDi, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29943 merged SnoopJeDi, 2021-12-06 16:54
PR 29952 merged miss-islington, 2021-12-07 09:59
PR 29953 merged miss-islington, 2021-12-07 09:59
Messages (6)
msg407837 - (view) Author: James Gerity (SnoopJeDi) Date: 2021-12-06 16:45
The docstrings for `json.JSONEncoder, json.dump(), json.dumps()` all refer to `OverflowError` when describing the behavior of the `check_circular` parameter, but the module's test of this parameter catches a `RecursionError` and the documentation does make reference to recursion.

Since the fix for bpo-43225 (7b78d43) the string-escaping machinery in `_json.c` is capable of raising OverflowError, but the reference in the documentation predates this addition by quite a long time.
msg407849 - (view) Author: James Gerity (SnoopJeDi) Date: 2021-12-06 17:46
Correction: the bug whose resolution adds the OverflowError mentioned above is bpo-24522, not bpo-43255
msg407906 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-07 09:58
New changeset 8db06528cacc94e67eb1fb2e4c2acc061a515671 by James Gerity in branch 'main':
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)
https://github.com/python/cpython/commit/8db06528cacc94e67eb1fb2e4c2acc061a515671
msg407907 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-07 09:59
Thank you for your contribution James!
msg407908 - (view) Author: miss-islington (miss-islington) Date: 2021-12-07 10:20
New changeset 15da2a2723245710f1bd2c7cbd5b450532ae7728 by Miss Islington (bot) in branch '3.10':
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)
https://github.com/python/cpython/commit/15da2a2723245710f1bd2c7cbd5b450532ae7728
msg407909 - (view) Author: miss-islington (miss-islington) Date: 2021-12-07 10:25
New changeset 2e360832d7ed2697d715e93cb9f859a52264d60b by Miss Islington (bot) in branch '3.9':
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)
https://github.com/python/cpython/commit/2e360832d7ed2697d715e93cb9f859a52264d60b
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90159
2021-12-07 10:50:32serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-12-07 10:25:07miss-islingtonsetmessages: + msg407909
2021-12-07 10:20:20miss-islingtonsetmessages: + msg407908
2021-12-07 09:59:55serhiy.storchakasetmessages: + msg407907
versions: + Python 3.9, Python 3.10
2021-12-07 09:59:07miss-islingtonsetpull_requests: + pull_request28178
2021-12-07 09:59:02miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28177
2021-12-07 09:58:56serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg407906
2021-12-06 17:46:15SnoopJeDisetmessages: + msg407849
2021-12-06 16:54:40SnoopJeDisetkeywords: + patch
stage: patch review
pull_requests: + pull_request28168
2021-12-06 16:45:46SnoopJeDicreate