Benjamin Peterson
aad1d87339
move declaration to top of block
2013-03-18 10:59:41 -07:00
Benjamin Peterson
cda75be02a
unify some ast.argument's attrs; change Attribute column offset ( closes #16795 )
...
Patch from Sven Brauch.
2013-03-18 10:48:58 -07:00
Benjamin Peterson
aa14dc3b4e
C89 compliance
2013-03-16 15:38:28 -07:00
Benjamin Peterson
2d6acd2ac2
reject non-docs strings between future imports ( closes #17434 )
2013-03-16 09:15:47 -07:00
Benjamin Peterson
7701e6ef93
make some freezing related stuff const
2013-03-13 14:06:39 -05:00
Brett Cannon
4802becb16
Issue #17117 : Have both import itself and importlib.util.set_loader()
...
set __loader__ on a module when set to None.
Thanks to Gökcen Eraslan for the fix.
2013-03-13 10:41:36 -07:00
Ezio Melotti
04a29554c1
#17032 : The "global" in the "NameError: global name 'x' is not defined" error message has been removed. Patch by Ram Rachum.
2013-03-03 15:12:44 +02:00
Brett Cannon
c190389834
Issue #17220 : two fixes for changeset 2528e4aea338.
...
First, because the mtime can exceed 4 bytes, make sure to mask it down to 4
bytes before getting its little-endian representation for writing out to a .pyc
file.
Two, cap an rsplit() call to 1 split, else can lead to too many values being
returned for unpacking.
2013-02-25 17:10:11 -05:00
Serhiy Storchaka
39e47f94ec
Issue #17220 : Little cleanup of _bootstrap.py.
2013-02-25 15:40:33 +02:00
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