Commit Graph

4022 Commits

Author SHA1 Message Date
Brett Cannon a53cca3fea Issue #18351: Fix various issues with
importlib._bootstrap._get_sourcefile().

Thanks to its only use by the C API, it was never properly tested
until now.

Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
2013-07-06 17:56:43 -04:00
Christian Heimes b9dbc7d6e1 Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
tstate is first removed from TLS and then deallocated.
CID 1019639 (#1 of 1): Use after free (USE_AFTER_FREE)
 use_after_free: Using freed pointer tstate.
2013-07-01 23:42:28 +02:00
Victor Stinner 2f084ecfe7 Issue #18137: Detect integer overflow on precision in float.__format__() and
complex.__format__().
2013-06-23 14:54:30 +02:00
Antoine Pitrou 9a00e0a41c Issue #18256: Compilation fix for recent AIX releases. Patch by David Edelsohn. 2013-06-18 22:17:48 +02:00
Brett Cannon 1d75382e81 Fix a misnaming of a method and an argument 2013-06-16 19:06:55 -04:00
Richard Oudkerk 409f90237c Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows(). 2013-06-10 15:38:54 +01:00
Benjamin Peterson e2135c6158 move definition to top of block 2013-05-16 19:38:22 -05:00
Benjamin Peterson 1e93b06007 complain about "global __class__" in a class body (closes #17983) 2013-05-15 16:17:25 -05:00
Benjamin Peterson e1b4cbc422 when arguments are cells clear the locals slot (backport of #17927) 2013-05-14 22:31:26 -05:00
Antoine Pitrou fd417cc54b Fix crash caused by 8c1385205a35
(thanks Arfrever for reporting).
2013-05-05 08:12:42 +02:00
Antoine Pitrou 957a23b088 Issue #17408: Avoid using an obsolete instance of the copyreg module when the interpreter is shutdown and then started again. 2013-05-04 20:45:02 +02:00
Benjamin Peterson fe1b22af0a ignore errors when trying to fetch sys.stdin.encoding (closes #17863) 2013-04-29 10:23:08 -04:00
Benjamin Peterson 7d110042c5 raise an ImportError (rather than fatal) when __import__ is not found in __builtins__ (closes #17867) 2013-04-29 09:08:14 -04:00
R David Murray 3583761bcd #17413: make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
2013-04-19 12:56:57 -04:00
Ezio Melotti 1b6424fc4b Fix indentation. 2013-04-19 07:10:09 +03:00
Serhiy Storchaka 278d03bd66 Revert a premature patch for issue #14010 (changeset aaaf36026511). 2013-04-06 22:52:34 +03:00
Antoine Pitrou 55bff89190 Issue #17645: convert an assert() into a proper exception in _Py_Mangle(). 2013-04-06 21:21:04 +02:00
Serhiy Storchaka e8f706eda7 Issue #14010: Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
2013-04-06 21:14:43 +03:00
Richard Oudkerk 614c578dec Issue #17619: Make input() check for Ctrl-C correctly on Windows. 2013-04-03 13:44:50 +01:00
Brett Cannon f8ffec0617 Issue #17357: Add missing verbosity messages when running under
-v/-vv that were lost in the transition to importlib.
2013-04-01 13:10:51 -04:00
Gregory P. Smith b803c6c4b8 Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and
correctly check for errors on two CreateFileMapping calls.
2013-03-23 16:05:36 -07:00
Kristján Valur Jónsson dc32d18d11 Issue #15038 : Fixing the condition broadcast and docs. 2013-03-19 20:18:37 -07:00
Ezio Melotti 795c10b3b6 Rebuild importlib.h after the changes introduced in 0f65bf6063ca. 2013-02-20 21:42:46 +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 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 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
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 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
Benjamin Peterson c71741f413 remove unnecessary clearing of list 2013-01-19 14:58:38 -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 198399d92c bring Python into 2013 2012-12-31 21:37:21 -06:00
Antoine Pitrou 202b60640b Add sanity assertions in some import lock code (issue #15599). 2012-12-18 22:18:17 +01:00
Victor Stinner 41a234a679 Issue #16416: Fix compilation error 2012-12-03 14:11:57 +01:00
Victor Stinner 2660e427d1 (Merge 3.2) Issue #16416: On Mac OS X, operating system 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-12-03 12:48:53 +01:00
Victor Stinner 27b1ca29cc Issue #16416: On Mac OS X, operating system 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-12-03 12:47:59 +01:00
Christian Heimes 17485bf6f9 Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h 2012-12-02 08:38:42 +01:00
Christian Heimes 56379c0d8f Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h 2012-12-02 08:37:00 +01:00
Mark Dickinson ded35aeb9d Issue #16546: make ast.YieldFrom argument mandatory. 2012-11-25 14:36:26 +00:00
Ezio Melotti 8a6d1fed41 #16306: merge with 3.2. 2012-11-23 18:52:39 +02:00
Ezio Melotti a0dd22e5e8 #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
Ezio Melotti 3c76aa6b23 Remove unused variabile "plain" in builtin_exec. 2012-11-21 18:36:08 +02:00
Barry Warsaw 82c1c781c7 - Issue #16514: Fix regression causing a traceback when sys.path[0] is None
(actually, any non-string or non-bytes type).
2012-11-20 15:22:51 -05:00
Ezio Melotti f7c709d62d #16306: merge with 3.2. 2012-11-18 14:02:08 +02:00