Commit graph

4073 commits

Author SHA1 Message Date
Ezio Melotti
92bd4ef640 Merge importlib.h rebuild from 3.3 after the changes introduced in 65eaac000147. 2013-02-20 22:15:47 +02:00
Ezio Melotti
795c10b3b6 Rebuild importlib.h after the changes introduced in 0f65bf6063ca. 2013-02-20 21:42:46 +02:00
Antoine Pitrou
7056cb2867 Issue #17170: speed up PyArg_ParseTuple[AndKeywords] a bit. 2013-02-17 01:04:57 +01:00
Ezio Melotti
178e6fef9e #17178: merge with 3.3. 2013-02-15 23:38:23 +02:00
Ezio Melotti
293ab9728a #17178: merge with 3.2. 2013-02-15 23:38:05 +02:00
Ezio Melotti
b19ed57d8d #17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan. 2013-02-15 23:35:14 +02:00
Serhiy Storchaka
0c15b5d897 Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
2013-02-13 12:12:11 +02:00
Serhiy Storchaka
5a1f152d19 Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
2013-02-13 12:11:03 +02:00
Serhiy Storchaka
7e0191170e Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
2013-02-13 12:08:15 +02:00
Serhiy Storchaka
b8cbba5877 Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
and a full traceback including line number.
2013-02-10 17:43:25 +02:00
Serhiy Storchaka
801d955f04 Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
and a full traceback including line number.
2013-02-10 17:42:01 +02:00
Serhiy Storchaka
5e61f14c6d Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
and a full traceback including line number.
2013-02-10 17:36:00 +02:00
Benjamin Peterson
419d9a83d5 evaluate lambda keyword-only defaults after positional defaults (#16967 again) 2013-02-10 09:48:22 -05:00
Benjamin Peterson
1ef876cd28 evaluate positional defaults before keyword-only defaults (closes #16967) 2013-02-10 09:29:59 -05:00
Antoine Pitrou
8ad5b07ccb Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
2013-02-09 23:16:51 +01:00
Antoine Pitrou
c73c561181 Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
2013-02-09 23:14:42 +01:00
Antoine Pitrou
4de7457009 Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
2013-02-09 23:11:27 +01:00
Brett Cannon
85ae3566d1 Merge w/ 3.3 more fixes thanks to issue #17098 2013-02-01 16:36:29 -05:00
Brett Cannon
da9cf0eef8 Issue #17098: Be more stringent of setting __loader__ on early imported
modules. Also made test more rigorous.
2013-02-01 15:31:49 -05:00
Brett Cannon
0ecd30b4af Issue #17098: Make sure every module has __loader__ defined.
Thanks to Thomas Heller for the bug report.
2013-02-01 14:04:12 -05:00
Brett Cannon
f3220d6af7 Tweak an exception message 2013-01-27 13:04:56 -05:00
Brett Cannon
14581d5dc4 Port py_compile over to importlib 2013-01-26 08:48:36 -05:00
Brett Cannon
686e880f20 Touch up exception messaging 2013-01-25 13:49:19 -05:00
Martin v. Löwis
b26a9b10ea Replace WaitForSingleObject with WaitForSingleObjectEx,
for better WinRT compatibility.
2013-01-25 14:25:48 +01:00
Martin v. Löwis
3f50bf652b Drop support for Windows 2000; allow any XP API (but not Vista+).
Drop SDK version configuration for Tk compilation, to not bind it to W2k
anymore. Binding it to XP would conflict with Tk's own binding of tkMenu to W2k.
2013-01-25 14:06:18 +01:00
Benjamin Peterson
51f4616f6e revert #16672 for incorrect semantics 2013-01-23 08:38:47 -05:00
Benjamin Peterson
f0472f6995 merge 3.3 2013-01-19 14:58:51 -05:00
Benjamin Peterson
c71741f413 remove unnecessary clearing of list 2013-01-19 14:58:38 -05:00
Philip Jenvey
215c49a509 thinko 2013-01-15 13:24:12 -08:00
Brett Cannon
569ff4fbbc Issue #15031: Refactor some code in importlib pertaining to validating
and compiling bytecode.

Thanks to Ronan Lamy for pointing the redundancy and taking an initial
stab at the refactor (as did Nick Coghlan).
2013-01-11 18:09:25 -05:00
Brett Cannon
c57f9f9419 Merge from 3.3 for fix for issue #16730 2013-01-11 15:42:30 -05:00
Brett Cannon
a9976b3e32 Issue #16730: Don't raise an exception in
importlib.machinery.FileFinder when the directory has become
unreadable or a file. This brings semantics in line with Python 3.2
import.

Reported and diagnosed by David Pritchard.
2013-01-11 15:40:12 -05:00
Victor Stinner
7ae320d667 (Merge 3.2) Issue #16455: On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
2013-01-03 01:21:07 +01:00
Victor Stinner
20b654acb5 Issue #16455: On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
2013-01-03 01:08:58 +01:00
Benjamin Peterson
ae2039e62c merge 3.3 2012-12-31 21:37:30 -06:00
Benjamin Peterson
198399d92c bring Python into 2013 2012-12-31 21:37:21 -06:00
Andrew Svetlov
f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
Andrew Svetlov
3ba3a3ee56 Issue #15422: get rid of PyCFunction_New macro 2012-12-25 13:32:35 +02:00
Benjamin Peterson
6f0c94df50 improve tracing performance when f_trace is NULL (closes #16672)
Patch by Xavier de Gaye.
2012-12-24 11:53:30 -06:00
Benjamin Peterson
fc8f5c5e0f update importlib.h 2012-12-19 15:16:51 -06:00
Andrew Svetlov
2606a6f197 Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
2012-12-19 14:33:35 +02:00
Antoine Pitrou
ad8c461e2c Add sanity assertions in some import lock code (issue #15599). 2012-12-18 22:18:58 +01:00
Antoine Pitrou
202b60640b Add sanity assertions in some import lock code (issue #15599). 2012-12-18 22:18:17 +01:00
Andrew Svetlov
ad28c7f9da Issue #16706: get rid of os.error 2012-12-18 22:02:39 +02:00
Benjamin Peterson
9272279afd use error label instead of breaking eval loop (closes #16693) 2012-12-15 12:51:05 -05:00
Benjamin Peterson
5cb8a31dc4 cleanup and fix refleaks 2012-12-15 00:05:16 -05:00
Andrew Svetlov
6b2cbeba58 Issue #16421: allow to load multiple modules from the same shared object.
Patch by Václav Šmilauer.
2012-12-14 17:04:59 +02:00
Philip Jenvey
f76f0eea5c compile doesn't accept code objects 2012-12-13 15:44:18 -08:00
Antoine Pitrou
f9d0b1256f Issue #13390: New function :func:sys.getallocatedblocks() returns the number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
2012-12-09 14:28:26 +01:00
Benjamin Peterson
70b224d8d4 assert than we never try to deal with True, False, or None as a name 2012-12-06 17:49:58 -05:00