Commit Graph

4000 Commits

Author SHA1 Message Date
Brett Cannon e4710cfced Issue #15894: Document why we don't worry about re-acquiring the
global import lock after forking.
2012-11-15 21:39:36 -05:00
Victor Stinner 0d92c4f667 Issue #16416: Fix error handling in _Py_wchar2char() _Py_char2wchar() functions 2012-11-12 23:32:21 +01:00
Benjamin Peterson fc93ec5966 merge heads 2012-11-12 17:04:43 -05:00
Benjamin Peterson c7a8a210d6 merge 3.3 (sort of) 2012-11-12 17:04:28 -05:00
Victor Stinner e262377cab Issue #16416: OS data are now always encoded/decoded to/from
UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no
locale environment variable is set), to avoid inconsistencies with
os.fsencode() and os.fsdecode() functions which are already using
UTF-8/surrogateescape.
2012-11-12 23:04:02 +01:00
Benjamin Peterson 2a0e226131 recompile importlib.h 2012-11-12 17:02:32 -05:00
Stefan Krah abaca8cb06 Merge 3.3. 2012-11-12 20:24:09 +01:00
Stefan Krah 6df5cae49a Issue #15835: Define PATH_MAX on HP-UX. 2012-11-12 20:14:36 +01:00
Hynek Schlawack 15c02e3048 Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:10:49 +01:00
Hynek Schlawack 33363f43e3 Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:07:22 +01:00
Hynek Schlawack 5c6b3e214c Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:02:24 +01:00
Ezio Melotti 6c5f5210be #5057: the peepholer no longer optimizes subscription on unicode literals (e.g. u"foo"[0]) in order to produce compatible pyc files between narrow and wide builds. 2012-11-05 00:06:32 +02:00
Nick Coghlan e69bfc3fb6 Issue #5765: Merge from 3.3 2012-11-04 23:53:15 +10:00
Nick Coghlan aab9c2b2ea Issue #5765: Apply a hard recursion limit in the compiler
Previously, excessive nesting in expressions would blow the
stack and segfault the interpreter. Now, a hard limit based
on the configured recursion limit and a hardcoded scaling
factor is applied.
2012-11-04 23:14:34 +10:00
Ezio Melotti 1e58ae44df #16336: merge with 3.3. 2012-11-03 23:05:18 +02:00
Ezio Melotti a0b5c46fa2 #16336: merge with 3.2. 2012-11-03 23:04:41 +02:00
Ezio Melotti 540da76115 #16336: fix input checking in the surrogatepass error handler. Patch by Serhiy Storchaka. 2012-11-03 23:03:39 +02:00
Andrew Svetlov 76bcff27b2 Issue #7317: Display full tracebacks when an error occurs asynchronously.
Patch by Alon Horev with update by Alexey Kachayev.
2012-11-03 15:56:05 +02:00
Andrew Svetlov 1511a5a3af Merge issue #16218: Support non ascii characters in python launcher.
Patch by Serhiy Storchaka.
2012-11-01 14:52:03 +02:00
Andrew Svetlov 90c0eb28c5 Issue #16218: Support non ascii characters in python launcher.
Patch by Serhiy Storchaka.
2012-11-01 14:51:14 +02:00
Benjamin Peterson d9c8702c0f point errors related to nonlocals and globals to the statement declaring them (closes #10189) 2012-10-31 20:26:20 -04:00
Benjamin Peterson da58c3d81a merge 3.3 2012-10-31 19:01:48 -04:00
Benjamin Peterson e132f527c9 check return value of _PyUnicode_AsString 2012-10-31 19:01:42 -04:00
Benjamin Peterson 42124a727d initialize map/filter/zip in _PyBuiltin_Init rather than the catch-all function 2012-10-30 23:41:54 -04:00
Victor Stinner 76df43de30 Issue #16330: Use surrogate-related macros
Patch written by Serhiy Storchaka.
2012-10-30 01:42:39 +01:00
Philip Jenvey 16bb5450d6 merge with 3.3 2012-10-26 17:05:55 -07:00
Philip Jenvey 5f9459fbed merge with 3.2 2012-10-26 17:05:09 -07:00
Philip Jenvey 45c41494bf bounds check for bad data (thanks amaury) 2012-10-26 17:01:53 -07:00
Nick Coghlan 557c76c136 Fix compilation on Windows 2012-10-20 11:43:58 +10:00
Nick Coghlan d4f5ad6c6e Merge fix from #6074 from 3.3 2012-10-19 23:36:15 +10:00
Nick Coghlan eb8d627bbd Issue #6074: Apply an appropriate fix for importlib based imports 2012-10-19 23:32:00 +10:00
Nick Coghlan 34937ce249 Issue #6074: Forward port Windows read-only source file fix from 2.7 2012-10-19 22:38:14 +10:00
Christian Heimes 743e0cd6b5 Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
2012-10-17 23:52:17 +02:00
Trent Nelson 744faddae8 Merge issue #15833: don't raise an exception if importlib can't write
byte-compiled files.

This fixes a regression introduced by 3.3.

Patch by Charles-François Natali.
2012-10-16 08:03:21 -04:00
Trent Nelson d783c8ed00 Issue #15833: don't raise an exception if importlib can't write byte-compiled
files.

This fixes a regression introduced by 3.3.  Patch by Charles-François Natali.
2012-10-16 07:47:34 -04:00
Benjamin Peterson fe1bcb64cd move more variable declarations to the top of blocks 2012-10-12 11:40:01 -04:00
Benjamin Peterson f208df3618 move declaration to top of block 2012-10-12 11:37:56 -04:00
Benjamin Peterson 31a58ff1c3 ceval cleanup
- Make many variables local to the opcode; Kill u, v, w, and x.
- Force every opcode to end with DISPATCH or jump to error handling.
- Simplify error handling.
- Check error statuses in more places.

Closes #16191.
2012-10-12 11:34:51 -04:00
Brett Cannon 6072e0bf42 Remove uses of % with str.format. 2012-10-12 10:00:34 -04:00
Brett Cannon 9407d50208 Merge fix for issue #15111. 2012-10-10 19:18:37 -04:00
Brett Cannon a6ce4fd426 Closes issue #15111: Calling __import__ with a module specified in
fromlist which causes its own ImportError (e.g. the module tries to
import a non-existent module) should have that exception propagate.
2012-10-10 19:03:46 -04:00
Benjamin Peterson 00f86f2202 add some missing DISPATCH() 2012-10-10 14:10:33 -04:00
Jesus Cea f01d695ccd Closes #16135: Removal of OS/2 support 2012-10-05 03:36:11 +02:00
Jesus Cea b48925a406 #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
Victor Stinner 3b635cd447 Close #15766: Catch exceptions while raising the ImportError in imp.load_dynamic() 2012-10-02 00:55:07 +02:00
Victor Stinner 621ef3d84f Issue #15609: Optimize str%args for integer argument
- Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid
   a temporary buffer
 - Enable the fast path when width is smaller or equals to the length,
   and when the precision is bigger or equals to the length
 - Add unit tests!
 - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII()
   to resize the output string
2012-10-02 00:33:47 +02:00
Brett Cannon 8ed677db12 Add some comments. 2012-09-28 16:41:39 -04:00
Benjamin Peterson feaa54f537 don't depend on __debug__ because it's baked in at freeze time (issue #16046) 2012-09-25 11:22:59 -04:00
Antoine Pitrou ca8aa4acf6 Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
2012-09-20 20:56:47 +02:00
Christian Heimes 10ca1fee8f Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases. 2012-09-12 17:58:20 +02:00