Commit Graph

3676 Commits

Author SHA1 Message Date
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
Benjamin Peterson 55e0043a51 streamline normalizer identification a bit 2012-01-16 17:22:31 -05:00
Benjamin Peterson d3af6e30a2 fix spelling 2012-01-16 09:56:35 -05:00
Benjamin Peterson de5827dcd2 invert condition (head bang) 2012-01-16 09:55:53 -05:00
Benjamin Peterson 0fa35ea8f3 fix possible refleaks 2012-01-16 09:50:48 -05:00
Benjamin Peterson 89f8b80202 use helpful PyUnicode_IS_ASCII macro 2012-01-16 09:49:20 -05:00
Benjamin Peterson 5eda913cd2 PyUnicode_DecodeUTF8 will always return a ready string 2012-01-16 09:47:42 -05:00
Benjamin Peterson 8f56e0909f rewrite such that this actually makes sense 2012-01-16 09:42:36 -05:00