Andrew Svetlov
42b8932c12
Merge issue #14570 : Document json sort_keys parameter properly.
...
Patch by Chris Rebert.
2012-10-28 14:11:21 +02:00
Andrew Svetlov
6d50a5447a
Merge issue #14570 : Document json sort_keys parameter properly.
...
Patch by Chris Rebert.
2012-10-28 14:11:00 +02:00
Andrew Svetlov
2ec53be2e2
Issue #14570 : Document json sort_keys parameter properly.
...
Patch by Chris Rebert.
2012-10-28 14:10:30 +02:00
Philip Jenvey
fd0d3e5d25
more yield from
...
patch by Serhiy Storchaka
2012-10-01 15:34:31 -07:00
Antoine Pitrou
802d669044
Issue #5067 : improve some json error messages.
...
Patch by Serhiy Storchaka.
2012-06-29 01:59:54 +02:00
Antoine Pitrou
2d24e94bbe
Issue #5067 : improve some json error messages.
...
Patch by Serhiy Storchaka.
2012-06-29 01:58:26 +02:00
Ezio Melotti
4226543490
#14875 : merge with 3.2.
2012-05-21 17:53:42 -06:00
Ezio Melotti
898d51da4d
#14875 : Use float('inf') instead of float('1e66666') in the json module.
2012-05-21 17:49:06 -06:00
Georg Brandl
2fb477c0f0
Merge 3.2: Issue #13703 plus some related test suite fixes.
2012-02-21 00:33:36 +01:00
Georg Brandl
09a7c72cad
Merge from 3.1: Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Ezio Melotti
6b60fb9148
#5723 : merge with 3.1.
2011-05-14 06:47:51 +03:00
Ezio Melotti
3c0d8a1cc7
#5723 : Improve json tests to be executed with and without accelerations.
2011-05-14 06:38:03 +03:00
Ezio Melotti
136726537f
#12051 : Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations.
2011-05-11 01:02:56 +03:00
Ezio Melotti
362b95102f
#12017 : Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations.
2011-05-07 17:58:09 +03:00
Éric Araujo
fbeb1a9468
Merge 3.1
2011-04-24 02:42:52 +02:00
Éric Araujo
de579d4359
Add a space to make json doc a bit more readable
2011-04-21 02:37:41 +02:00
Ezio Melotti
04c6423fba
Merge with 3.1.
2011-04-13 07:18:24 +03:00
Ezio Melotti
d210aa1ad9
#9233 : Fix json.loads({}) to return a dict (instead of a list), when _json is not available.
2011-04-13 07:10:13 +03:00
Ezio Melotti
42368f9b0c
Remove unnecessary imports and use assertIs instead of assertTrue.
2011-04-13 07:08:17 +03:00
Ezio Melotti
c753305180
#9233 : Fix json to work properly even when _json is not available.
2011-04-13 07:04:18 +03:00
Ezio Melotti
4f95a52fe2
#9233 : skip _json-specific tests when _json is not available.
2011-04-13 06:58:29 +03:00
R David Murray
d5315482e9
Merge #10019 : Fix regression relative to 2.6: add newlines if indent=0
...
Patch by Amaury Forgeot d'Arc, updated by Sando Tosi.
2011-04-12 21:09:18 -04:00
R David Murray
3dd02d62c9
#10019 : Fix regression relative to 2.6: add newlines if indent=0
...
Patch by Amaury Forgeot d'Arc, updated by Sando Tosi.
2011-04-12 21:02:45 -04:00
Antoine Pitrou
a970e62258
Merged revisions 88137 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88137 | antoine.pitrou | 2011-01-21 22:37:32 +0100 (ven., 21 janv. 2011) | 3 lines
Fix JSON docs about loads() accepting only str objects, not bytes.
........
2011-01-21 21:39:56 +00:00
Antoine Pitrou
00d650baaa
Fix JSON docs about loads() accepting only str objects, not bytes.
2011-01-21 21:37:32 +00:00
Alexander Belopolsky
ff27ee0b40
Issue #10572 : Moved json tests to Lib/test/json_tests.
...
Approved by Raymond Hettinger.
2010-11-30 03:03:30 +00:00
Georg Brandl
c524cff3d3
Merged revisions 85530,85532-85534,85538-85543,85546-85548 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r85530 | georg.brandl | 2010-10-15 17:32:05 +0200 (Fr, 15 Okt 2010) | 1 line
Refrain from using inline suites.
........
r85532 | georg.brandl | 2010-10-15 18:03:02 +0200 (Fr, 15 Okt 2010) | 1 line
#7771 : reference to documentation of dictview methods and operations.
........
r85533 | georg.brandl | 2010-10-15 18:07:41 +0200 (Fr, 15 Okt 2010) | 1 line
#9683 : remove broken dead code dealing with nested arguments removed from Py3k, and update the docs and docstrings accordingly.
........
r85534 | georg.brandl | 2010-10-15 18:19:43 +0200 (Fr, 15 Okt 2010) | 1 line
#9801 : document how list and dict proxies created by Managers behave w.r.t. mutable items.
........
r85538 | georg.brandl | 2010-10-15 18:35:46 +0200 (Fr, 15 Okt 2010) | 1 line
#7303 : add documentation for useful pkgutil functions and classes.
........
r85539 | georg.brandl | 2010-10-15 18:42:14 +0200 (Fr, 15 Okt 2010) | 1 line
Fix issue references.
........
r85540 | georg.brandl | 2010-10-15 18:42:37 +0200 (Fr, 15 Okt 2010) | 1 line
#6798 : fix wrong docs for the arguments to several trace events.
........
r85541 | georg.brandl | 2010-10-15 18:53:24 +0200 (Fr, 15 Okt 2010) | 1 line
#4968 : updates to inspect.is* function docs.
........
r85542 | georg.brandl | 2010-10-15 19:01:15 +0200 (Fr, 15 Okt 2010) | 1 line
#7790 : move table of struct_time members to the actual description of struct_time.
........
r85543 | georg.brandl | 2010-10-15 19:03:02 +0200 (Fr, 15 Okt 2010) | 1 line
#4785 : document strict argument of JSONDecoder, plus add object_pairs_hook in the docstrings.
........
r85546 | georg.brandl | 2010-10-15 19:58:45 +0200 (Fr, 15 Okt 2010) | 1 line
#5762 : fix handling of empty namespace in minidom, which would result in AttributeError on toxml().
........
r85547 | georg.brandl | 2010-10-15 20:00:35 +0200 (Fr, 15 Okt 2010) | 1 line
#6098 : Refrain from claiming DOM level 3 conformance in minidom.
........
r85548 | georg.brandl | 2010-10-15 21:46:19 +0200 (Fr, 15 Okt 2010) | 1 line
#10072 : assume a bit less knowledge of the FTP protocol in the ftplib docs.
........
2010-11-26 08:42:45 +00:00
Barry Warsaw
fdba067213
Remove unnecessary import.
2010-11-24 18:18:21 +00:00
Ezio Melotti
19f2aeba67
Merged revisions 86596 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line
#9424 : Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Ezio Melotti
b3aedd4862
#9424 : Replace deprecated assert* methods in the Python test suite.
2010-11-20 19:04:17 +00:00
Raymond Hettinger
b643ef8f8e
Issue #5729 : json.dumps to support using '\t' as an indent string
2010-10-31 08:00:16 +00:00
Georg Brandl
d4460aaacd
#4785 : document strict argument of JSONDecoder, plus add object_pairs_hook in the docstrings.
2010-10-15 17:03:02 +00:00
Georg Brandl
4009c9edfc
Merged revisions 82805-82806,83523-83527,83536,83538,83542,83546-83548,83550-83555,83558,83560 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r82805 | georg.brandl | 2010-07-11 11:42:10 +0200 (So, 11 Jul 2010) | 1 line
#7935 : cross-reference to ast.literal_eval() from eval() docs.
........
r82806 | georg.brandl | 2010-07-11 12:22:44 +0200 (So, 11 Jul 2010) | 1 line
#9223 : link to Command class reference, and move Command interface docs nearer to class docs.
........
r83523 | georg.brandl | 2010-08-02 14:06:18 +0200 (Mo, 02 Aug 2010) | 1 line
#9209 and #7781 : fix two crashes in pstats interactive browser.
........
r83524 | georg.brandl | 2010-08-02 14:20:23 +0200 (Mo, 02 Aug 2010) | 1 line
#9428 : fix running scripts from profile/cProfile with their own name and the right namespace. Same fix as for trace.py in #1690103 .
........
r83525 | georg.brandl | 2010-08-02 14:36:24 +0200 (Mo, 02 Aug 2010) | 1 line
Get rid of spurious "threading" entries in trace output.
........
r83526 | georg.brandl | 2010-08-02 14:40:22 +0200 (Mo, 02 Aug 2010) | 1 line
Fix softspace relic.
........
r83527 | georg.brandl | 2010-08-02 14:48:46 +0200 (Mo, 02 Aug 2010) | 1 line
#3821 : beginnings of a trace.py unittest.
........
r83536 | georg.brandl | 2010-08-02 19:49:25 +0200 (Mo, 02 Aug 2010) | 1 line
#8578 : mention danger of not incref'ing weak referenced object.
........
r83538 | georg.brandl | 2010-08-02 20:10:13 +0200 (Mo, 02 Aug 2010) | 1 line
#6928 : fix class docs w.r.t. new metaclasses.
........
r83542 | georg.brandl | 2010-08-02 20:56:54 +0200 (Mo, 02 Aug 2010) | 1 line
Move test_SimpleHTTPServer into test_httpservers.
........
r83546 | georg.brandl | 2010-08-02 21:16:34 +0200 (Mo, 02 Aug 2010) | 1 line
#7973 : Fix distutils options spelling.
........
r83547 | georg.brandl | 2010-08-02 21:19:26 +0200 (Mo, 02 Aug 2010) | 1 line
#7386 : add example that shows that trailing path separators are stripped.
........
r83548 | georg.brandl | 2010-08-02 21:23:34 +0200 (Mo, 02 Aug 2010) | 1 line
#8172 : how does one use a property?
........
r83550 | georg.brandl | 2010-08-02 21:32:43 +0200 (Mo, 02 Aug 2010) | 1 line
#9451 : strengthen warning about __*__ special name usage.
........
r83551 | georg.brandl | 2010-08-02 21:35:06 +0200 (Mo, 02 Aug 2010) | 1 line
Remove XXX comment that was displayed.
........
r83552 | georg.brandl | 2010-08-02 21:36:36 +0200 (Mo, 02 Aug 2010) | 1 line
#9438 : clarify that constant names also cannot be assigned as attributes.
........
r83553 | georg.brandl | 2010-08-02 21:39:17 +0200 (Mo, 02 Aug 2010) | 1 line
Remove redundant information.
........
r83554 | georg.brandl | 2010-08-02 21:43:05 +0200 (Mo, 02 Aug 2010) | 1 line
#7280 : note about nasmw.exe.
........
r83555 | georg.brandl | 2010-08-02 21:44:48 +0200 (Mo, 02 Aug 2010) | 1 line
#8861 : remove unused variable.
........
r83558 | georg.brandl | 2010-08-02 22:05:19 +0200 (Mo, 02 Aug 2010) | 1 line
#8648 : document UTF-7 codec functions.
........
r83560 | georg.brandl | 2010-08-02 22:16:18 +0200 (Mo, 02 Aug 2010) | 1 line
#9087 : update json docstrings -- unicode and long do not exist anymore.
........
2010-10-06 08:26:09 +00:00
Antoine Pitrou
7d6e076f6d
Issue #7451 : Improve decoding performance of JSON objects, and reduce
...
the memory consumption of said decoded objects when they use the same
strings as keys.
2010-09-04 20:16:53 +00:00
Florent Xicluna
b4efb3d81e
Merged revisions 83212,83829,83833,83838-83839,83878,84019,84025,84028,84032,84036 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83212 | florent.xicluna | 2010-07-28 18:39:41 +0200 (mer., 28 juil. 2010) | 2 lines
Syntax cleanup.
........
r83829 | florent.xicluna | 2010-08-08 18:16:07 +0200 (dim., 08 août 2010) | 2 lines
Use unittest specific methods for some urllib test cases. And replace urllib2 with urllib.request in comments.
........
r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines
Add test case for the HTTPResponse being an iterable. Follow-up of issue #4608 .
........
r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines
Typo.
........
r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines
Issue #7564 : Skip test_ioctl if another process is attached to /dev/tty.
........
r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line
Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest).
........
r84019 | florent.xicluna | 2010-08-14 17:56:42 +0200 (sam., 14 août 2010) | 11 lines
Merged manually from 2.7 branch to 3.x trunk.
------------------------------------------------------------------------
r79925 | nick.coghlan | 2010-04-10 16:24:36 +0200 (sam. 10 avril 2010)
Try to turn some buildbots green by allowing test_multiprocessing to
pass even if it hits the sys.exc_clear code in the threading module, and
improve the test coverage by making the ctypes dependencies a bit more
granular (two of the cited ctypes objects don't exist on my system)
------------------------------------------------------------------------
........
r84025 | florent.xicluna | 2010-08-14 18:56:27 +0200 (sam., 14 août 2010) | 1 line
List Misc/python-config.in in Misc/README. Fix few typos.
........
r84028 | florent.xicluna | 2010-08-14 19:02:49 +0200 (sam., 14 août 2010) | 1 line
Fix order.
........
r84032 | florent.xicluna | 2010-08-14 19:15:31 +0200 (sam., 14 août 2010) | 1 line
Convert to spaces.
........
r84036 | florent.xicluna | 2010-08-14 20:03:19 +0200 (sam., 14 août 2010) | 1 line
Remove bad merge (from svnmerge r82301)
........
2010-08-14 18:24:40 +00:00
Georg Brandl
c8284cfc57
#9087 : update json docstrings -- unicode and long do not exist anymore.
2010-08-02 20:16:18 +00:00
Florent Xicluna
02ea12b291
Syntax cleanup.
2010-07-28 16:39:41 +00:00
Doug Hellmann
76e57947a1
Merged revisions 83016 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83016 | doug.hellmann | 2010-07-21 08:29:04 -0400 (Wed, 21 Jul 2010) | 1 line
Apply patch from Ray Allen for issue 9296
........
2010-07-21 12:35:38 +00:00
Doug Hellmann
1c524754f6
Apply patch from Ray Allen for issue 9296
2010-07-21 12:29:04 +00:00
Antoine Pitrou
4fad6bdde9
Merged revisions 76710 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r76710 | antoine.pitrou | 2009-12-08 16:57:31 +0100 (mar., 08 déc. 2009) | 10 lines
Merged revisions 76708 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76708 | antoine.pitrou | 2009-12-08 16:40:51 +0100 (mar., 08 déc. 2009) | 4 lines
Issue #6986 : Fix crash in the JSON C accelerator when called with the
wrong parameter types. Patch by Victor Stinner.
........
................
2009-12-08 16:00:03 +00:00
Antoine Pitrou
781eba7972
Merged revisions 76708 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76708 | antoine.pitrou | 2009-12-08 16:40:51 +0100 (mar., 08 déc. 2009) | 4 lines
Issue #6986 : Fix crash in the JSON C accelerator when called with the
wrong parameter types. Patch by Victor Stinner.
........
2009-12-08 15:57:31 +00:00
Georg Brandl
ab91fdef1f
Merged revisions 73715 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line
convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson
c9c0f201fe
convert old fail* assertions to assert*
2009-06-30 23:06:06 +00:00
Raymond Hettinger
bcf6f92dc5
* Fix-up a TODO (support the sort_key option).
...
* Fix an error where True/False were being written-out
as title-cased strings when used a dictionary keys.
* Speed-up iteration over dicts by looping over items()
rather than keys() followed by value lookups.
* TODO: sort only by keys, not keys and values.
2009-05-27 09:58:34 +00:00
Raymond Hettinger
c8d952dfe4
Issue 6105: json encoder to respect iteration order of its inputs.
2009-05-27 06:50:31 +00:00
Georg Brandl
596820539f
Merged revisions 72314 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72314 | georg.brandl | 2009-05-05 09:48:12 +0200 (Di, 05 Mai 2009) | 1 line
#5932 : fix error return in _convertPyInt_AsSsize_t() conversion function.
........
2009-05-05 07:52:05 +00:00
Benjamin Peterson
c6b607d4a9
port simplejson upgrade from the trunk #4136
...
json also now works only with unicode strings
Patch by Antoine Pitrou; updated by me
2009-05-02 12:36:44 +00:00
Raymond Hettinger
0ad98d8509
Forward port r70471: Add object_pairs_hook. Issue 5381.
2009-04-21 03:09:17 +00:00
Benjamin Peterson
a13d475901
merge r66932 and add a few py3k only checks
2008-10-16 21:17:24 +00:00
Antoine Pitrou
fd036451bf
#2834 : Change re module semantics, so that str and bytes mixing is forbidden,
...
and str (unicode) patterns get full unicode matching by default. The re.ASCII
flag is also introduced to ask for ASCII matching instead.
2008-08-19 17:56:33 +00:00
Christian Heimes
e4ca8156ef
Merged revisions 62805,62811,62841-62842,62848-62849,62853-62854 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62805 | christian.heimes | 2008-05-07 01:59:53 +0200 (Wed, 07 May 2008) | 1 line
Re-added getbuildinfo.c solution item
........
r62811 | benjamin.peterson | 2008-05-07 04:23:43 +0200 (Wed, 07 May 2008) | 2 lines
update .bzrignore
........
r62841 | christian.heimes | 2008-05-08 00:54:17 +0200 (Thu, 08 May 2008) | 1 line
Replace more float hacks with correct math functions
........
r62842 | benjamin.peterson | 2008-05-08 01:11:54 +0200 (Thu, 08 May 2008) | 2 lines
Practice EAFP, and revert 62787
........
r62848 | raymond.hettinger | 2008-05-08 06:35:20 +0200 (Thu, 08 May 2008) | 1 line
Frozensets do not benefit from autoconversion.
........
r62849 | raymond.hettinger | 2008-05-08 06:36:12 +0200 (Thu, 08 May 2008) | 1 line
The __all__ variable forgot to expose the gcd() function.
........
r62853 | raymond.hettinger | 2008-05-08 09:23:30 +0200 (Thu, 08 May 2008) | 1 line
Fix-up the enumerate type example and move it to the end.
........
r62854 | ronald.oussoren | 2008-05-08 12:34:39 +0200 (Thu, 08 May 2008) | 3 lines
Fix for issue 1770190: platform.mac_ver() now returns the right
version on OSX 10.4.10
........
2008-05-08 17:18:53 +00:00
Christian Heimes
90540004d3
Merged revisions 62734,62736,62748,62769 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62734 | brett.cannon | 2008-05-05 22:21:38 +0200 (Mon, 05 May 2008) | 5 lines
Add the 'json' package. Code taken from simplejson 1.9 and contributed by Bob
Ippolito.
Closes issue #2750 .
........
r62736 | georg.brandl | 2008-05-05 22:53:39 +0200 (Mon, 05 May 2008) | 2 lines
Fix JSON module docs.
........
r62748 | benjamin.peterson | 2008-05-06 04:51:10 +0200 (Tue, 06 May 2008) | 2 lines
PEP 8 nits in json package
........
r62769 | christian.heimes | 2008-05-06 18:18:41 +0200 (Tue, 06 May 2008) | 2 lines
Intern static string
Use float constructors instead of magic code for float constants
........
2008-05-08 14:29:10 +00:00