Commit Graph

46 Commits

Author SHA1 Message Date
Oren Milman 7c2d97827f bpo-6986: Add a comment to clarify a test of _json.make_encoder(). (GH-3789) 2018-03-26 18:04:39 +03:00
Serhiy Storchaka cfa797c068
bpo-24641: Improved error message for JSON unserializible keys. (#4364)
Also updated an example for default() in the module docstring.
Removed quotes around type name in other error messages.
2017-11-25 17:38:20 +02:00
Oren Milman 2b382dd612 bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. (#3643) 2017-09-24 12:07:12 +03:00
Serhiy Storchaka 49f6449ef4 bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712) 2017-07-16 07:29:16 +03:00
Serhiy Storchaka d3aaa2f149 bpo-30911: Add tests for bad boolean arguments for accelerated json (#2690)
encoder and decoder.
2017-07-13 10:14:11 +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
Daniel Himmelstein b4e9087e7b Fix stderr bug in json.tool test (#346)
See https://github.com/python/cpython/pull/201#discussion_r103229425.
2017-03-15 17:31:06 +03:00
Serhiy Storchaka c4a35daa97 Issue #28541: Improve test coverage for encoding detection in json library.
Original patch by Eric Appelt.
2016-10-30 23:00:01 +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 1aa642f6bd Issue #27993: Merge plural fixes from 3.5 2016-09-07 23:36:43 +00: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 a6f26c1d34 Remove more unused imports in tests. 2016-04-25 00:05:30 +03:00
Berker Peksag 1e8ee9b380 Issue #23277: Remove unused sys and os imports
Patch by Jon Dufresne.
2016-04-24 07:31:42 +03:00
Serhiy Storchaka f002225f7e Issue #24683: Fixed crashes in _json functions called with arguments of
inappropriate type.
2015-07-26 09:02:23 +03:00
Serhiy Storchaka 83236f7a8b Issue #24683: Fixed crashes in _json functions called with arguments of
inappropriate type.
2015-07-26 09:01:22 +03:00
Yury Selivanov f488fb422a Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. 2015-07-03 01:04:23 -04:00
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Benjamin Peterson 88abdef02b merge 3.4 (#24094) 2015-05-02 22:37:13 -04:00
Benjamin Peterson 122f4b1bda merge 3.3 (#24094) 2015-05-02 22:36:26 -04:00
Benjamin Peterson 501182a47b just sort the items tuple directly (closes #24094) 2015-05-02 22:28:04 -04:00
Benjamin Peterson 0b2a6dc42b merge 3.4 2015-02-02 17:47:31 -05:00
Benjamin Peterson b0ef78535a merge 3.3 2015-02-02 17:47:26 -05:00
Benjamin Peterson 1572944499 reduce memory usage of test (closes #23369) 2015-02-02 17:47:07 -05:00
Benjamin Peterson 83e814d852 merge 3.4 2015-02-01 18:02:21 -05:00
Benjamin Peterson c0b743a97b merge 3.3 2015-02-01 18:02:15 -05:00
Benjamin Peterson 68389eaa3f remove extra ws 2015-02-01 18:02:09 -05:00
Benjamin Peterson 71cf91cc09 merge 3.4 (#23369) 2015-02-01 18:00:19 -05:00
Benjamin Peterson 3675cd9db1 merge 3.3 (#23369) 2015-02-01 17:59:49 -05:00
Benjamin Peterson e3bfe19358 fix possible overflow in encode_basestring_ascii (closes #23369) 2015-02-01 17:53:53 -05:00
Serhiy Storchaka 47efb4a5dc Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError. 2015-01-26 13:16:30 +02:00
Antoine Pitrou dc3eaa80d4 Issue #23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the default case of ``ensure_ascii=True``. Patch by Naoki Inada. 2015-01-11 16:41:01 +01:00
Berker Peksag 39e4c4d873 Issue #21650: Add an `--sort-keys` option to json.tool CLI. 2014-11-10 09:56:54 +02:00
Zachary Ware f886697659 Closes #22002: Merge with 3.4 2014-07-23 12:06:47 -05:00
Zachary Ware f012ba42fe Issue #22002: Make full use of test discovery in test sub-packages.
Adds `load_package_tests` function to test.support, uses it in test_asyncio,
test_email, test_json, test_tools, test_importlib and all test_importlib
sub-packages to implement test discovery.
2014-07-23 12:00:29 -05:00
Benjamin Peterson 79f3ef6336 merge 3.4 2014-04-13 22:32:12 -04: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
Benjamin Peterson 940e207412 improve the command-line interface of json.tool (closes #21000)
A patch from Berker Peksag.
2014-03-21 23:17:29 -05:00
Serhiy Storchaka 687ff0ecdf Issue #11489: JSON decoder now accepts lone surrogates. 2013-11-26 21:27:11 +02:00
Serhiy Storchaka c93329b3dd Issue #11489: JSON decoder now accepts lone surrogates. 2013-11-26 21:25:28 +02: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
Ethan Furman a661f4531e Close #18745: Improve enum tests in test_json for infinities and NaN. 2013-09-02 01:14:56 -07:00
Ethan Furman a4998a7041 Close #18264: int- and float-derived enums now converted to int or float. 2013-08-10 13:01:45 -07:00
Ezio Melotti 5cc06fde43 #18273: merge with 3.3. 2013-08-08 15:18:26 +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