Christian Heimes
f75dbef208
Deallocate content of the dict free list on interpreter shutdown
2008-02-08 00:11:31 +00:00
Christian Heimes
908caac52e
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
2008-01-27 23:34:59 +00:00
Georg Brandl
2da0fceba7
Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
2008-01-07 17:09:35 +00:00
Amaury Forgeot d'Arc
025c347d61
Issue #1402 : PyInterpreterState_Clear() may still invoke user code
...
(in deallocation of running threads, for example), so the PyGILState_Release()
function must still be functional.
On the other hand, _PyGILState_Fini() only frees memory, and can be called later.
Backport candidate, but only after some experts comment on it.
2007-11-29 23:35:25 +00:00
Kristján Valur Jónsson
67387fb4aa
Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h
2007-04-25 00:17:39 +00:00
Collin Winter
276887b16d
Bug #742342 : make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167 .
...
Will backport.
2007-03-12 16:11:39 +00:00
Georg Brandl
7b9c555520
Bug #1678647 : write a newline after printing an exception in any
...
case, even when converting the value to a string failed.
2007-03-12 14:30:05 +00:00
Georg Brandl
aa2321b0f8
Patch #703779 : unset __file__ in __main__ after running a file. This
...
makes the filenames the warning module prints much more sensible when
a PYTHONSTARTUP file is used.
2007-03-07 00:40:28 +00:00
Georg Brandl
49aafc9f2c
Variant of patch #697613 : don't exit the interpreter on a SystemExit
...
exception if the -i command line option or PYTHONINSPECT environment
variable is given, but break into the interactive interpreter just like
on other exceptions or normal program exit.
(backport)
2007-03-07 00:34:46 +00:00
Georg Brandl
098cd69ff9
Bug #1674503 : close the file opened by execfile() in an error condition.
2007-03-06 12:17:50 +00:00
Thomas Wouters
afea529088
SF patch #1630975 : Fix crash when replacing sys.stdout in sitecustomize
...
When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.
This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
2007-01-23 13:42:00 +00:00
Neal Norwitz
ca460d9722
with and as are now keywords. There are some generated files I can't recreate.
2006-09-06 06:28:06 +00:00
Neal Norwitz
0c6ae5bad4
Handle a few more error conditions.
...
Klocwork 301 and 302. Will backport.
2006-08-21 20:16:24 +00:00
Neal Norwitz
0f7dbf731a
PyModule_GetDict() can fail, produce fatal errors if this happens on startup.
...
Klocwork #298-299.
2006-08-12 03:17:41 +00:00
Neal Norwitz
421c1319ad
Whoops, how did that get in there. :-) Revert all the parts of 51227 that were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
2006-08-12 02:12:30 +00:00
Neal Norwitz
6b4953fd3d
Check returned pointer is valid.
...
Klocwork #233
2006-08-12 02:06:34 +00:00
Neal Norwitz
b59d08c2fb
Fix more memory allocation issues found with failmalloc.
2006-07-22 16:20:49 +00:00
Neal Norwitz
d12bd012a6
Handle more memory allocation failures without crashing.
2006-07-21 07:59:47 +00:00
Neal Norwitz
a5e4f22bfb
Reported by Klocwork #151 .
...
v2 can be NULL if exception2 is NULL. I don't think that condition can happen,
but I'm not sure it can't either. Now the code will protect against either
being NULL.
2006-07-17 00:59:04 +00:00
Martin v. Löwis
0e8bd7e1cc
Patch #1495999 : Part two of Windows CE changes.
...
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Tim Peters
5e9d6cfbda
PyErr_Display(), PyErr_WriteUnraisable(): Coverity found a cut-and-paste
...
bug in both: `className` was referenced before being checked for NULL.
2006-05-28 10:41:29 +00:00
Richard Jones
7b9558d37d
Conversion of exceptions over from faked-up classes to new-style C types.
2006-05-27 12:29:24 +00:00
Thomas Heller
1b04664eab
Change those parts of the Python-api that were functions in 2.4, and
...
are now macros to exported functions again.
Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
2006-04-18 18:51:06 +00:00
Martin v. Löwis
45294a9562
Remove types from type_list if they have no objects
...
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
2006-04-18 06:24:08 +00:00
Anthony Baxter
ac6bd46d5c
spread the extern "C" { } magic pixie dust around. Python itself builds now
...
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.
2006-04-13 02:06:09 +00:00