Commit graph

3650 commits

Author SHA1 Message Date
Vinay Sajip
5bdae3bb7c Closes #12291: Fixed bug which was found when doing multiple loads from one stream. 2011-07-02 16:42:47 +01:00
Benjamin Peterson
9d872e19aa fix possibily uninitialized memory usage (closes #12474) 2011-07-02 09:22:13 -05:00
Benjamin Peterson
609da58ae5 store the current scope on the stack right away 2011-06-29 22:52:39 -05:00
Benjamin Peterson
c2575d55cd remove VISIT_*_IN_BLOCK macros
These are pointless because on error, all blocks will be finalized by
symtable_dealloc.
2011-06-29 15:27:14 -05:00
Benjamin Peterson
9003760991 map cells to arg slots at code creation time (closes #12399)
This removes nested loops in PyEval_EvalCodeEx.
2011-06-25 22:54:45 -05:00
Victor Stinner
e71db4450c Issue #12392: fix thread initialization on FreeBSD 6
On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation
of the first thread. Create therefore a dummy thread (no-op) a startup to
initialize the pthread library.

Add also a test for this use case, test written by Charles-François Natali.
2011-06-24 20:52:27 +02:00
Benjamin Peterson
e109c70860 give the names of missing positional or keyword-only arguments (closes #12356) 2011-06-24 09:37:26 -05:00
Benjamin Peterson
28db0fd357 merge 3.2 2011-06-20 22:09:20 -05:00
Benjamin Peterson
b7149cad04 fix indentation 2011-06-20 22:09:13 -05:00
Benjamin Peterson
267ca6cb23 merge 3.2 2011-06-20 21:40:46 -05:00
Benjamin Peterson
f63d615f8b fix indentation 2011-06-20 21:40:19 -05:00
Victor Stinner
d417d01ec8 call_find_module() handles dup() failure: raise an OSError exception 2011-06-20 15:16:55 +02:00
Victor Stinner
925ef39949 find_module_path_list() fails if _Py_fopen() failed and raised an exception
(UnicodeEncodeError).
2011-06-20 15:01:10 +02:00
Benjamin Peterson
e7c15fa184 bump magic for super closure change 2011-06-19 19:54:45 -05:00
Benjamin Peterson
f5ff22329b use a invalid name for the __class__ closure for super() (closes #12370)
This prevents the assignment of __class__ in the class body from breaking
super. (Although a determined person could do locals()["@__class__"] = 4)
2011-06-19 19:42:22 -05:00
Brian Curtin
589f89e2ad Removed a Windows 9x trick used before LoadLibraryExW.
Windows 9x has long been unsupported and the result of GetFullPathName
was not even being used in the first place.
2011-06-09 17:55:54 -05:00
Benjamin Peterson
b204a42383 greatly improve argument parsing error messages (closes #12265) 2011-06-05 22:04:07 -05:00
Benjamin Peterson
48deae12d5 some horrible preprocessing tricks to automatically update the tag 2011-06-03 17:50:16 -05:00
Vinay Sajip
623e8b86af Removed some unused local variables. 2011-07-02 17:21:37 +01:00
Benjamin Peterson
04a90b4611 bump ast version 2011-05-29 11:45:29 -05:00
Benjamin Peterson
43af12b0b4 unify TryExcept and TryFinally (closes #12199) 2011-05-29 11:43:10 -05:00
Ned Deily
61be422bd7 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:45:52 -07:00
Ned Deily
056f5b9dad Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:36:12 -07:00
Ned Deily
9a7c524dc6 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:19:56 -07:00
Benjamin Peterson
d8255e0e9e merge 3.2 2011-05-27 14:17:35 -05:00
Benjamin Peterson
a290bac5b1 merge 3.1 2011-05-27 14:17:19 -05:00
Benjamin Peterson
0a5dad9ef1 fix spacing 2011-05-27 14:17:04 -05:00
Benjamin Peterson
4a0f20f5a3 merge 3.2 2011-05-27 14:12:53 -05:00
Benjamin Peterson
5218853c67 merge 3.1 2011-05-27 14:10:36 -05:00
Benjamin Peterson
74897ba46f fix indentation 2011-05-27 14:10:24 -05:00
Benjamin Peterson
7f670e5dad bump ast version 2011-05-27 14:01:01 -05:00
Benjamin Peterson
bf1bbc1452 reflect with statements with multiple items in the AST (closes #12106) 2011-05-27 13:58:08 -05:00
Victor Stinner
4f2dab5c33 Revert my commit 7ba176c2f558: "Avoid useless "++" at the end of functions
Warnings found by the Clang Static Analyzer."

Most people prefer ++ at the end of functions.
2011-05-27 16:46:51 +02:00
Benjamin Peterson
43b068648e try to use the same str object for all code filenames when compiling or unmarshalling (#12190)
This should reduce memory usage.
2011-05-27 09:08:01 -05:00
Benjamin Peterson
d408503b2c remove unused string WILFE attribute 2011-05-27 07:53:28 -05:00
Victor Stinner
13b21bd749 print_exception(): handle correctly PyObject_GetAttrString() failure
Bug found by the Clang Static Analyzer.
2011-05-26 14:25:13 +02:00
Victor Stinner
97e561ef24 Avoid useless "++" at the end of functions
Warnings found by the Clang Static Analyzer.
2011-05-26 13:53:47 +02:00
Victor Stinner
25095b2be6 Remove useless assignments
Warnings found by the the Clang Static Analyzer.
2011-05-26 13:47:08 +02:00
Benjamin Peterson
04778a8150 make PyImport_ImportModuleLevel's first arg const like similiar functions (closes #12173) 2011-05-25 09:29:00 -05:00
Victor Stinner
118ed71afe (Merge 3.2) Issue #11614: import __hello__ prints "Hello World!". Patch written
by Andreas Stührk.
2011-05-16 16:35:35 +02:00
Victor Stinner
9cd6626f3d (Merge 3.1) Issue #11614: import __hello__ prints "Hello World!". Patch written
by Andreas Stührk.
2011-05-16 16:32:33 +02:00
Victor Stinner
c77b931196 Issue #11614: import __hello__ prints "Hello World!". Patch written by Andreas
Stührk.
2011-05-16 16:29:35 +02:00
Georg Brandl
1a4de20d95 Merge #6498 fix from 3.2. 2011-05-15 08:49:38 +02:00
Georg Brandl
318e62153b Merge #6498 fix from 3.1. 2011-05-15 08:49:29 +02:00
Georg Brandl
0b2489e986 Closes #6498: fix several misspellings of "SystemExit" as "SystemError". 2011-05-15 08:49:12 +02:00
Victor Stinner
65b7eff7c7 _PyImport_LoadDynamicModule() encodes the module name explicitly to ASCII
The name must be encodable to ASCII because dynamic module must have a function
called "PyInit_NAME", they are written in C, and the C language doesn't accept
non-ASCII identifiers.
2011-05-07 12:46:05 +02:00
Victor Stinner
7bba62fd68 faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True
 * Py_FatalError() dumps all threads, instead of only the current thread

Dump only the current thread is not reliable. In some cases, Python is unable
to retrieve the state of the current thread and so is unable to dump the
traceback. faulthandler keeps a reference to the interpreter and so is always
able to dump the traceback of all threads.
2011-05-07 12:43:00 +02:00
Antoine Pitrou
fc20b0c65c Issue #1856: Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:04:29 +02:00
Antoine Pitrou
0d5e52d346 Issue #1856: Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:02:30 +02:00
Victor Stinner
d5c355ccc7 Issue #11223: Replace threading._info() by sys.thread_info 2011-04-30 14:53:09 +02:00