summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* Reconst parameters that lost their const in the AST merge.Martin v. Löwis2006-03-011-1/+1
|
* PEP 352 implementation. Creates a new base class, BaseException, which has anBrett Cannon2006-03-011-7/+5
| | | | | | | | | added message attribute compared to the previous version of Exception. It is also a new-style class, making all exceptions now new-style. KeyboardInterrupt and SystemExit inherit from BaseException directly. String exceptions now raise DeprecationWarning. Applies patch 1104669, and closes bugs 1012952 and 518846.
* from __future__ import with_statement addon for 'with', mostly written byThomas Wouters2006-02-281-2/+4
| | | | Neal.
* Check whether there are flags.Martin v. Löwis2006-02-261-1/+1
|
* Generate code to recursively copy an AST intoMartin v. Löwis2006-02-261-0/+5
| | | | a tree of Python objects. Expose this through compile().
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+1
|
* Fix Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.Neal Norwitz2005-12-181-2/+2
| | | | Needs backport.
* Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz2005-12-171-51/+58
| | | | simplifies a lot of error handling code, and fixes many memory leaks.
* Patch #1350409: Port signal handling to VS 2005.Martin v. Löwis2005-11-281-0/+17
|
* Merge ast-branch to headJeremy Hylton2005-10-201-152/+124
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* - Fix segfault with invalid coding.Neal Norwitz2005-10-021-1/+1
| | | | | | | - SF Bug #772896, unknown encoding results in MemoryError, which is not helpful I will only backport the segfault fix. I'll let Anthony decide if he wants the other changes backported. I will do the backport if asked.
* Forward UnicodeDecodeError into SyntaxError for source encoding errors.Martin v. Löwis2005-08-241-5/+7
| | | | Will backport to 2.4.
* * Improve code for the empty frozenset singleton:Raymond Hettinger2005-08-011-0/+1
| | | | | | | | | | | - Handle both frozenset() and frozenset([]). - Do not use singleton for frozenset subclasses. - Finalize the singleton. - Add test cases. * Factor-out set_update_internal() from set_update(). Simplifies the code for several internal callers. * Factor constant expressions out of loop in set_merge_internal(). * Minor comment touch-ups.
* This is my patch:Michael W. Hudson2005-05-271-0/+2
| | | | | | | | | | | | | | [ 1181301 ] make float packing copy bytes when they can which hasn't been reviewed, despite numerous threats to check it in anyway if noone reviews it. Please read the diff on the checkin list, at least! The basic idea is to examine the bytes of some 'probe values' to see if the current platform is a IEEE 754-ish platform, and if so _PyFloat_{Pack,Unpack}{4,8} just copy bytes around. The rest is hair for testing, and tests.
* Move exception finalisation later in the shutdown process - thisAnthony Baxter2005-03-291-7/+8
| | | | fixes the crash seen in bug #1165761
* Patch #802188: better parser error message for non-EOL following line cont.Martin v. Löwis2005-03-031-0/+3
|
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-24/+19
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* SF patch 1044089: New C API function PyEval_ThreadsInitialized(), by NickTim Peters2004-10-111-1/+0
| | | | | Coghlan, for determining whether PyEval_InitThreads() has been called. Also purged the undocumented+unused _PyThread_Started int.
* Finalize the freelist of list objects.Raymond Hettinger2004-10-071-0/+1
|
* Patch #900727: Add Py_InitializeEx to allow embedding without signals.Martin v. Löwis2004-08-191-2/+10
|
* Patch #984714: Properly diagnose E_DECODE errors.Martin v. Löwis2004-07-211-0/+3
| | | | Backported to 2.3.
* This closes patch:Michael W. Hudson2004-07-071-1/+2
| | | | | | | | | | | | | | | | | [ 960406 ] unblock signals in threads although the changes do not correspond exactly to any patch attached to that report. Non-main threads no longer have all signals masked. A different interface to readline is used. The handling of signals inside calls to PyOS_Readline is now rather different. These changes are all a bit scary! Review and cross-platform testing much appreciated.
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-241-3/+3
|
* Lost reference.Armin Rigo2004-03-221-6/+8
|
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-4/+0
|
* Py_Finalize(): disabled the second call of cyclic gc, and added extensiveTim Peters2003-12-011-2/+27
| | | | | | | comments about why both calls to cyclic gc here can cause problems. I'll backport to 2.3 maint. Since the calls were introduced in 2.3, that will be the end of it.
* Getting rid of all the code inside #ifdef macintosh too.Jack Jansen2003-11-201-14/+0
|
* Getting rid of support for the ancient Apple MPW compiler.Jack Jansen2003-11-191-12/+0
|
* Patch #804543: strdup saved locales. Backported to 2.3.Martin v. Löwis2003-11-131-1/+2
|
* Simplify and speedup uses of Py_BuildValue():Raymond Hettinger2003-10-121-1/+1
| | | | | | * Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c) * Py_BuildValue("()",a) --> PyTuple_New(0) * Py_BuildValue("O", a) --> Py_INCREF(a)
* Fix refcounting and cut & paste error (?) in last checkin.Michael W. Hudson2003-08-111-3/+1
| | | | This should go onto release23-maint, too.
* Move initialization of sys.std{in,out}.encoding to Py_Initialize.Martin v. Löwis2003-08-091-15/+51
| | | | | Verify that the encoding actually exists. Fixes #775985. Will backport to 2.3.
* Correct previous patch looking for warnings module: sys.modules, notMark Hammond2003-07-161-1/+1
| | | | sys.__modules__.
* Fix [ 771097 ] frozen programs fail due to implicit import of "warnings".Mark Hammond2003-07-151-5/+36
| | | | | | If the initial import of warnings fails, clear the error. When the module is actually needed, if the original import failed, see if it has managed to find its way to sys.modules yet and if so, remember it.
* PyGILState cleanup was too early - destructors called via module cleanup may ↵Mark Hammond2003-04-221-5/+5
| | | | use the API.
* handle_system_exit(): This leaked the current exception info, inTim Peters2003-04-191-4/+16
| | | | | | | particular leaving the traceback object (and everything reachable from it) alive throughout shutdown. The patch is mostly from Guido. Bugfix candidate.
* New PyGILState_ API - implements pep 311, from patch 684256.Mark Hammond2003-04-191-0/+15
|
* _Py_PrintReferences(): Changed to print object address at start of eachTim Peters2003-04-171-2/+9
| | | | | | | | | | | | | | | new line. New pvt API function _Py_PrintReferenceAddresses(): Prints only the addresses and refcnts of the live objects. This is always safe to call, because it has no dependence on Python's C API. Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new) _Py_PrintReferenceAddresses() right before dumping final pymalloc stats. We can't print the reprs of the objects here because too much of the interpreter has been shut down. You need to correlate the addresses displayed here with the object reprs printed by the earlier PYTHONDUMPREFS call to _Py_PrintReferences().
* - New C API PyGC_Collect(), same as calling gc.collect().Guido van Rossum2003-04-171-0/+8
| | | | | - Call this in Py_Finalize(). - Expand the Misc/NEWS text on PY_LONG_LONG.
* A missing piece of the PEP 269 patch: add PyParser_SetError(), aGuido van Rossum2003-04-171-0/+9
| | | | wrapper around err_input().
* Trimmed trailing whitespace.Tim Peters2003-04-171-10/+10
|
* Py_Finalize(): Reverted recent changes that tried to move theTim Peters2003-04-171-8/+11
| | | | | | | | PYTHONDUMPREFS output after most teardown. Attempts to use PYTHONDUMPREFS with the Zope3 test suite died with Py_FatalError(), since _Py_PrintReferences() can end up executing arbitrary Python code (for objects that override __repr__), and that requires an intact interpreter.
* - pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()Guido van Rossum2003-04-151-8/+8
| | | | | | | | | | | | | | | | | | | even farther down, to just before the call to _PyObject_DebugMallocStats(). This required the following changes: - pystate.c, PyThreadState_GetDict(): changed not to raise an exception or issue a fatal error when no current thread state is available, but simply return NULL without raising an exception (ever). - object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL, don't raise an exception but return 0. This means that when printing a container that's recursive, printing will go on and on and on. But that shouldn't happen in the case we care about (see first bullet). - Updated Misc/NEWS and Doc/api/init.tex to reflect changes to PyThreadState_GetDict() definition.
* Move the call to _Py_PrintReferences() a bit further down. ThisGuido van Rossum2003-04-151-7/+12
| | | | | prevents it from showing stuff (like codec state) that is cleared when the interpreter state is cleared.
* Move declaration of enc to scope where it is usedNeal Norwitz2003-04-101-2/+1
|
* Fixed SF bug #663074. The codec system was using global staticGustavo Niemeyer2003-03-191-8/+0
| | | | | | | | | variables to store internal data. As a result, any atempts to use the unicode system with multiple active interpreters, or successive interpreter executions, would fail. Now that information is stored into members of the PyInterpreterState structure.
* Declare all variables at the start of their scope.Fred Drake2003-03-051-1/+1
|
* Always initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,Martin v. Löwis2003-03-051-0/+28
| | | | | and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding. Adjust test case.
* Addendum to #683658:Just van Rossum2003-02-251-2/+2
| | | | | | import warnings.py _after_ site.py has run. This ensures that site.py is again the first .py to be imported, giving it back full control over sys.path.
* Fix bug 683658 - PyErr_Warn may cause import deadlock.Mark Hammond2003-02-191-0/+11
|