| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
PyErr_Format computes size of buffer needed rather than relying on
static buffer.
|
|
|
|
|
| |
out again after we complete switching to C++ <wink>. Thanks to Greg Stein
for hitting me.
|
|
|
|
|
| |
add sanity check to gc: if an exception occurs during GC, call
PyErr_WriteUnraisable and then call Py_FatalEror.
|
|
|
|
| |
conservative.
|
|
|
|
|
|
|
| |
wngs;
un-analize Get's definition ("void" is needed only in declarations, not defns, &
is generally considered bad style in the latter).
|
|
|
|
|
|
|
|
|
|
|
| |
ceval.c:
define recurion_limit (static), default value is 2500
define Py_GetRecursionLimit and Py_SetRecursionLimit
raise RuntimeError if limit is exceeded
PC/config.h:
remove plat-specific definition
sysmodule.c:
add sys.(get|set)recursionlimit
|
|
|
|
|
| |
instead of four #if/#endif blocks. This shortens the
code and improves readability.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
of extended print. If the file object being printed to is None, then
sys.stdout is used.
|
|
|
|
|
|
|
| |
how 'import' was called with a compiletime mechanism: create either a tuple
of the import arguments, or None (in the case of a normal import), add it to
the code-block constants, and load it onto the stack before calling
IMPORT_NAME.
|
| |
|
|
|
|
| |
mean; the same as 'from mod import submod as s'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyRun_FileEx(). These are the same as their non-Ex counterparts but
have an extra argument, a flag telling them to close the file when
done.
Then this is used by Py_Main() and execfile() to close the file after
it is parsed but before it is executed.
Adding APIs seems strange given the feature freeze but it's the only
way I see to close the bug report without incompatible changes.
[ Bug #110616 ] source file stays open after parsing is done (PR#209)
|
|
|
|
|
|
| |
couple of potential stack overflows, including bug #110615.
closes patch #101238
|
| |
|
|
|
|
|
|
|
| |
fork. This solves the test_fork1 problem. (ceval.c, signalmodule.c,
intrcheck.c)
SourceForge: [ Patch #101226 ] make threading fork-safe
|
| |
|
|
|
|
|
|
|
| |
(This fix is a bit broken, just as the test already was: the test for
testlist and listmaker are done always, whereas the test for exprlist and
the actual abort() are only done if Py_DEBUG is defined. Suggestions
welcome, I guess ;)
|
|
|
|
|
|
| |
filename and line number of the call site to allow esier debugging.
This closes SourceForge patch #101214.
|
|
|
|
|
| |
Michael Hudson, and support in general for the augmented assignment syntax.
The graminit.c patch is large!
|
|
|
|
|
|
|
|
|
| |
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit. This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.
This closes the implementation portion of SourceForge patch #100893.
|
|
|
|
|
|
|
|
|
|
| |
- Fix bug in thread_pthread.h::PyThread_get_thread_ident() where
sizeof(pthread) < sizeof(long).
- Add 'configure' for:
- SIZEOF_PTHREAD is pthread_t can be included via <pthread.h>
- setting Monterey system name
- appropriate CC,LINKCC,LDSHARED,OPT, and CCSHARED for Monterey
- Add section in README for Monterey build
|
|
|
|
| |
the sources/build process any more.
|
| |
|
|
|
|
|
| |
in extended prints should only be evaluated once. This patch plays
stack games (documented!) to fix this.
|
|
|
|
| |
opcode additions.
|
|
|
|
|
|
|
| |
eval_code2(): Implement new bytecodes PRINT_ITEM_TO and
PRINT_NEWLINE_TO, as per accepted SF patch #100970.
Also update graminit.c based on related Grammar/Grammar changes.
|
|
|
|
|
|
| |
com_print_stmt(): Implement recognition of, and byte compilation for,
extended print using new byte codes PRINT_ITEM_TO and
PRINT_NEWLINE_TO.
|
|
|
|
|
|
|
|
|
|
| |
trying hard enough to find out what the arguments to an import were. There
is no test-case for this bug, yet, but this is what it looked like:
from encodings import cp1006, cp1026
ImportError: cannot import name cp1026
'__import__' was called with only the first name in the 'arguments' list.
|
|
|
|
|
|
|
|
|
|
| |
load mod.submod as m, or mod as m ? Both can be achieved differently, and
unambiguously. Also attempt to document this restriction (editor
appreciated!)
Note that this is an artificial check during compile, because incorporating
this in the grammar is hard, and then adjusting the compiler to do the right
thing with the right nodes is harder.
|
| |
|
| |
|
|
|
|
| |
thus preserving the first one that has been raised.
|
| |
|
|
|
|
|
|
| |
scope. Previously, s_buffer[] was defined inside the
PyUnicode_Check() scope, but referred to in the outer scope via
assignment to s. This quiets an Insure portability warning.
|
|
|
|
|
|
|
|
| |
name as n'. By doing some twists and turns, "as" is not a reserved word.
There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
|
|
|
|
| |
created from the "big"/"little" constant needs to be decref'd.
|
|
|
|
|
|
|
| |
First, the allocated buffer was never freed after using it to create
the PyString object. Second, it was possible that have_filename would
be false (meaning that filename was not a PyString object), but that
the code would still try to PyString_GET_SIZE() it.
|
|
|
|
|
|
| |
in binascii.c (only on platforms with signed chars -- although Py_CHARMASK
is documented as returning an int, it only does so on platforms with
signed chars).
|
|
|
|
|
|
|
|
| |
returning a pointer to the start of the file's "base" name;
similar to os.path.basename().
SyntaxError__str__(): Use my_basename() to keep the length of the
file name included in the exception message short.
|
|
|
|
| |
my last set of changes.
|
|
|
|
|
|
|
|
|
|
| |
filename and lineno attributes, but do not mask the SyntaxError if we
fail.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
Wrap a long line to fit in under 80 columns.
|
|
|
|
|
|
|
|
| |
filename and lineno attributes, but do not mask the SyntaxError if we
fail.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
|
|
|
|
|
|
|
|
|
| |
than depending on the site that raises the exception. If the
filename and lineno attributes are set on the exception object,
use them to augment the message displayed.
This is part of what is needed to close SoruceForge bug #110628
(Jitterbug PR#278).
|
| |
|
|
|
|
| |
the previous exceptions.py have WindowsError as a sub-class of OSError.
|
|
|
|
|
|
| |
string literals has not been tested on an MS_WIN16 platform; the trailing
";" was inside the #ifndef MS_WIN16, which should cause an error (missing
semi-colon) when compiled with that symbol #defined.
|