Miss Islington (bot)
863c7e0f9f
[3.15] gh-149056: Properly pass array_hook in json.load() to json.loads() (GH-149057) (GH-150591)
...
(cherry picked from commit f87d9605d3 )
Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
2026-05-29 21:30:50 +00:00
Joao S. O. Bueno
d0061d50b0
gh-146440: Add array_hook parameter to JSON decoders ( #146441 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 11:10:48 +00:00
Nice Zombies
d358425e69
gh-125682: Reject non-ASCII digits in the Python implementation of JSON decoder (GH-125687)
2024-10-18 15:26:29 +03:00
Hugo van Kemenade
8fc953f606
gh-115692: Add tests to increase json coverage ( #115693 )
...
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-14 06:11:06 -06:00
Gregory P. Smith
511ca94520
gh-95778: CVE-2020-10735: Prevent DoS by very large int() ( #96499 )
...
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.
This PR comes fresh from a pile of work done in our private PSRT security response team repo.
Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).
<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->
I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit# ). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
2022-09-02 09:35:08 -07:00
Inada Naoki
5492bfcefe
bpo-39377: json: Remove the encoding option. (GH-18075)
2020-01-20 13:54:00 +09:00
Matthias Bussonnier
a8abe097c1
bpo-33461: emit DeprecationWarning when json.loads(encoding=...) is used (GH-6762)
2019-04-09 16:17:25 +09:00
Serhiy Storchaka
ae00fb1d4f
bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)
2018-05-22 14:55:07 +03:00
Victor Stinner
d6debb24e0
bpo-29919: Remove unused imports found by pyflakes ( #137 )
...
Make also minor PEP8 coding style fixes on modified imports.
2017-03-27 16:05:26 +02:00
Nick Coghlan
b161562f72
Issue #17909 : Accept binary input in json.loads
...
json.loads (and hence json.load) now support binary input
encoded as UTF-8, UTF-16 or UTF-32.
Patch by Serhiy Storchaka.
2016-09-10 20:16:18 +10:00
Martin Panter
0f0eac431f
Issue #27993 : Fix problems with plural objects in docs and comments
2016-09-07 11:04:41 +00:00
Serhiy Storchaka
47efb4a5dc
Issue #19361 : JSON decoder now raises JSONDecodeError instead of ValueError.
2015-01-26 13:16:30 +02:00
Benjamin Peterson
584f5cbf16
merge 3.3
2014-04-13 22:31:42 -04:00
Benjamin Peterson
156285c35f
merge 3.2
2014-04-13 22:28:16 -04:00
Ezio Melotti
566a2be95c
#18958 : Improve error message for json.load(s) while passing a string that starts with a UTF-8 BOM.
2013-10-21 02:10:55 +03:00
Ezio Melotti
a0e768ccc2
#19307 : Improve error message for json.load(s) while passing objects of the wrong type.
2013-10-21 01:52:33 +03:00
Ezio Melotti
66f2ea042a
#18273 : move the tests in Lib/test/json_tests to Lib/test/test_json and make them discoverable by unittest. Patch by Zachary Ware.
2013-08-08 15:03:45 +03:00