diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-05 23:27:15 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-05 23:27:15 (GMT) |
commit | 791dc2f32c3fb707319d0c8d93d6cde6175d1e01 (patch) | |
tree | b6373a3456559c9127569319ae8e2e799e310d61 | |
parent | a741ebf8a18b39e3b596707825f6e3026a5991fe (diff) | |
download | cpython-791dc2f32c3fb707319d0c8d93d6cde6175d1e01.zip cpython-791dc2f32c3fb707319d0c8d93d6cde6175d1e01.tar.gz cpython-791dc2f32c3fb707319d0c8d93d6cde6175d1e01.tar.bz2 |
compile _bytesio and _stringio into the binary and initalize stdio before site fixing #3279
Reviewer: Alexandre Vassalotti
-rw-r--r-- | Misc/NEWS | 5 | ||||
-rw-r--r-- | Modules/Setup.dist | 2 | ||||
-rw-r--r-- | Python/pythonrun.c | 4 | ||||
-rw-r--r-- | setup.py | 3 |
4 files changed, 9 insertions, 5 deletions
@@ -12,6 +12,9 @@ What's New in Python 3.0 release candidate 1 Core and Builtins ----------------- +- Issue #3279: Importing site at interpreter was failing silently because the + site module uses the open builtin which was not initialized at the time. + - Issue #3660: Corrected a reference leak in str.encode() when the encoder does not return a bytes object. @@ -125,6 +128,8 @@ Extension Modules update this code in Python 3.0 by hand. Update the 2.6 one and then do "2to3". +- The _bytesio and _stringio modules are now compiled into the python binary. + Tools/Demos ----------- diff --git a/Modules/Setup.dist b/Modules/Setup.dist index d2c8971..a2b20ca 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -113,6 +113,8 @@ _sre _sre.c # Fredrik Lundh's new regular expressions _codecs _codecsmodule.c # access to the builtin codecs and codec registry _fileio _fileio.c # Standard I/O baseline _weakref _weakref.c # weak references +_bytesio _bytesio.c # For Lib/io.py +_stringio _stringio.c # For Lib/io.py # The zipimport module is always imported at startup. Having it as a # builtin module avoids some bootstrapping problems and reduces overhead. diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 39c86e7..3e40d51 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -239,11 +239,11 @@ Py_InitializeEx(int install_sigs) } initmain(); /* Module __main__ */ - if (!Py_NoSiteFlag) - initsite(); /* Module site */ if (initstdio() < 0) Py_FatalError( "Py_Initialize: can't initialize sys standard streams"); + if (!Py_NoSiteFlag) + initsite(); /* Module site */ /* auto-thread-state API, if available */ #ifdef WITH_THREAD @@ -439,9 +439,6 @@ class PyBuildExt(build_ext): exts.append( Extension('operator', ['operator.c']) ) # _functools exts.append( Extension("_functools", ["_functoolsmodule.c"]) ) - # Memory-based IO accelerator modules - exts.append( Extension("_bytesio", ["_bytesio.c"]) ) - exts.append( Extension("_stringio", ["_stringio.c"]) ) # C-optimized pickle replacement exts.append( Extension("_pickle", ["_pickle.c"]) ) # atexit |