Commit graph

3683 commits

Author SHA1 Message Date
Antoine Pitrou
1c13f84f55 Simplify code in marshal.c. 2012-03-02 18:22:23 +01:00
Antoine Pitrou
b2677c7397 Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). 2012-03-02 18:16:38 +01:00
Antoine Pitrou
679e9d36f7 Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). 2012-03-02 18:12:43 +01:00
Brett Cannon
efb00c0cc1 Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
2012-02-29 18:31:31 -05:00
Nick Coghlan
ab7bf2143e Close issue #6210: Implement PEP 409 2012-02-26 17:49:52 +10:00
Victor Stinner
90f50d4df9 Issue #13706: Fix format(float, "n") for locale with non-ASCII decimal point (e.g. ps_aF) 2012-02-24 01:44:47 +01:00
Victor Stinner
41a863cb81 Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
   (from the locale encoding), instead of decoding them implicitly from latin1
 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
 * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
   character if unicode is NULL
 * Replace MIN/MAX macros by Py_MIN/Py_MAX
 * stringlib/undef.h undefines STRINGLIB_IS_UNICODE
 * stringlib/localeutil.h only supports Unicode
2012-02-24 00:37:51 +01:00
Antoine Pitrou
cf1c8339f9 Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. 2012-02-22 18:08:30 +01:00
Antoine Pitrou
4f22a8d739 Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. 2012-02-22 18:05:43 +01:00
Antoine Pitrou
7214612443 In find_module(), do not silence fileno() and dup() errors. 2012-02-22 18:03:04 +01:00
Benjamin Peterson
c9f54cf512 enable hash randomization by default 2012-02-21 16:08:05 -05:00
Antoine Pitrou
528b54b263 Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:08:26 +01:00
Antoine Pitrou
86838b02f0 Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:03:47 +01:00
Benjamin Peterson
d9a3591ed1 merge 3.2 2012-02-21 11:12:14 -05:00
Benjamin Peterson
e249dcab7a merge 3.2 2012-02-21 11:09:13 -05:00
Benjamin Peterson
69e9727657 ensure no one tries to hash things before the random seed is found 2012-02-21 11:08:50 -05: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
91e5c08fe8 Fix typo in conditional. 2012-02-20 23:49:29 +01:00
Georg Brandl
12897d7d39 Fix typo in conditional. 2012-02-20 23:49:29 +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
Antoine Pitrou
c229e6e8ff Issue #14040: Remove rarely used file name suffixes for C extensions (under POSIX mainly).
This will improve import performance a bit (especially under importlib).
2012-02-20 19:41:11 +01:00
Victor Stinner
4195b5caea Backout f8409b3d6449: the PEP 410 is not accepted yet 2012-02-08 23:03:19 +01:00
Victor Stinner
ccd5715a14 PEP 410 2012-02-08 14:31:50 +01:00
Victor Stinner
09225b73c1 Issue #13845: time.time() now uses GetSystemTimeAsFileTime() instead of ftime()
to have a resolution of 100 ns instead of 1 ms (the clock accuracy is between
0.5 ms and 15 ms).
2012-02-07 23:41:01 +01:00
Petri Lehtinen
4b0eab62f0 Merge branch 3.2
Closes #13402.
2012-02-02 21:23:15 +02:00
Petri Lehtinen
9713321f46 Document absoluteness of sys.executable
Closes #13402.
2012-02-02 20:59:50 +02:00
Victor Stinner
ed27785b32 Issue #13706: Add assertions to detect bugs earlier 2012-02-01 00:22:23 +01:00
Victor Stinner
a3dd409b52 Remove now useless arbitrary limit of module name length 2012-01-26 00:31:49 +01:00
Antoine Pitrou
581616624d Port import fixes from 2.7. 2012-01-25 18:06:07 +01:00
Antoine Pitrou
33d15f7c85 Port import fixes from 2.7. 2012-01-25 18:01:45 +01:00
Antoine Pitrou
abaf89b2be Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. 2012-01-24 17:45:50 +01:00
Antoine Pitrou
2be60afb7e Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. 2012-01-24 17:44:06 +01:00
Amaury Forgeot d'Arc
6d766fc3fa Silence last compilation warning. 2012-01-23 23:20:43 +01:00
Amaury Forgeot d'Arc
cd27df3a99 Fix compilation warnings (seen on win32 buildbot) 2012-01-23 22:42:19 +01:00
Benjamin Peterson
ce79852077 use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
2012-01-22 11:24:29 -05:00
Victor Stinner
a4ac600d6f Issue #13706: Support non-ASCII fill characters 2012-01-21 15:50:49 +01:00
Eric V. Smith
d25cfe66f5 Improve exception text. Closes issue 13811. 2012-01-19 20:04:28 -05:00
Meador Inge
fa21bf015d Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00
Antoine Pitrou
f0ecdd2ab9 Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry. 2012-01-18 22:31:12 +01:00
Antoine Pitrou
1b468af7be Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry. 2012-01-18 22:30:21 +01:00
Antoine Pitrou
aa5c5c60f1 Finally fix all test_capi refleaks 2012-01-18 21:45:15 +01:00
Antoine Pitrou
165e01f83f Fix the builtin module initialization code to store the init function for future reinitialization. 2012-01-18 20:17:58 +01:00
Antoine Pitrou
6c40eb7f42 Fix the builtin module initialization code to store the init function for future reinitialization. 2012-01-18 20:16:09 +01:00
Antoine Pitrou
fff47ab342 Fix a memory leak when initializing the standard I/O streams. 2012-01-18 15:28:38 +01:00
Antoine Pitrou
2fabface50 Fix a memory leak when initializing the standard I/O streams. 2012-01-18 15:14:46 +01:00
Benjamin Peterson
c64ae92bf1 fix indentation 2012-01-16 18:02:21 -05:00
Benjamin Peterson
c8909ddd28 break out switch at correct place 2012-01-16 17:44:12 -05:00
Benjamin Peterson
205ad61313 only finish error if one occurred 2012-01-16 17:31:43 -05:00
Benjamin Peterson
c0beabc2a5 move LINENO define to where it actually belongs 2012-01-16 17:29:05 -05:00