| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
They're named as if public, so I did a Bad Thing by changing
PyMarshal_ReadObjectFromFile() to suck up the remainder of the file in one
gulp: anyone who counted on that leaving the file pointer merely at the
end of the next object would be screwed. So restored
PyMarshal_ReadObjectFromFile() to its earlier state, renamed the new greedy
code to PyMarshal_ReadLastObjectFromFile(), and changed Python internals to
call the latter instead.
|
|
|
|
|
|
|
|
| |
pythonrun.c: In Py_Finalize, don't reset the initialized flag until after
the exit funcs have run.
atexit.py: in _run_exitfuncs, mutate the list of pending calls in a
threadsafe way. This wasn't a contributor to bug 128475, it just burned
my eyeballs when looking at that bug.
|
| |
|
|
|
|
| |
has type int in C.
|
|
|
|
| |
Patch #103067 with modifications as discussed in email.
|
|
|
|
| |
sigaction() (if HAVE_SIGACTION is defined).
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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).
|
|
|
|
| |
declarations yet, those come later.
|
|
|
|
|
|
|
|
|
|
| |
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
|
|
|
|
| |
mac-specific functions to have a PyMac_ name.
|
|
|
|
|
|
|
| |
used for indentation related errors. This patch includes Ping's
improvements for indentation-related error messages.
Closes SourceForge patches #100734 and #100856.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
the number of children of a node exceeds the max possible value for
the short that is used to count them. The Python runtime converts
this parser error into the SyntaxError "expression too long."
|
|
|
|
|
|
|
|
|
|
| |
need two phase init or fini of the builtin module. Change the call of
_PyBuiltin_Init_1() to _PyBuiltin_Init(). Add a call to
init_exceptions().
Py_Finalize(): Don't call _PyBuiltin_Fini_1(). Instead call
fini_exceptions() but move this to before the thread state is
cleared.
|
|
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
|
|
|
| |
API consistency, but nothing sets it or checks it now.
|
|
|
|
| |
Added Py_UnicodeFlag for use by the -U command line option.
|
|
|
|
|
|
| |
remaining object references if the environment variable PYTHONDUMPREFS
exists. The default behaviour caused problems for background or
otherwise invisible processes that use the debug build of Python.
|
|
|
|
|
| |
Note that comparisons of deeply nested objects can still dump core in
extreme cases.
|
|
|
|
| |
Codec registry.
|
|
|
|
| |
compilation on NT Alpha. Mostly added casts etc.
|
|
|
|
|
| |
done by _PyImport_Init(), comes to late to affect the import of
exceptions.py by _PyBuiltin_Init_2(). Move _PyImport_Init() up few lines.
|
|
|
|
|
| |
before exiting when an error happened. This didn't work right when
Python is invoked from a daemon.
|
| |
|
|
|
|
|
|
|
|
|
| |
v temporary variable was never decref'd. Test this by starting up the
interpreter, hitting C-c, then immediately exiting.
Same potential leak can occur if error is E_NOMEM, since the return is
done in the case block. Added Py_XDECREF(v); to both blocks, just
before the return.
|
|
|
|
|
|
|
|
|
| |
think we have our own DOS box (i.e. we're not started from a command
line shell), we print a message and wait for the user to hit a key
before the DOS box is closed.
The hacky heuristic for determining whether we have our *own* DOS box
(due to Mark Hammond) is to test whether we're on line zero...
|
|
|
|
| |
(This only applies when COUNT_ALLOCS is defined.)
|
| |
|
| |
|
|
|
|
|
| |
pystate.h; pystate.h doesn't use it (I thought I wanted to move the
array there but that won't work).
|
|
|
|
| |
(Reported by Jeff Rush.)
|
|
|
|
| |
It is needed so that tokenizer.c can use PySys_WriteStderr().
|
|
|
|
| |
Win32 in Debug mode).
|
| |
|
|
|
|
| |
and not to C's stderr.
|
|
|
|
| |
(Basically, the error is cleared... Like almost everywhere else...)
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add Py_FrozenFlag, intended to suppress error messages fron
getpath.c in frozen binaries.
- Add Py_GetPythonHome() and Py_SetPythonHome(), intended to allow
embedders to force a different PYTHONHOME.
- Add new interface PyErr_PrintEx(flag); same as PyErr_Print() but
flag determines whether sys.last_* are set or not. PyErr_Print()
now simply calls PyErr_PrintEx(1).
|
|
|
|
| |
to do, it should not call sys.exitfunc either...
|
|
|
|
|
| |
printing (when Py_DEBUG is defined) happens while there's still a
current thread...
|
|
|
|
|
| |
you can assign an object whose str() evaluates to the current
directory (or whatever).
|