From python-checkins at python.org Tue Apr 24 15:54:11 2007 From: python-checkins at python.org (kristjan.jonsson) Date: Tue, 24 Apr 2007 15:54:11 +0200 (CEST) Subject: [Stackless-checkins] r54937 - in stackless/branches/release25-maint/Stackless: core/stackless_structs.h core/stacklesseval.c platf/switch_x86_msvc.h Message-ID: <20070424135411.A17841E400A@bag.python.org> Author: kristjan.jonsson Date: Tue Apr 24 15:54:07 2007 New Revision: 54937 Modified: stackless/branches/release25-maint/Stackless/core/stackless_structs.h stackless/branches/release25-maint/Stackless/core/stacklesseval.c stackless/branches/release25-maint/Stackless/platf/switch_x86_msvc.h Log: For Win32, save and restore the SEH register when saving the stack. This is a variable in the Thread Information Block (TIB). This fixes problems with handling exceptions in tasklets. Modified: stackless/branches/release25-maint/Stackless/core/stackless_structs.h ============================================================================== --- stackless/branches/release25-maint/Stackless/core/stackless_structs.h (original) +++ stackless/branches/release25-maint/Stackless/core/stackless_structs.h Tue Apr 24 15:54:07 2007 @@ -5,6 +5,9 @@ extern "C" { #endif +/* platform specific constants (mainly SEH stuff to store )*/ +#include "platf/slp_platformselect.h" + /*** important structures: tasklet ***/ @@ -102,6 +105,9 @@ struct _tasklet *task; int nesting_level; PyThreadState *tstate; +#ifdef _SEH32 + DWORD exception_list; /* SEH handler on Win32 */ +#endif intptr_t *startaddr; intptr_t stack[1]; } PyCStackObject; Modified: stackless/branches/release25-maint/Stackless/core/stacklesseval.c ============================================================================== --- stackless/branches/release25-maint/Stackless/core/stacklesseval.c (original) +++ stackless/branches/release25-maint/Stackless/core/stacklesseval.c Tue Apr 24 15:54:07 2007 @@ -111,6 +111,11 @@ (*cst)->task = task; (*cst)->tstate = ts; (*cst)->nesting_level = ts->st.nesting_level; +#ifdef _SEH32 + //save the SEH handler + (*cst)->exception_list = (DWORD) + __readfsdword(FIELD_OFFSET(NT_TIB, ExceptionList)); +#endif return *cst; } @@ -121,10 +126,18 @@ memcpy((cstprev)->stack, (cstprev)->startaddr - (cstprev)->ob_size, stsizeb); +#ifdef _SEH32 + //save the SEH handler + cstprev->exception_list = (DWORD) + __readfsdword(FIELD_OFFSET(NT_TIB, ExceptionList)); +#endif return stsizeb; } void +#ifdef _SEH32 +#pragma warning(disable:4733) /* disable warning about modifying FS[0] */ +#endif slp_cstack_restore(PyCStackObject *cst) { cst->tstate->st.nesting_level = cst->nesting_level; @@ -132,6 +145,11 @@ cst->task = NULL; memcpy(cst->startaddr - cst->ob_size, &cst->stack, (cst->ob_size) * sizeof(intptr_t)); +#ifdef _SEH32 + //restore the SEH handler + __writefsdword(FIELD_OFFSET(NT_TIB, ExceptionList), (DWORD)(cst->exception_list)); + #pragma warning(default:4733) +#endif } Modified: stackless/branches/release25-maint/Stackless/platf/switch_x86_msvc.h ============================================================================== --- stackless/branches/release25-maint/Stackless/platf/switch_x86_msvc.h (original) +++ stackless/branches/release25-maint/Stackless/platf/switch_x86_msvc.h Tue Apr 24 15:54:07 2007 @@ -22,6 +22,16 @@ * Initial final version after lots of iterations for i386. */ +/* for the SEH things */ +#ifndef _WINDOWS_ +#define WIN32_LEAN_AND_MEAN +#ifdef BYTE +#undef BYTE +#endif +#include +#endif +#define _SEH32 + #define alloca _alloca #define STACK_REFPLUS 1 @@ -36,6 +46,7 @@ #pragma optimize("", off) +#pragma warning(disable:4731) /* disable ebp modification warning */ static int slp_switch(void) { @@ -54,6 +65,7 @@ SLP_RESTORE_STATE(); return 0; } +#pragma warning(default:4731) } #endif _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Sat Apr 14 15:05:17 2007 From: python-checkins at python.org (richard.tew) Date: Sat, 14 Apr 2007 15:05:17 +0200 (CEST) Subject: [Stackless-checkins] r54826 - in stackless/branches/release25-maint: Demo/parser/unparse.py Doc/README Doc/api/abstract.tex Doc/api/concrete.tex Doc/api/exceptions.tex Doc/api/memory.tex Doc/api/newtypes.tex Doc/api/utilities.tex Doc/commontex/boilerplate.tex Doc/commontex/license.tex Doc/dist/dist.tex Doc/ext/newtypes.tex Doc/ext/shoddy.c Doc/inst/inst.tex Doc/lib/emailgenerator.tex Doc/lib/libasyncore.tex Doc/lib/libbase64.tex Doc/lib/libbsddb.tex Doc/lib/libbz2.tex Doc/lib/libcollections.tex Doc/lib/libcommands.tex Doc/lib/libcsv.tex Doc/lib/libctypes.tex Doc/lib/libdbhash.tex Doc/lib/libfnmatch.tex Doc/lib/libfuncs.tex Doc/lib/libfunctools.tex Doc/lib/libgetopt.tex Doc/lib/libgettext.tex Doc/lib/libheapq.tex Doc/lib/libimageop.tex Doc/lib/libitertools.tex Doc/lib/liblocale.tex Doc/lib/liblogging.tex Doc/lib/libmailbox.tex Doc/lib/libmmap.tex Doc/lib/libmsilib.tex Doc/lib/libos.tex Doc/lib/libpickle.tex Doc/lib/libpopen2.tex Doc/lib/libprofile.tex Doc/lib/librandom.tex Doc/lib/libshu! til.tex Doc/lib/libsimplexmlrpc.tex Doc/lib/libsmtplib.tex Doc/lib/libsocket.tex Doc/lib/libsqlite3.tex Doc/lib/libstdtypes.tex Doc/lib/libstring.tex Doc/lib/libstruct.tex Doc/lib/libsubprocess.tex Doc/lib/libtarfile.tex Doc/lib/libtempfile.tex Doc/lib/libthreading.tex Doc/lib/libtimeit.tex Doc/lib/libunittest.tex Doc/lib/liburlparse.tex Doc/lib/libwsgiref.tex Doc/lib/tkinter.tex Doc/mac/toolbox.tex Doc/ref/ref1.tex Doc/ref/ref3.tex Doc/ref/ref5.tex Doc/ref/ref6.tex Doc/ref/ref7.tex Doc/tools/py2texi.el Doc/tut/tut.tex Doc/whatsnew/whatsnew25.tex Include/Python-ast.h Include/abstract.h Include/dictobject.h Include/patchlevel.h Include/pystate.h Include/setobject.h LICENSE Lib/CGIHTTPServer.py Lib/Queue.py Lib/SimpleHTTPServer.py Lib/SocketServer.py Lib/StringIO.py Lib/_strptime.py Lib/bisect.py Lib/bsddb/dbobj.py Lib/bsddb/test/test_1413192.py Lib/bsddb/test/test_dbobj.py Lib/codecs.py Lib/compiler/pycodegen.py Lib/compiler/transformer.py Lib/ctypes Lib/ctypes/__init__.py L! ib/ctypes/test/test_callbacks.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_loading.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_structures.py Lib/ctypes/util.py Lib/decimal.py Lib/difflib.py Lib/distutils/__init__.py Lib/distutils/command/bdist_rpm.py Lib/distutils/command/build_ext.py Lib/distut Message-ID: <20070414130517.4C5521E4003@bag.python.org> Author: richard.tew Date: Sat Apr 14 15:02:57 2007 New Revision: 54826 Added: stackless/branches/release25-maint/Doc/ext/shoddy.c - copied unchanged from r54693, python/branches/release25-maint/Doc/ext/shoddy.c stackless/branches/release25-maint/Lib/test/infinite_reload.py - copied unchanged from r54693, python/branches/release25-maint/Lib/test/infinite_reload.py stackless/branches/release25-maint/Lib/test/test_structmembers.py - copied unchanged from r54693, python/branches/release25-maint/Lib/test/test_structmembers.py stackless/branches/release25-maint/PC/VC6/_sqlite3.dsp - copied unchanged from r54693, python/branches/release25-maint/PC/VC6/_sqlite3.dsp Removed: stackless/branches/release25-maint/PC/VC6/zlib.dsp Modified: stackless/branches/release25-maint/Demo/parser/unparse.py stackless/branches/release25-maint/Doc/README stackless/branches/release25-maint/Doc/api/abstract.tex stackless/branches/release25-maint/Doc/api/concrete.tex stackless/branches/release25-maint/Doc/api/exceptions.tex stackless/branches/release25-maint/Doc/api/memory.tex stackless/branches/release25-maint/Doc/api/newtypes.tex stackless/branches/release25-maint/Doc/api/utilities.tex stackless/branches/release25-maint/Doc/commontex/boilerplate.tex stackless/branches/release25-maint/Doc/commontex/license.tex stackless/branches/release25-maint/Doc/dist/dist.tex stackless/branches/release25-maint/Doc/ext/newtypes.tex stackless/branches/release25-maint/Doc/inst/inst.tex stackless/branches/release25-maint/Doc/lib/emailgenerator.tex stackless/branches/release25-maint/Doc/lib/libasyncore.tex stackless/branches/release25-maint/Doc/lib/libbase64.tex stackless/branches/release25-maint/Doc/lib/libbsddb.tex stackless/branches/release25-maint/Doc/lib/libbz2.tex stackless/branches/release25-maint/Doc/lib/libcollections.tex stackless/branches/release25-maint/Doc/lib/libcommands.tex stackless/branches/release25-maint/Doc/lib/libcsv.tex stackless/branches/release25-maint/Doc/lib/libctypes.tex stackless/branches/release25-maint/Doc/lib/libdbhash.tex stackless/branches/release25-maint/Doc/lib/libfnmatch.tex stackless/branches/release25-maint/Doc/lib/libfuncs.tex stackless/branches/release25-maint/Doc/lib/libfunctools.tex stackless/branches/release25-maint/Doc/lib/libgetopt.tex stackless/branches/release25-maint/Doc/lib/libgettext.tex stackless/branches/release25-maint/Doc/lib/libheapq.tex stackless/branches/release25-maint/Doc/lib/libimageop.tex stackless/branches/release25-maint/Doc/lib/libitertools.tex stackless/branches/release25-maint/Doc/lib/liblocale.tex stackless/branches/release25-maint/Doc/lib/liblogging.tex stackless/branches/release25-maint/Doc/lib/libmailbox.tex stackless/branches/release25-maint/Doc/lib/libmmap.tex stackless/branches/release25-maint/Doc/lib/libmsilib.tex stackless/branches/release25-maint/Doc/lib/libos.tex stackless/branches/release25-maint/Doc/lib/libpickle.tex stackless/branches/release25-maint/Doc/lib/libpopen2.tex stackless/branches/release25-maint/Doc/lib/libprofile.tex stackless/branches/release25-maint/Doc/lib/librandom.tex stackless/branches/release25-maint/Doc/lib/libshutil.tex stackless/branches/release25-maint/Doc/lib/libsimplexmlrpc.tex stackless/branches/release25-maint/Doc/lib/libsmtplib.tex stackless/branches/release25-maint/Doc/lib/libsocket.tex stackless/branches/release25-maint/Doc/lib/libsqlite3.tex stackless/branches/release25-maint/Doc/lib/libstdtypes.tex stackless/branches/release25-maint/Doc/lib/libstring.tex stackless/branches/release25-maint/Doc/lib/libstruct.tex stackless/branches/release25-maint/Doc/lib/libsubprocess.tex stackless/branches/release25-maint/Doc/lib/libtarfile.tex stackless/branches/release25-maint/Doc/lib/libtempfile.tex stackless/branches/release25-maint/Doc/lib/libthreading.tex stackless/branches/release25-maint/Doc/lib/libtimeit.tex stackless/branches/release25-maint/Doc/lib/libunittest.tex stackless/branches/release25-maint/Doc/lib/liburlparse.tex stackless/branches/release25-maint/Doc/lib/libwsgiref.tex stackless/branches/release25-maint/Doc/lib/tkinter.tex stackless/branches/release25-maint/Doc/mac/toolbox.tex stackless/branches/release25-maint/Doc/ref/ref1.tex stackless/branches/release25-maint/Doc/ref/ref3.tex stackless/branches/release25-maint/Doc/ref/ref5.tex stackless/branches/release25-maint/Doc/ref/ref6.tex stackless/branches/release25-maint/Doc/ref/ref7.tex stackless/branches/release25-maint/Doc/tools/py2texi.el stackless/branches/release25-maint/Doc/tut/tut.tex stackless/branches/release25-maint/Doc/whatsnew/whatsnew25.tex stackless/branches/release25-maint/Include/Python-ast.h stackless/branches/release25-maint/Include/abstract.h stackless/branches/release25-maint/Include/dictobject.h stackless/branches/release25-maint/Include/patchlevel.h stackless/branches/release25-maint/Include/pystate.h stackless/branches/release25-maint/Include/setobject.h stackless/branches/release25-maint/LICENSE stackless/branches/release25-maint/Lib/CGIHTTPServer.py stackless/branches/release25-maint/Lib/Queue.py stackless/branches/release25-maint/Lib/SimpleHTTPServer.py stackless/branches/release25-maint/Lib/SocketServer.py stackless/branches/release25-maint/Lib/StringIO.py stackless/branches/release25-maint/Lib/_strptime.py stackless/branches/release25-maint/Lib/bisect.py stackless/branches/release25-maint/Lib/bsddb/dbobj.py stackless/branches/release25-maint/Lib/bsddb/test/test_1413192.py stackless/branches/release25-maint/Lib/bsddb/test/test_dbobj.py stackless/branches/release25-maint/Lib/codecs.py stackless/branches/release25-maint/Lib/compiler/pycodegen.py stackless/branches/release25-maint/Lib/compiler/transformer.py stackless/branches/release25-maint/Lib/ctypes/ (props changed) stackless/branches/release25-maint/Lib/ctypes/__init__.py stackless/branches/release25-maint/Lib/ctypes/test/test_callbacks.py stackless/branches/release25-maint/Lib/ctypes/test/test_functions.py stackless/branches/release25-maint/Lib/ctypes/test/test_loading.py stackless/branches/release25-maint/Lib/ctypes/test/test_memfunctions.py stackless/branches/release25-maint/Lib/ctypes/test/test_structures.py stackless/branches/release25-maint/Lib/ctypes/util.py stackless/branches/release25-maint/Lib/decimal.py stackless/branches/release25-maint/Lib/difflib.py stackless/branches/release25-maint/Lib/distutils/__init__.py stackless/branches/release25-maint/Lib/distutils/command/bdist_rpm.py stackless/branches/release25-maint/Lib/distutils/command/build_ext.py stackless/branches/release25-maint/Lib/distutils/command/install_egg_info.py stackless/branches/release25-maint/Lib/distutils/msvccompiler.py stackless/branches/release25-maint/Lib/email/_parseaddr.py stackless/branches/release25-maint/Lib/email/header.py stackless/branches/release25-maint/Lib/email/message.py stackless/branches/release25-maint/Lib/email/test/test_email.py stackless/branches/release25-maint/Lib/email/test/test_email_renamed.py stackless/branches/release25-maint/Lib/encodings/bz2_codec.py stackless/branches/release25-maint/Lib/encodings/utf_8_sig.py stackless/branches/release25-maint/Lib/encodings/zlib_codec.py stackless/branches/release25-maint/Lib/ftplib.py stackless/branches/release25-maint/Lib/functools.py stackless/branches/release25-maint/Lib/hashlib.py stackless/branches/release25-maint/Lib/heapq.py stackless/branches/release25-maint/Lib/httplib.py stackless/branches/release25-maint/Lib/idlelib/EditorWindow.py stackless/branches/release25-maint/Lib/idlelib/MultiCall.py stackless/branches/release25-maint/Lib/idlelib/NEWS.txt stackless/branches/release25-maint/Lib/idlelib/idlever.py stackless/branches/release25-maint/Lib/imputil.py stackless/branches/release25-maint/Lib/lib-tk/Tix.py stackless/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py stackless/branches/release25-maint/Lib/logging/__init__.py stackless/branches/release25-maint/Lib/logging/config.py stackless/branches/release25-maint/Lib/logging/handlers.py stackless/branches/release25-maint/Lib/mailbox.py stackless/branches/release25-maint/Lib/os.py stackless/branches/release25-maint/Lib/pdb.py stackless/branches/release25-maint/Lib/pstats.py stackless/branches/release25-maint/Lib/pty.py stackless/branches/release25-maint/Lib/pydoc.py stackless/branches/release25-maint/Lib/random.py stackless/branches/release25-maint/Lib/rfc822.py stackless/branches/release25-maint/Lib/sched.py stackless/branches/release25-maint/Lib/socket.py stackless/branches/release25-maint/Lib/sre.py stackless/branches/release25-maint/Lib/subprocess.py stackless/branches/release25-maint/Lib/tarfile.py stackless/branches/release25-maint/Lib/test/crashers/weakref_in_del.py stackless/branches/release25-maint/Lib/test/pickletester.py stackless/branches/release25-maint/Lib/test/regrtest.py stackless/branches/release25-maint/Lib/test/test_array.py stackless/branches/release25-maint/Lib/test/test_binascii.py stackless/branches/release25-maint/Lib/test/test_builtin.py stackless/branches/release25-maint/Lib/test/test_class.py stackless/branches/release25-maint/Lib/test/test_cmd_line.py stackless/branches/release25-maint/Lib/test/test_codecs.py stackless/branches/release25-maint/Lib/test/test_compiler.py stackless/branches/release25-maint/Lib/test/test_curses.py stackless/branches/release25-maint/Lib/test/test_datetime.py stackless/branches/release25-maint/Lib/test/test_dbm.py stackless/branches/release25-maint/Lib/test/test_defaultdict.py stackless/branches/release25-maint/Lib/test/test_deque.py stackless/branches/release25-maint/Lib/test/test_descr.py stackless/branches/release25-maint/Lib/test/test_dict.py stackless/branches/release25-maint/Lib/test/test_exceptions.py stackless/branches/release25-maint/Lib/test/test_functools.py stackless/branches/release25-maint/Lib/test/test_gdbm.py stackless/branches/release25-maint/Lib/test/test_grammar.py stackless/branches/release25-maint/Lib/test/test_heapq.py stackless/branches/release25-maint/Lib/test/test_import.py stackless/branches/release25-maint/Lib/test/test_itertools.py stackless/branches/release25-maint/Lib/test/test_logging.py stackless/branches/release25-maint/Lib/test/test_mailbox.py stackless/branches/release25-maint/Lib/test/test_nis.py stackless/branches/release25-maint/Lib/test/test_old_mailbox.py stackless/branches/release25-maint/Lib/test/test_operator.py stackless/branches/release25-maint/Lib/test/test_os.py stackless/branches/release25-maint/Lib/test/test_peepholer.py stackless/branches/release25-maint/Lib/test/test_pty.py stackless/branches/release25-maint/Lib/test/test_random.py stackless/branches/release25-maint/Lib/test/test_re.py stackless/branches/release25-maint/Lib/test/test_sax.py stackless/branches/release25-maint/Lib/test/test_set.py stackless/branches/release25-maint/Lib/test/test_sha.py stackless/branches/release25-maint/Lib/test/test_slice.py stackless/branches/release25-maint/Lib/test/test_socket.py stackless/branches/release25-maint/Lib/test/test_socket_ssl.py stackless/branches/release25-maint/Lib/test/test_socketserver.py stackless/branches/release25-maint/Lib/test/test_strptime.py stackless/branches/release25-maint/Lib/test/test_struct.py stackless/branches/release25-maint/Lib/test/test_subprocess.py stackless/branches/release25-maint/Lib/test/test_syntax.py stackless/branches/release25-maint/Lib/test/test_tarfile.py stackless/branches/release25-maint/Lib/test/test_unpack.py stackless/branches/release25-maint/Lib/test/test_urllib.py stackless/branches/release25-maint/Lib/test/test_urllib2net.py stackless/branches/release25-maint/Lib/test/test_userdict.py stackless/branches/release25-maint/Lib/test/test_weakref.py stackless/branches/release25-maint/Lib/threading.py stackless/branches/release25-maint/Lib/trace.py stackless/branches/release25-maint/Lib/unittest.py stackless/branches/release25-maint/Lib/urllib.py stackless/branches/release25-maint/Lib/urllib2.py stackless/branches/release25-maint/Lib/uu.py stackless/branches/release25-maint/Lib/wave.py stackless/branches/release25-maint/Lib/webbrowser.py stackless/branches/release25-maint/Lib/xml/sax/saxutils.py stackless/branches/release25-maint/Mac/BuildScript/build-installer.py stackless/branches/release25-maint/Makefile.pre.in stackless/branches/release25-maint/Misc/ACKS stackless/branches/release25-maint/Misc/NEWS stackless/branches/release25-maint/Misc/RPM/python-2.5.spec stackless/branches/release25-maint/Misc/python-config.in stackless/branches/release25-maint/Modules/_bsddb.c stackless/branches/release25-maint/Modules/_ctypes/ (props changed) stackless/branches/release25-maint/Modules/_ctypes/_ctypes.c stackless/branches/release25-maint/Modules/_ctypes/_ctypes_test.c stackless/branches/release25-maint/Modules/_ctypes/callbacks.c stackless/branches/release25-maint/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c stackless/branches/release25-maint/Modules/_ctypes/libffi/src/x86/sysv.S stackless/branches/release25-maint/Modules/_ctypes/stgdict.c stackless/branches/release25-maint/Modules/_cursesmodule.c stackless/branches/release25-maint/Modules/_localemodule.c stackless/branches/release25-maint/Modules/_randommodule.c stackless/branches/release25-maint/Modules/_struct.c stackless/branches/release25-maint/Modules/_testcapimodule.c stackless/branches/release25-maint/Modules/arraymodule.c stackless/branches/release25-maint/Modules/binascii.c stackless/branches/release25-maint/Modules/bz2module.c stackless/branches/release25-maint/Modules/cStringIO.c stackless/branches/release25-maint/Modules/collectionsmodule.c stackless/branches/release25-maint/Modules/datetimemodule.c stackless/branches/release25-maint/Modules/itertoolsmodule.c stackless/branches/release25-maint/Modules/main.c stackless/branches/release25-maint/Modules/operator.c stackless/branches/release25-maint/Modules/posixmodule.c stackless/branches/release25-maint/Modules/readline.c stackless/branches/release25-maint/Modules/socketmodule.c stackless/branches/release25-maint/Modules/socketmodule.h stackless/branches/release25-maint/Modules/threadmodule.c stackless/branches/release25-maint/Modules/timemodule.c stackless/branches/release25-maint/Modules/unicodedata.c stackless/branches/release25-maint/Objects/abstract.c stackless/branches/release25-maint/Objects/classobject.c stackless/branches/release25-maint/Objects/complexobject.c stackless/branches/release25-maint/Objects/dictobject.c stackless/branches/release25-maint/Objects/enumobject.c stackless/branches/release25-maint/Objects/exceptions.c stackless/branches/release25-maint/Objects/fileobject.c stackless/branches/release25-maint/Objects/listobject.c stackless/branches/release25-maint/Objects/longobject.c stackless/branches/release25-maint/Objects/obmalloc.c stackless/branches/release25-maint/Objects/setobject.c stackless/branches/release25-maint/Objects/stringobject.c stackless/branches/release25-maint/Objects/typeobject.c stackless/branches/release25-maint/Objects/weakrefobject.c stackless/branches/release25-maint/PC/VC6/_bsddb.dsp stackless/branches/release25-maint/PC/VC6/_ctypes.dsp stackless/branches/release25-maint/PC/VC6/_ctypes_test.dsp stackless/branches/release25-maint/PC/VC6/_elementtree.dsp stackless/branches/release25-maint/PC/VC6/_ssl.mak stackless/branches/release25-maint/PC/VC6/_tkinter.dsp stackless/branches/release25-maint/PC/VC6/bz2.dsp stackless/branches/release25-maint/PC/VC6/pcbuild.dsw stackless/branches/release25-maint/PC/VC6/readme.txt stackless/branches/release25-maint/PC/pyconfig.h stackless/branches/release25-maint/PC/python_nt.rc stackless/branches/release25-maint/PCbuild/_bsddb.vcproj stackless/branches/release25-maint/PCbuild/_ctypes.vcproj stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj stackless/branches/release25-maint/PCbuild/_elementtree.vcproj stackless/branches/release25-maint/PCbuild/_msi.vcproj stackless/branches/release25-maint/PCbuild/_socket.vcproj stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj stackless/branches/release25-maint/PCbuild/_ssl.mak stackless/branches/release25-maint/PCbuild/_ssl.vcproj stackless/branches/release25-maint/PCbuild/_testcapi.vcproj stackless/branches/release25-maint/PCbuild/_tkinter.vcproj stackless/branches/release25-maint/PCbuild/build_ssl.py stackless/branches/release25-maint/PCbuild/bz2.vcproj stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj stackless/branches/release25-maint/PCbuild/pcbuild.sln stackless/branches/release25-maint/PCbuild/pyexpat.vcproj stackless/branches/release25-maint/PCbuild/python.vcproj stackless/branches/release25-maint/PCbuild/python20.wse stackless/branches/release25-maint/PCbuild/pythoncore.vcproj stackless/branches/release25-maint/PCbuild/pythonw.vcproj stackless/branches/release25-maint/PCbuild/select.vcproj stackless/branches/release25-maint/PCbuild/unicodedata.vcproj stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj stackless/branches/release25-maint/PCbuild/winsound.vcproj stackless/branches/release25-maint/PCbuild8/python20.wse stackless/branches/release25-maint/Parser/asdl_c.py stackless/branches/release25-maint/Python/ast.c stackless/branches/release25-maint/Python/ceval.c stackless/branches/release25-maint/Python/compile.c stackless/branches/release25-maint/Python/errors.c stackless/branches/release25-maint/Python/getcopyright.c stackless/branches/release25-maint/Python/import.c stackless/branches/release25-maint/Python/pystate.c stackless/branches/release25-maint/Python/pythonrun.c stackless/branches/release25-maint/Python/structmember.c stackless/branches/release25-maint/Python/sysmodule.c stackless/branches/release25-maint/Python/traceback.c stackless/branches/release25-maint/README stackless/branches/release25-maint/Tools/msi/uuids.py stackless/branches/release25-maint/configure stackless/branches/release25-maint/configure.in stackless/branches/release25-maint/setup.py Log: Merged in changes to the Python release25-maint branch from r52347-54693. Which represent the code as of the 2.5.1c1 release tag. I tested this with Visual C++ Express. The stackless tests passed. The Python tests passed, except for the "test_universal_newlines*" tests in "test_subprocess.py". But this test failure was present before the merge, so the merge can be considered bug free for all intents and purposes. I believe this failure to be a result of using VS8, perhaps if I compiled using PCbuild8 rather than PCbuild, this would have been addressed via some compilation option. Modified: stackless/branches/release25-maint/Demo/parser/unparse.py ============================================================================== --- stackless/branches/release25-maint/Demo/parser/unparse.py (original) +++ stackless/branches/release25-maint/Demo/parser/unparse.py Sat Apr 14 15:02:57 2007 @@ -223,6 +223,9 @@ def _FunctionDef(self, t): self.write("\n") + for deco in t.decorators: + self.fill("@") + self.dispatch(deco) self.fill("def "+t.name + "(") self.dispatch(t.args) self.write(")") Modified: stackless/branches/release25-maint/Doc/README ============================================================================== --- stackless/branches/release25-maint/Doc/README (original) +++ stackless/branches/release25-maint/Doc/README Sat Apr 14 15:02:57 2007 @@ -229,7 +229,7 @@ as long as you don't change or remove the copyright notice: ---------------------------------------------------------------------- -Copyright (c) 2000-2006 Python Software Foundation. +Copyright (c) 2000-2007 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. Modified: stackless/branches/release25-maint/Doc/api/abstract.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/abstract.tex (original) +++ stackless/branches/release25-maint/Doc/api/abstract.tex Sat Apr 14 15:02:57 2007 @@ -810,7 +810,7 @@ the Python statement \samp{del \var{o}[\var{i1}:\var{i2}]}. \end{cfuncdesc} -\begin{cfuncdesc}{int}{PySequence_Count}{PyObject *o, PyObject *value} +\begin{cfuncdesc}{Py_ssize_t}{PySequence_Count}{PyObject *o, PyObject *value} Return the number of occurrences of \var{value} in \var{o}, that is, return the number of keys for which \code{\var{o}[\var{key}] == \var{value}}. On failure, return \code{-1}. This is equivalent to @@ -824,7 +824,7 @@ expression \samp{\var{value} in \var{o}}. \end{cfuncdesc} -\begin{cfuncdesc}{int}{PySequence_Index}{PyObject *o, PyObject *value} +\begin{cfuncdesc}{Py_ssize_t}{PySequence_Index}{PyObject *o, PyObject *value} Return the first index \var{i} for which \code{\var{o}[\var{i}] == \var{value}}. On error, return \code{-1}. This is equivalent to the Python expression \samp{\var{o}.index(\var{value})}. @@ -874,7 +874,7 @@ \versionadded{2.3} \end{cfuncdesc} -\begin{cfuncdesc}{int}{PySequence_Fast_GET_SIZE}{PyObject *o} +\begin{cfuncdesc}{Py_ssize_t}{PySequence_Fast_GET_SIZE}{PyObject *o} Returns the length of \var{o}, assuming that \var{o} was returned by \cfunction{PySequence_Fast()} and that \var{o} is not \NULL. The size can also be gotten by calling Modified: stackless/branches/release25-maint/Doc/api/concrete.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/concrete.tex (original) +++ stackless/branches/release25-maint/Doc/api/concrete.tex Sat Apr 14 15:02:57 2007 @@ -2082,7 +2082,7 @@ \begin{verbatim} PyObject *key, *value; -int pos = 0; +Py_ssize_t pos = 0; while (PyDict_Next(self->dict, &pos, &key, &value)) { /* do something interesting with the values... */ @@ -2097,7 +2097,7 @@ \begin{verbatim} PyObject *key, *value; -int pos = 0; +Py_ssize_t pos = 0; while (PyDict_Next(self->dict, &pos, &key, &value)) { int i = PyInt_AS_LONG(value) + 1; @@ -2879,10 +2879,10 @@ Various date and time objects are supplied by the \module{datetime} module. Before using any of these functions, the header file \file{datetime.h} must be included in your source (note that this is -not include by \file{Python.h}), and macro \cfunction{PyDateTime_IMPORT()} -must be invoked. The macro arranges to put a pointer to a C structure -in a static variable \code{PyDateTimeAPI}, which is used by the following -macros. +not included by \file{Python.h}), and the macro +\cfunction{PyDateTime_IMPORT} must be invoked. The macro puts a +pointer to a C structure into a static variable, +\code{PyDateTimeAPI}, that is used by the following macros. Type-check macros: Modified: stackless/branches/release25-maint/Doc/api/exceptions.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/exceptions.tex (original) +++ stackless/branches/release25-maint/Doc/api/exceptions.tex Sat Apr 14 15:02:57 2007 @@ -328,7 +328,7 @@ default effect for \constant{SIGINT}\ttindex{SIGINT} is to raise the \withsubitem{(built-in exception)}{\ttindex{KeyboardInterrupt}} \exception{KeyboardInterrupt} exception. If an exception is raised - the error indicator is set and the function returns \code{1}; + the error indicator is set and the function returns \code{-1}; otherwise the function returns \code{0}. The error indicator may or may not be cleared if it was previously set. \end{cfuncdesc} Modified: stackless/branches/release25-maint/Doc/api/memory.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/memory.tex (original) +++ stackless/branches/release25-maint/Doc/api/memory.tex Sat Apr 14 15:02:57 2007 @@ -100,7 +100,9 @@ memory block is resized but is not freed, and the returned pointer is non-\NULL. Unless \var{p} is \NULL, it must have been returned by a previous call to \cfunction{PyMem_Malloc()} or - \cfunction{PyMem_Realloc()}. + \cfunction{PyMem_Realloc()}. If the request fails, + \cfunction{PyMem_Realloc()} returns \NULL{} and \var{p} remains a + valid pointer to the previous memory area. \end{cfuncdesc} \begin{cfuncdesc}{void}{PyMem_Free}{void *p} @@ -124,7 +126,8 @@ \begin{cfuncdesc}{\var{TYPE}*}{PyMem_Resize}{void *p, TYPE, size_t n} Same as \cfunction{PyMem_Realloc()}, but the memory block is resized to \code{(\var{n} * sizeof(\var{TYPE}))} bytes. Returns a pointer - cast to \ctype{\var{TYPE}*}. + cast to \ctype{\var{TYPE}*}. On return, \var{p} will be a pointer to + the new memory area, or \NULL{} in the event of failure. \end{cfuncdesc} \begin{cfuncdesc}{void}{PyMem_Del}{void *p} Modified: stackless/branches/release25-maint/Doc/api/newtypes.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/newtypes.tex (original) +++ stackless/branches/release25-maint/Doc/api/newtypes.tex Sat Apr 14 15:02:57 2007 @@ -103,8 +103,6 @@ the value for the \var{methods} argument]{2.3} \end{cfuncdesc} -DL_IMPORT - \begin{cvardesc}{PyObject}{_Py_NoneStruct} Object which is visible in Python as \code{None}. This should only be accessed using the \code{Py_None} macro, which evaluates to a Modified: stackless/branches/release25-maint/Doc/api/utilities.tex ============================================================================== --- stackless/branches/release25-maint/Doc/api/utilities.tex (original) +++ stackless/branches/release25-maint/Doc/api/utilities.tex Sat Apr 14 15:02:57 2007 @@ -930,3 +930,94 @@ If there is an error in the format string, the \exception{SystemError} exception is set and \NULL{} returned. \end{cfuncdesc} + +\section{String conversion and formatting \label{string-formatting}} + +Functions for number conversion and formatted string output. + +\begin{cfuncdesc}{int}{PyOS_snprintf}{char *str, size_t size, + const char *format, \moreargs} +Output not more than \var{size} bytes to \var{str} according to the format +string \var{format} and the extra arguments. See the \UNIX{} man +page \manpage{snprintf}{2}. +\end{cfuncdesc} + +\begin{cfuncdesc}{int}{PyOS_vsnprintf}{char *str, size_t size, + const char *format, va_list va} +Output not more than \var{size} bytes to \var{str} according to the format +string \var{format} and the variable argument list \var{va}. \UNIX{} +man page \manpage{vsnprintf}{2}. +\end{cfuncdesc} + +\cfunction{PyOS_snprintf} and \cfunction{PyOS_vsnprintf} wrap the +Standard C library functions \cfunction{snprintf()} and +\cfunction{vsnprintf()}. Their purpose is to guarantee consistent +behavior in corner cases, which the Standard C functions do not. + +The wrappers ensure that \var{str}[\var{size}-1] is always +\character{\textbackslash0} upon return. They never write more than +\var{size} bytes (including the trailing \character{\textbackslash0} +into str. Both functions require that \code{\var{str} != NULL}, +\code{\var{size} > 0} and \code{\var{format} != NULL}. + +If the platform doesn't have \cfunction{vsnprintf()} and the buffer +size needed to avoid truncation exceeds \var{size} by more than 512 +bytes, Python aborts with a \var{Py_FatalError}. + +The return value (\var{rv}) for these functions should be interpreted +as follows: + +\begin{itemize} + +\item When \code{0 <= \var{rv} < \var{size}}, the output conversion + was successful and \var{rv} characters were written to \var{str} + (excluding the trailing \character{\textbackslash0} byte at + \var{str}[\var{rv}]). + +\item When \code{\var{rv} >= \var{size}}, the output conversion was + truncated and a buffer with \code{\var{rv} + 1} bytes would have + been needed to succeed. \var{str}[\var{size}-1] is + \character{\textbackslash0} in this case. + +\item When \code{\var{rv} < 0}, ``something bad happened.'' + \var{str}[\var{size}-1] is \character{\textbackslash0} in this case + too, but the rest of \var{str} is undefined. The exact cause of the + error depends on the underlying platform. + +\end{itemize} + +The following functions provide locale-independent string to number +conversions. + +\begin{cfuncdesc}{double}{PyOS_ascii_strtod}{const char *nptr, char **endptr} +Convert a string to a \ctype{double}. This function behaves like the +Standard C function \cfunction{strtod()} does in the C locale. It does +this without changing the current locale, since that would not be +thread-safe. + +\cfunction{PyOS_ascii_strtod} should typically be used for reading +configuration files or other non-user input that should be locale +independent. \versionadded{2.4} + +See the \UNIX{} man page \manpage{strtod}{2} for details. + +\end{cfuncdesc} + +\begin{cfuncdesc}{char *}{PyOS_ascii_formatd}{char *buffer, size_t buf_len, + const char *format, double d} +Convert a \ctype{double} to a string using the \character{.} as the +decimal separator. \var{format} is a \cfunction{printf()}-style format +string specifying the number format. Allowed conversion characters are +\character{e}, \character{E}, \character{f}, \character{F}, +\character{g} and \character{G}. + +The return value is a pointer to \var{buffer} with the converted +string or NULL if the conversion failed. \versionadded{2.4} +\end{cfuncdesc} + +\begin{cfuncdesc}{double}{PyOS_ascii_atof}{const char *nptr} +Convert a string to a \ctype{double} in a locale-independent +way. \versionadded{2.4} + +See the \UNIX{} man page \manpage{atof}{2} for details. +\end{cfuncdesc} Modified: stackless/branches/release25-maint/Doc/commontex/boilerplate.tex ============================================================================== --- stackless/branches/release25-maint/Doc/commontex/boilerplate.tex (original) +++ stackless/branches/release25-maint/Doc/commontex/boilerplate.tex Sat Apr 14 15:02:57 2007 @@ -5,5 +5,5 @@ Email: \email{docs at python.org} } -\date{19th September, 2006} % XXX update before final release! +\date{5th April, 2007} % XXX update before final release! \input{patchlevel} % include Python version information Modified: stackless/branches/release25-maint/Doc/commontex/license.tex ============================================================================== --- stackless/branches/release25-maint/Doc/commontex/license.tex (original) +++ stackless/branches/release25-maint/Doc/commontex/license.tex Sat Apr 14 15:02:57 2007 @@ -51,6 +51,7 @@ \linev{2.4.2}{2.4.1}{2005}{PSF}{yes} \linev{2.4.3}{2.4.2}{2006}{PSF}{yes} \linev{2.5}{2.4}{2006}{PSF}{yes} + \linev{2.5.1}{2.5}{2007}{PSF}{yes} \end{tablev} \note{GPL-compatible doesn't mean that we're distributing Modified: stackless/branches/release25-maint/Doc/dist/dist.tex ============================================================================== --- stackless/branches/release25-maint/Doc/dist/dist.tex (original) +++ stackless/branches/release25-maint/Doc/dist/dist.tex Sat Apr 14 15:02:57 2007 @@ -692,7 +692,7 @@ \begin{tableii}{l|l}{code}{Provides Expression}{Explanation} \lineii{mypkg} {Provide \code{mypkg}, using the distribution version} - \lineii{mypkg (1.1} {Provide \code{mypkg} version 1.1, regardless of the + \lineii{mypkg (1.1)} {Provide \code{mypkg} version 1.1, regardless of the distribution version} \end{tableii} Modified: stackless/branches/release25-maint/Doc/ext/newtypes.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ext/newtypes.tex (original) +++ stackless/branches/release25-maint/Doc/ext/newtypes.tex Sat Apr 14 15:02:57 2007 @@ -489,7 +489,6 @@ garbage collection, there are calls that can be made to ``untrack'' the object from garbage collection, however, these calls are advanced and not covered here.} -\item \end{itemize} @@ -930,6 +929,102 @@ collection. Most extensions will use the versions automatically provided. +\subsection{Subclassing other types} + +It is possible to create new extension types that are derived from existing +types. It is easiest to inherit from the built in types, since an extension +can easily use the \class{PyTypeObject} it needs. It can be difficult to +share these \class{PyTypeObject} structures between extension modules. + +In this example we will create a \class{Shoddy} type that inherits from +the builtin \class{list} type. The new type will be completely compatible +with regular lists, but will have an additional \method{increment()} method +that increases an internal counter. + +\begin{verbatim} +>>> import shoddy +>>> s = shoddy.Shoddy(range(3)) +>>> s.extend(s) +>>> print len(s) +6 +>>> print s.increment() +1 +>>> print s.increment() +2 +\end{verbatim} + +\verbatiminput{shoddy.c} + +As you can see, the source code closely resembles the \class{Noddy} examples in previous +sections. We will break down the main differences between them. + +\begin{verbatim} +typedef struct { + PyListObject list; + int state; +} Shoddy; +\end{verbatim} + +The primary difference for derived type objects is that the base type's +object structure must be the first value. The base type will already +include the \cfunction{PyObject_HEAD} at the beginning of its structure. + +When a Python object is a \class{Shoddy} instance, its \var{PyObject*} pointer +can be safely cast to both \var{PyListObject*} and \var{Shoddy*}. + +\begin{verbatim} +static int +Shoddy_init(Shoddy *self, PyObject *args, PyObject *kwds) +{ + if (PyList_Type.tp_init((PyObject *)self, args, kwds) < 0) + return -1; + self->state = 0; + return 0; +} +\end{verbatim} + +In the \member{__init__} method for our type, we can see how to call through +to the \member{__init__} method of the base type. + +This pattern is important when writing a type with custom \member{new} and +\member{dealloc} methods. The \member{new} method should not actually create the +memory for the object with \member{tp_alloc}, that will be handled by +the base class when calling its \member{tp_new}. + +When filling out the \cfunction{PyTypeObject} for the \class{Shoddy} type, +you see a slot for \cfunction{tp_base}. Due to cross platform compiler +issues, you can't fill that field directly with the \cfunction{PyList_Type}; +it can be done later in the module's \cfunction{init} function. + +\begin{verbatim} +PyMODINIT_FUNC +initshoddy(void) +{ + PyObject *m; + + ShoddyType.tp_base = &PyList_Type; + if (PyType_Ready(&ShoddyType) < 0) + return; + + m = Py_InitModule3("shoddy", NULL, "Shoddy module"); + if (m == NULL) + return; + + Py_INCREF(&ShoddyType); + PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType); +} +\end{verbatim} + +Before calling \cfunction{PyType_Ready}, the type structure must have the +\member{tp_base} slot filled in. When we are deriving a new type, it is +not necessary to fill out the \member{tp_alloc} slot with +\cfunction{PyType_GenericNew} -- the allocate function from the base type +will be inherited. + +After that, calling \cfunction{PyType_Ready} and adding the type object +to the module is the same as with the basic \class{Noddy} examples. + + \section{Type Methods \label{dnt-type-methods}} Modified: stackless/branches/release25-maint/Doc/inst/inst.tex ============================================================================== --- stackless/branches/release25-maint/Doc/inst/inst.tex (original) +++ stackless/branches/release25-maint/Doc/inst/inst.tex Sat Apr 14 15:02:57 2007 @@ -632,7 +632,7 @@ installation base directory when you run the setup script. For example, \begin{verbatim} -python setup.py --install-base=/tmp +python setup.py install --install-base=/tmp \end{verbatim} would install pure modules to \filevar{/tmp/python/lib} in the first Modified: stackless/branches/release25-maint/Doc/lib/emailgenerator.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/emailgenerator.tex (original) +++ stackless/branches/release25-maint/Doc/lib/emailgenerator.tex Sat Apr 14 15:02:57 2007 @@ -33,7 +33,7 @@ line. This is the only guaranteed portable way to avoid having such lines be mistaken for a \UNIX{} mailbox format envelope header separator (see \ulink{WHY THE CONTENT-LENGTH FORMAT IS BAD} -{http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html} +{http://www.jwz.org/doc/content-length.html} for details). \var{mangle_from_} defaults to \code{True}, but you might want to set this to \code{False} if you are not writing \UNIX{} mailbox format files. Modified: stackless/branches/release25-maint/Doc/lib/libasyncore.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libasyncore.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libasyncore.tex Sat Apr 14 15:02:57 2007 @@ -198,9 +198,11 @@ \end{methoddesc} \begin{methoddesc}{bind}{address} - Bind the socket to \var{address}. The socket must not already - be bound. (The format of \var{address} depends on the address - family --- see above.) + Bind the socket to \var{address}. The socket must not already be + bound. (The format of \var{address} depends on the address family + --- see above.) To mark the socket as re-usable (setting the + \constant{SO_REUSEADDR} option), call the \class{dispatcher} + object's \method{set_reuse_addr()} method. \end{methoddesc} \begin{methoddesc}{accept}{} Modified: stackless/branches/release25-maint/Doc/lib/libbase64.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libbase64.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libbase64.tex Sat Apr 14 15:02:57 2007 @@ -21,7 +21,7 @@ decoding to and from file-like objects as well as strings, but only using the Base64 standard alphabet. -The modern interface provides: +The modern interface, which was introduced in Python 2.4, provides: \begin{funcdesc}{b64encode}{s\optional{, altchars}} Encode a string use Base64. Modified: stackless/branches/release25-maint/Doc/lib/libbsddb.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libbsddb.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libbsddb.tex Sat Apr 14 15:02:57 2007 @@ -2,7 +2,6 @@ Interface to Berkeley DB library} \declaremodule{extension}{bsddb} - \platform{Unix, Windows} \modulesynopsis{Interface to Berkeley DB database library} \sectionauthor{Skip Montanaro}{skip at mojam.com} @@ -16,7 +15,7 @@ \function{pickle.dumps()}. The \module{bsddb} module requires a Berkeley DB library version from -3.3 thru 4.4. +3.3 thru 4.5. \begin{seealso} \seeurl{http://pybsddb.sourceforge.net/} @@ -46,10 +45,10 @@ instances. \begin{funcdesc}{hashopen}{filename\optional{, flag\optional{, - mode\optional{, bsize\optional{, + mode\optional{, pgsize\optional{, ffactor\optional{, nelem\optional{, - cachesize\optional{, hash\optional{, - lorder}}}}}}}}} + cachesize\optional{, lorder\optional{, + hflags}}}}}}}}} Open the hash format file named \var{filename}. Files never intended to be preserved on disk may be created by passing \code{None} as the \var{filename}. The optional @@ -80,7 +79,7 @@ \begin{funcdesc}{rnopen}{filename\optional{, flag\optional{, mode\optional{, rnflags\optional{, cachesize\optional{, pgsize\optional{, lorder\optional{, -reclen\optional{, bval\optional{, bfname}}}}}}}}}} +rlen\optional{, delim\optional{, source\optional{, pad}}}}}}}}}}} Open a DB record format file named \var{filename}. Files never intended to be preserved on disk may be created by passing \code{None} as the Modified: stackless/branches/release25-maint/Doc/lib/libbz2.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libbz2.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libbz2.tex Sat Apr 14 15:02:57 2007 @@ -90,10 +90,10 @@ \begin{methoddesc}[BZ2File]{seek}{offset\optional{, whence}} Move to new file position. Argument \var{offset} is a byte count. Optional -argument \var{whence} defaults to \code{0} (offset from start of file, -offset should be \code{>= 0}); other values are \code{1} (move relative to -current position, positive or negative), and \code{2} (move relative to end -of file, usually negative, although many platforms allow seeking beyond +argument \var{whence} defaults to \code{os.SEEK_SET} or \code{0} (offset from start of file; +offset should be \code{>= 0}); other values are \code{os.SEEK_CUR} or \code{1} (move relative to +current position; offset can be positive or negative), and \code{os.SEEK_END} or \code{2} (move relative to end +of file; offset is usually negative, although many platforms allow seeking beyond the end of a file). Note that seeking of bz2 files is emulated, and depending on the parameters Modified: stackless/branches/release25-maint/Doc/lib/libcollections.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libcollections.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libcollections.tex Sat Apr 14 15:02:57 2007 @@ -16,7 +16,7 @@ \subsection{\class{deque} objects \label{deque-objects}} \begin{funcdesc}{deque}{\optional{iterable}} - Returns a new deque objected initialized left-to-right (using + Returns a new deque object initialized left-to-right (using \method{append()}) with data from \var{iterable}. If \var{iterable} is not specified, the new deque is empty. @@ -311,16 +311,20 @@ When a letter is first encountered, it is missing from the mapping, so the \member{default_factory} function calls \function{int()} to supply a default count of zero. The increment operation then builds up the count for each -letter. This technique makes counting simpler and faster than an equivalent -technique using \method{dict.get()}: +letter. -\begin{verbatim} ->>> d = {} ->>> for k in s: - d[k] = d.get(k, 0) + 1 +The function \function{int()} which always returns zero is just a special +case of constant functions. A faster and more flexible way to create +constant functions is to use \function{itertools.repeat()} which can supply +any constant value (not just zero): ->>> d.items() -[('i', 4), ('p', 2), ('s', 4), ('m', 1)] +\begin{verbatim} +>>> def constant_factory(value): +... return itertools.repeat(value).next +>>> d = defaultdict(constant_factory('')) +>>> d.update(name='John', action='ran') +>>> '%(name)s %(action)s to %(object)s' % d +'John ran to ' \end{verbatim} Setting the \member{default_factory} to \class{set} makes the Modified: stackless/branches/release25-maint/Doc/lib/libcommands.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libcommands.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libcommands.tex Sat Apr 14 15:02:57 2007 @@ -12,6 +12,11 @@ return any output generated by the command and, optionally, the exit status. +The \module{subprocess} module provides more powerful facilities for +spawning new processes and retrieving their results. Using the +\module{subprocess} module is preferable to using the \module{commands} +module. + The \module{commands} module defines the following functions: @@ -51,3 +56,7 @@ >>> commands.getstatus('/bin/ls') '-rwxr-xr-x 1 root 13352 Oct 14 1994 /bin/ls' \end{verbatim} + +\begin{seealso} + \seemodule{subprocess}{Module for spawning and managing subprocesses.} +\end{seealso} Modified: stackless/branches/release25-maint/Doc/lib/libcsv.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libcsv.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libcsv.tex Sat Apr 14 15:02:57 2007 @@ -345,6 +345,7 @@ \begin{memberdesc}[csv reader]{line_num} The number of lines read from the source iterator. This is not the same as the number of records returned, as records can span multiple lines. + \versionadded{2.5} \end{memberdesc} Modified: stackless/branches/release25-maint/Doc/lib/libctypes.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libctypes.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libctypes.tex Sat Apr 14 15:02:57 2007 @@ -1219,7 +1219,7 @@ It is quite interesting to see that the Windows \function{qsort} function needs more comparisons than the linux version! -As we can easily check, our array sorted now: +As we can easily check, our array is sorted now: \begin{verbatim} >>> for i in ia: print i, ... @@ -1821,7 +1821,7 @@ \begin{quote} \begin{verbatim}>>> from ctypes import c_int, WINFUNCTYPE, windll >>> from ctypes.wintypes import HWND, LPCSTR, UINT ->>> prototype = WINFUNCTYPE(c_int, HWND, LPCSTR, LPCSTR, c_uint) +>>> prototype = WINFUNCTYPE(c_int, HWND, LPCSTR, LPCSTR, UINT) >>> paramflags = (1, "hwnd", 0), (1, "text", "Hi"), (1, "caption", None), (1, "flags", 0) >>> MessageBox = prototype(("MessageBoxA", windll.user32), paramflags) >>>\end{verbatim} @@ -1848,7 +1848,7 @@ Here is the wrapping with \code{ctypes}: \begin{quote} -\begin{verbatim}>>> from ctypes import POINTER, WINFUNCTYPE, windll +\begin{verbatim}>>> from ctypes import POINTER, WINFUNCTYPE, windll, WinError >>> from ctypes.wintypes import BOOL, HWND, RECT >>> prototype = WINFUNCTYPE(BOOL, HWND, POINTER(RECT)) >>> paramflags = (1, "hwnd"), (2, "lprect") @@ -2085,10 +2085,10 @@ the type. Some types accept other objects as well. \end{methoddesc} -\begin{methoddesc}{in_dll}{name, library} +\begin{methoddesc}{in_dll}{library, name} This method returns a ctypes type instance exported by a shared library. \var{name} is the name of the symbol that exports the data, -\code{library} is the loaded shared library. +\var{library} is the loaded shared library. \end{methoddesc} Common instance variables of ctypes data types: @@ -2299,12 +2299,10 @@ or error information for a function or method call. \end{classdesc*} -\code{py{\_}object} : classdesc* -\begin{quote} - -Represents the C \code{PyObject *} datatype. Calling this with an -without an argument creates a \code{NULL} \code{PyObject *} pointer. -\end{quote} +\begin{classdesc*}{py_object} +Represents the C \code{PyObject *} datatype. Calling this without an +argument creates a \code{NULL} \code{PyObject *} pointer. +\end{classdesc*} The \code{ctypes.wintypes} module provides quite some other Windows specific data types, for example \code{HWND}, \code{WPARAM}, or \code{DWORD}. @@ -2440,5 +2438,6 @@ \subsubsection{Arrays and pointers\label{ctypes-arrays-pointers}} -XXX +Not yet written - please see section~\ref{ctypes-pointers}, pointers and +section~\ref{ctypes-arrays}, arrays in the tutorial. Modified: stackless/branches/release25-maint/Doc/lib/libdbhash.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libdbhash.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libdbhash.tex Sat Apr 14 15:02:57 2007 @@ -2,7 +2,6 @@ DBM-style interface to the BSD database library} \declaremodule{standard}{dbhash} - \platform{Unix, Windows} \modulesynopsis{DBM-style interface to the BSD database library.} \sectionauthor{Fred L. Drake, Jr.}{fdrake at acm.org} Modified: stackless/branches/release25-maint/Doc/lib/libfnmatch.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libfnmatch.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libfnmatch.tex Sat Apr 14 15:02:57 2007 @@ -36,6 +36,19 @@ require a case-sensitive comparison regardless of whether that's standard for your operating system, use \function{fnmatchcase()} instead. + +This example will print all file names in the current directory with the +extension \code{.txt}: + +\begin{verbatim} +import fnmatch +import os + +for file in os.listdir('.'): + if fnmatch.fnmatch(file, '*.txt'): + print file +\end{verbatim} + \end{funcdesc} \begin{funcdesc}{fnmatchcase}{filename, pattern} @@ -50,6 +63,24 @@ \versionadded{2.2} \end{funcdesc} +\begin{funcdesc}{translate}{pattern} +Return the shell-style \var{pattern} converted to a regular +expression. + +Example: + +\begin{verbatim} +>>> import fnmatch, re +>>> +>>> regex = fnmatch.translate('*.txt') +>>> regex +'.*\\.txt$' +>>> reobj = re.compile(regex) +>>> print reobj.match('foobar.txt') +<_sre.SRE_Match object at 0x...> +\end{verbatim} +\end{funcdesc} + \begin{seealso} \seemodule{glob}{\UNIX{} shell-style path expansion.} \end{seealso} Modified: stackless/branches/release25-maint/Doc/lib/libfuncs.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libfuncs.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libfuncs.tex Sat Apr 14 15:02:57 2007 @@ -237,11 +237,11 @@ \code{del \var{x}.\var{foobar}}. \end{funcdesc} -\begin{funcdesc}{dict}{\optional{mapping-or-sequence}} +\begin{funcdesc}{dict}{\optional{arg}} Return a new dictionary initialized from an optional positional argument or from a set of keyword arguments. If no arguments are given, return a new empty dictionary. - If the positional argument is a mapping object, return a dictionary + If the positional argument \var{arg} is a mapping object, return a dictionary mapping the same keys to the same values as does the mapping object. Otherwise the positional argument must be a sequence, a container that supports iteration, or an iterator object. The elements of the argument @@ -414,18 +414,18 @@ \versionadded{2.2} \end{funcdesc} -\begin{funcdesc}{filter}{function, list} - Construct a list from those elements of \var{list} for which - \var{function} returns true. \var{list} may be either a sequence, a - container which supports iteration, or an iterator, If \var{list} +\begin{funcdesc}{filter}{function, iterable} + Construct a list from those elements of \var{iterable} for which + \var{function} returns true. \var{iterable} may be either a sequence, a + container which supports iteration, or an iterator, If \var{iterable} is a string or a tuple, the result also has that type; otherwise it is always a list. If \var{function} is \code{None}, the identity function is assumed, that is, all elements of - \var{list} that are false are removed. + \var{iterable} that are false are removed. - Note that \code{filter(function, \var{list})} is equivalent to - \code{[item for item in \var{list} if function(item)]} if function is - not \code{None} and \code{[item for item in \var{list} if item]} if + Note that \code{filter(function, \var{iterable})} is equivalent to + \code{[item for item in \var{iterable} if function(item)]} if function is + not \code{None} and \code{[item for item in \var{iterable} if item]} if function is \code{None}. \end{funcdesc} @@ -548,8 +548,9 @@ \begin{funcdesc}{isinstance}{object, classinfo} Return true if the \var{object} argument is an instance of the \var{classinfo} argument, or of a (direct or indirect) subclass - thereof. Also return true if \var{classinfo} is a type object and - \var{object} is an object of that type. If \var{object} is not a + thereof. Also return true if \var{classinfo} is a type object + (new-style class) and \var{object} is an object of that type or of a + (direct or indirect) subclass thereof. If \var{object} is not a class instance or an object of the given type, the function always returns false. If \var{classinfo} is neither a class object nor a type object, it may be a tuple of class or type objects, or may @@ -591,12 +592,12 @@ may be a sequence (string, tuple or list) or a mapping (dictionary). \end{funcdesc} -\begin{funcdesc}{list}{\optional{sequence}} +\begin{funcdesc}{list}{\optional{iterable}} Return a list whose items are the same and in the same order as - \var{sequence}'s items. \var{sequence} may be either a sequence, a + \var{iterable}'s items. \var{iterable} may be either a sequence, a container that supports iteration, or an iterator object. If - \var{sequence} is already a list, a copy is made and returned, - similar to \code{\var{sequence}[:]}. For instance, + \var{iterable} is already a list, a copy is made and returned, + similar to \code{\var{iterable}[:]}. For instance, \code{list('abc')} returns \code{['a', 'b', 'c']} and \code{list( (1, 2, 3) )} returns \code{[1, 2, 3]}. If no argument is given, returns a new empty list, \code{[]}. @@ -622,22 +623,22 @@ are given, returns \code{0L}. \end{funcdesc} -\begin{funcdesc}{map}{function, list, ...} - Apply \var{function} to every item of \var{list} and return a list - of the results. If additional \var{list} arguments are passed, +\begin{funcdesc}{map}{function, iterable, ...} + Apply \var{function} to every item of \var{iterable} and return a list + of the results. If additional \var{iterable} arguments are passed, \var{function} must take that many arguments and is applied to the - items of all lists in parallel; if a list is shorter than another it + items from all iterables in parallel. If one iterable is shorter than another it is assumed to be extended with \code{None} items. If \var{function} is \code{None}, the identity function is assumed; if there are - multiple list arguments, \function{map()} returns a list consisting - of tuples containing the corresponding items from all lists (a kind - of transpose operation). The \var{list} arguments may be any kind - of sequence; the result is always a list. + multiple arguments, \function{map()} returns a list consisting + of tuples containing the corresponding items from all iterables (a kind + of transpose operation). The \var{iterable} arguments may be a sequence + or any iterable object; the result is always a list. \end{funcdesc} -\begin{funcdesc}{max}{s\optional{, args...}\optional{key}} - With a single argument \var{s}, return the largest item of a - non-empty sequence (such as a string, tuple or list). With more +\begin{funcdesc}{max}{iterable\optional{, args...}\optional{key}} + With a single argument \var{iterable}, return the largest item of a + non-empty iterable (such as a string, tuple or list). With more than one argument, return the largest of the arguments. The optional \var{key} argument specifies a one-argument ordering @@ -647,16 +648,16 @@ \versionchanged[Added support for the optional \var{key} argument]{2.5} \end{funcdesc} -\begin{funcdesc}{min}{s\optional{, args...}\optional{key}} - With a single argument \var{s}, return the smallest item of a - non-empty sequence (such as a string, tuple or list). With more +\begin{funcdesc}{min}{iterable\optional{, args...}\optional{key}} + With a single argument \var{iterable}, return the smallest item of a + non-empty iterable (such as a string, tuple or list). With more than one argument, return the smallest of the arguments. The optional \var{key} argument specifies a one-argument ordering function like that used for \method{list.sort()}. The \var{key} argument, if supplied, must be in keyword form (for example, \samp{min(a,b,c,key=func)}). - \versionchanged[Added support for the optional \var{key} argument]{2.5} + \versionchanged[Added support for the optional \var{key} argument]{2.5} \end{funcdesc} \begin{funcdesc}{object}{} @@ -871,17 +872,17 @@ line editing and history features. \end{funcdesc} -\begin{funcdesc}{reduce}{function, sequence\optional{, initializer}} +\begin{funcdesc}{reduce}{function, iterable\optional{, initializer}} Apply \var{function} of two arguments cumulatively to the items of - \var{sequence}, from left to right, so as to reduce the sequence to + \var{iterable}, from left to right, so as to reduce the iterable to a single value. For example, \code{reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])} calculates \code{((((1+2)+3)+4)+5)}. The left argument, \var{x}, is the accumulated value and the right argument, \var{y}, - is the update value from the \var{sequence}. If the optional + is the update value from the \var{iterable}. If the optional \var{initializer} is present, it is placed before the items of the - sequence in the calculation, and serves as a default when the - sequence is empty. If \var{initializer} is not given and - \var{sequence} contains only one item, the first item is returned. + iterable in the calculation, and serves as a default when the + iterable is empty. If \var{initializer} is not given and + \var{iterable} contains only one item, the first item is returned. \end{funcdesc} \begin{funcdesc}{reload}{module} @@ -1087,11 +1088,11 @@ string, \code{''}. \end{funcdesc} -\begin{funcdesc}{sum}{sequence\optional{, start}} - Sums \var{start} and the items of a \var{sequence}, from left to - right, and returns the total. \var{start} defaults to \code{0}. - The \var{sequence}'s items are normally numbers, and are not allowed - to be strings. The fast, correct way to concatenate sequence of +\begin{funcdesc}{sum}{iterable\optional{, start}} + Sums \var{start} and the items of an \var{iterable} from left to + right and returns the total. \var{start} defaults to \code{0}. + The \var{iterable}'s items are normally numbers, and are not allowed + to be strings. The fast, correct way to concatenate a sequence of strings is by calling \code{''.join(\var{sequence})}. Note that \code{sum(range(\var{n}), \var{m})} is equivalent to \code{reduce(operator.add, range(\var{n}), \var{m})} @@ -1121,11 +1122,11 @@ \versionadded{2.2} \end{funcdesc} -\begin{funcdesc}{tuple}{\optional{sequence}} +\begin{funcdesc}{tuple}{\optional{iterable}} Return a tuple whose items are the same and in the same order as - \var{sequence}'s items. \var{sequence} may be a sequence, a + \var{iterable}'s items. \var{iterable} may be a sequence, a container that supports iteration, or an iterator object. - If \var{sequence} is already a tuple, it + If \var{iterable} is already a tuple, it is returned unchanged. For instance, \code{tuple('abc')} returns \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns \code{(1, 2, 3)}. If no argument is given, returns a new empty Modified: stackless/branches/release25-maint/Doc/lib/libfunctools.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libfunctools.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libfunctools.tex Sat Apr 14 15:02:57 2007 @@ -53,15 +53,16 @@ \begin{funcdesc}{update_wrapper} {wrapper, wrapped\optional{, assigned}\optional{, updated}} -Update a wrapper function to look like the wrapped function. The optional -arguments are tuples to specify which attributes of the original +Update a \var{wrapper} function to look like the \var{wrapped} function. +The optional arguments are tuples to specify which attributes of the original function are assigned directly to the matching attributes on the wrapper function and which attributes of the wrapper function are updated with the corresponding attributes from the original function. The default values for these arguments are the module level constants -\var{WRAPPER_ASSIGNMENTS} (which assigns to the wrapper function's name, -module and documentation string) and \var{WRAPPER_UPDATES} (which -updates the wrapper function's instance dictionary). +\var{WRAPPER_ASSIGNMENTS} (which assigns to the wrapper function's +\var{__name__}, \var{__module__} and \var{__doc__}, the documentation string) +and \var{WRAPPER_UPDATES} (which updates the wrapper function's \var{__dict__}, +i.e. the instance dictionary). The main intended use for this function is in decorator functions which wrap the decorated function and return the wrapper. If the @@ -85,6 +86,7 @@ ... >>> @my_decorator ... def example(): + ... """Docstring""" ... print 'Called example function' ... >>> example() @@ -92,9 +94,12 @@ Called example function >>> example.__name__ 'example' + >>> example.__doc__ + 'Docstring' \end{verbatim} Without the use of this decorator factory, the name of the example -function would have been \code{'wrapper'}. +function would have been \code{'wrapper'}, and the docstring of the +original \function{example()} would have been lost. \end{funcdesc} Modified: stackless/branches/release25-maint/Doc/lib/libgetopt.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libgetopt.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libgetopt.tex Sat Apr 14 15:02:57 2007 @@ -126,8 +126,9 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="]) - except getopt.GetoptError: + except getopt.GetoptError, err: # print help information and exit: + print str(err) # will print something like "option -a not recognized" usage() sys.exit(2) output = None @@ -135,11 +136,13 @@ for o, a in opts: if o == "-v": verbose = True - if o in ("-h", "--help"): + elif o in ("-h", "--help"): usage() sys.exit() - if o in ("-o", "--output"): + elif o in ("-o", "--output"): output = a + else: + assert False, "unhandled option" # ... if __name__ == "__main__": Modified: stackless/branches/release25-maint/Doc/lib/libgettext.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libgettext.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libgettext.tex Sat Apr 14 15:02:57 2007 @@ -102,9 +102,9 @@ return \var{plural} otherwise. The Plural formula is taken from the catalog header. It is a C or -Python expression that has a free variable n; the expression evaluates +Python expression that has a free variable \var{n}; the expression evaluates to the index of the plural in the catalog. See the GNU gettext -documentation for the precise syntax to be used in .po files, and the +documentation for the precise syntax to be used in \file{.po} files and the formulas for a variety of languages. \versionadded{2.3} Modified: stackless/branches/release25-maint/Doc/lib/libheapq.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libheapq.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libheapq.tex Sat Apr 14 15:02:57 2007 @@ -76,14 +76,14 @@ >>> for item in data: ... heappush(heap, item) ... ->>> sorted = [] +>>> ordered = [] >>> while heap: -... sorted.append(heappop(heap)) +... ordered.append(heappop(heap)) ... ->>> print sorted +>>> print ordered [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> data.sort() ->>> print data == sorted +>>> print data == ordered True >>> \end{verbatim} Modified: stackless/branches/release25-maint/Doc/lib/libimageop.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libimageop.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libimageop.tex Sat Apr 14 15:02:57 2007 @@ -19,7 +19,7 @@ \begin{funcdesc}{crop}{image, psize, width, height, x0, y0, x1, y1} -Return the selected part of \var{image}, which should by +Return the selected part of \var{image}, which should be \var{width} by \var{height} in size and consist of pixels of \var{psize} bytes. \var{x0}, \var{y0}, \var{x1} and \var{y1} are like the \function{gl.lrectread()} parameters, i.e.\ the boundary is Modified: stackless/branches/release25-maint/Doc/lib/libitertools.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libitertools.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libitertools.tex Sat Apr 14 15:02:57 2007 @@ -474,8 +474,8 @@ return izip(mapping.iterkeys(), mapping.itervalues()) def nth(iterable, n): - "Returns the nth item" - return list(islice(iterable, n, n+1)) + "Returns the nth item or raise IndexError" + return list(islice(iterable, n, n+1))[0] def all(seq, pred=None): "Returns True if pred(x) is true for every element in the iterable" @@ -539,5 +539,8 @@ "grouper(3, 'abcdefg', 'x') --> ('a','b','c'), ('d','e','f'), ('g','x','x')" return izip(*[chain(iterable, repeat(padvalue, n-1))]*n) +def reverse_map(d): + "Return a new dict with swapped keys and values" + return dict(izip(d.itervalues(), d)) \end{verbatim} Modified: stackless/branches/release25-maint/Doc/lib/liblocale.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/liblocale.tex (original) +++ stackless/branches/release25-maint/Doc/lib/liblocale.tex Sat Apr 14 15:02:57 2007 @@ -481,7 +481,7 @@ locale settings. When a call to the \function{setlocale()} function changes the \constant{LC_CTYPE} settings, the variables \code{string.lowercase}, \code{string.uppercase} and -\code{string.letters} are recalculated. Note that this code that uses +\code{string.letters} are recalculated. Note that code that uses these variable through `\keyword{from} ... \keyword{import} ...', e.g.\ \code{from string import letters}, is not affected by subsequent \function{setlocale()} calls. Modified: stackless/branches/release25-maint/Doc/lib/liblogging.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/liblogging.tex (original) +++ stackless/branches/release25-maint/Doc/lib/liblogging.tex Sat Apr 14 15:02:57 2007 @@ -516,8 +516,10 @@ \end{methoddesc} \begin{methoddesc}{findCaller}{} -Finds the caller's source filename and line number. Returns the filename -and line number as a 2-element tuple. +Finds the caller's source filename and line number. Returns the filename, +line number and function name as a 3-element tuple. +\versionchanged[The function name was added. In earlier versions, the +filename and line number were returned as a 2-element tuple.]{2.5} \end{methoddesc} \begin{methoddesc}{handle}{record} @@ -528,8 +530,8 @@ \method{filter()}. \end{methoddesc} -\begin{methoddesc}{makeRecord}{name, lvl, fn, lno, msg, args, exc_info, - func, extra} +\begin{methoddesc}{makeRecord}{name, lvl, fn, lno, msg, args, exc_info + \optional{, func, extra}} This is a factory method which can be overridden in subclasses to create specialized \class{LogRecord} instances. \versionchanged[\var{func} and \var{extra} were added]{2.5} @@ -1397,6 +1399,9 @@ (if available).} \lineii{\%(created)f} {Time when the \class{LogRecord} was created (as returned by \function{time.time()}).} +\lineii{\%(relativeCreated)d} {Time in milliseconds when the LogRecord was + created, relative to the time the logging module was + loaded.} \lineii{\%(asctime)s} {Human-readable time when the \class{LogRecord} was created. By default this is of the form ``2003-07-08 16:49:45,896'' (the numbers after the @@ -1479,7 +1484,7 @@ information to be logged. \begin{classdesc}{LogRecord}{name, lvl, pathname, lineno, msg, args, - exc_info} + exc_info \optional{, func}} Returns an instance of \class{LogRecord} initialized with interesting information. The \var{name} is the logger name; \var{lvl} is the numeric level; \var{pathname} is the absolute pathname of the source @@ -1489,7 +1494,9 @@ which, together with \var{msg}, makes up the user message; and \var{exc_info} is the exception tuple obtained by calling \function{sys.exc_info() }(or \constant{None}, if no exception information -is available). +is available). The \var{func} is the name of the function from which the +logging call was made. If not specified, it defaults to \var{None}. +\versionchanged[\var{func} was added]{2.5} \end{classdesc} \begin{methoddesc}{getMessage}{} Modified: stackless/branches/release25-maint/Doc/lib/libmailbox.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libmailbox.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libmailbox.tex Sat Apr 14 15:02:57 2007 @@ -25,22 +25,29 @@ A mailbox, which may be inspected and modified. \end{classdesc*} +The \class{Mailbox} class defines an interface and +is not intended to be instantiated. Instead, format-specific +subclasses should inherit from \class{Mailbox} and your code +should instantiate a particular subclass. + The \class{Mailbox} interface is dictionary-like, with small keys -corresponding to messages. Keys are issued by the \class{Mailbox} instance -with which they will be used and are only meaningful to that \class{Mailbox} -instance. A key continues to identify a message even if the corresponding -message is modified, such as by replacing it with another message. Messages may -be added to a \class{Mailbox} instance using the set-like method -\method{add()} and removed using a \code{del} statement or the set-like methods -\method{remove()} and \method{discard()}. +corresponding to messages. Keys are issued by the \class{Mailbox} +instance with which they will be used and are only meaningful to that +\class{Mailbox} instance. A key continues to identify a message even +if the corresponding message is modified, such as by replacing it with +another message. + +Messages may be added to a \class{Mailbox} instance using the set-like +method \method{add()} and removed using a \code{del} statement or the +set-like methods \method{remove()} and \method{discard()}. \class{Mailbox} interface semantics differ from dictionary semantics in some -noteworthy ways. Each time a message is requested, a new representation -(typically a \class{Message} instance) is generated, based upon the current -state of the mailbox. Similarly, when a message is added to a \class{Mailbox} -instance, the provided message representation's contents are copied. In neither -case is a reference to the message representation kept by the \class{Mailbox} -instance. +noteworthy ways. Each time a message is requested, a new +representation (typically a \class{Message} instance) is generated +based upon the current state of the mailbox. Similarly, when a message +is added to a \class{Mailbox} instance, the provided message +representation's contents are copied. In neither case is a reference +to the message representation kept by the \class{Mailbox} instance. The default \class{Mailbox} iterator iterates over message representations, not keys as the default dictionary iterator does. Moreover, modification of a @@ -51,9 +58,18 @@ \exception{KeyError} exception if the corresponding message is subsequently removed. -\class{Mailbox} itself is intended to define an interface and to be inherited -from by format-specific subclasses but is not intended to be instantiated. -Instead, you should instantiate a subclass. +\begin{notice}[warning] +Be very cautious when modifying mailboxes that might be +simultaneously changed by some other process. The safest mailbox +format to use for such tasks is Maildir; try to avoid using +single-file formats such as mbox for concurrent writing. If you're +modifying a mailbox, you +\emph{must} lock it by calling the \method{lock()} and +\method{unlock()} methods \emph{before} reading any messages in the file +or making any changes by adding or deleting a message. Failing to +lock the mailbox runs the risk of losing messages or corrupting the entire +mailbox. +\end{notice} \class{Mailbox} instances have the following methods: @@ -202,15 +218,16 @@ \begin{methoddesc}{flush}{} Write any pending changes to the filesystem. For some \class{Mailbox} -subclasses, changes are always written immediately and this method does -nothing. +subclasses, changes are always written immediately and \method{flush()} does +nothing, but you should still make a habit of calling this method. \end{methoddesc} \begin{methoddesc}{lock}{} Acquire an exclusive advisory lock on the mailbox so that other processes know not to modify it. An \exception{ExternalClashError} is raised if the lock is not available. The particular locking mechanisms used depend upon the mailbox -format. +format. You should \emph{always} lock the mailbox before making any +modifications to its contents. \end{methoddesc} \begin{methoddesc}{unlock}{} @@ -1373,36 +1390,55 @@ \begin{verbatim} import mailbox destination = mailbox.MH('~/Mail') +destination.lock() for message in mailbox.Babyl('~/RMAIL'): destination.add(MHMessage(message)) +destination.flush() +destination.unlock() \end{verbatim} -An example of sorting mail from numerous mailing lists, being careful to avoid -mail corruption due to concurrent modification by other programs, mail loss due -to interruption of the program, or premature termination due to malformed -messages in the mailbox: +This example sorts mail from several mailing lists into different +mailboxes, being careful to avoid mail corruption due to concurrent +modification by other programs, mail loss due to interruption of the +program, or premature termination due to malformed messages in the +mailbox: \begin{verbatim} import mailbox import email.Errors + list_names = ('python-list', 'python-dev', 'python-bugs') + boxes = dict((name, mailbox.mbox('~/email/%s' % name)) for name in list_names) -inbox = mailbox.Maildir('~/Maildir', None) +inbox = mailbox.Maildir('~/Maildir', factory=None) + for key in inbox.iterkeys(): try: message = inbox[key] except email.Errors.MessageParseError: continue # The message is malformed. Just leave it. + for name in list_names: list_id = message['list-id'] if list_id and name in list_id: + # Get mailbox to use box = boxes[name] + + # Write copy to disk before removing original. + # If there's a crash, you might duplicate a message, but + # that's better than losing a message completely. box.lock() box.add(message) - box.flush() # Write copy to disk before removing original. + box.flush() box.unlock() + + # Remove original message + inbox.lock() inbox.discard(key) + inbox.flush() + inbox.unlock() break # Found destination, so stop looking. + for box in boxes.itervalues(): box.close() \end{verbatim} Modified: stackless/branches/release25-maint/Doc/lib/libmmap.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libmmap.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libmmap.tex Sat Apr 14 15:02:57 2007 @@ -140,8 +140,9 @@ \begin{methoddesc}{seek}{pos\optional{, whence}} Set the file's current position. \var{whence} argument is optional - and defaults to \code{0} (absolute file positioning); other values - are \code{1} (seek relative to the current position) and \code{2} + and defaults to \code{os.SEEK_SET} or \code{0} (absolute file + positioning); other values are \code{os.SEEK_CUR} or \code{1} (seek + relative to the current position) and \code{os.SEEK_END} or \code{2} (seek relative to the file's end). \end{methoddesc} Modified: stackless/branches/release25-maint/Doc/lib/libmsilib.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libmsilib.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libmsilib.tex Sat Apr 14 15:02:57 2007 @@ -344,8 +344,8 @@ \subsection{Features\label{features}} \begin{classdesc}{Feature}{database, id, title, desc, display\optional{, - level=1\optional{, parent\optional\{, directory\optional{, - attributes=0}}}} + level=1\optional{, parent\optional{, directory\optional{, + attributes=0}}}}} Add a new record to the \code{Feature} table, using the values \var{id}, \var{parent.id}, \var{title}, \var{desc}, \var{display}, Modified: stackless/branches/release25-maint/Doc/lib/libos.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libos.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libos.tex Sat Apr 14 15:02:57 2007 @@ -361,6 +361,10 @@ errors), \code{None} is returned. Availability: Macintosh, \UNIX, Windows. +The \module{subprocess} module provides more powerful facilities for +spawning new processes and retrieving their results; using that module +is preferable to using this function. + \versionchanged[This function worked unreliably under Windows in earlier versions of Python. This was due to the use of the \cfunction{_popen()} function from the libraries provided with @@ -375,8 +379,13 @@ Availability: Macintosh, \UNIX, Windows. \end{funcdesc} +There are a number of different \function{popen*()} functions that +provide slightly different ways to create subprocesses. Note that the +\module{subprocess} module is easier to use and more powerful; +consider using that module before writing code using the +lower-level \function{popen*()} functions. -For each of the following \function{popen()} variants, if \var{bufsize} is +For each of the \function{popen*()} variants, if \var{bufsize} is specified, it specifies the buffer size for the I/O pipes. \var{mode}, if provided, should be the string \code{'b'} or \code{'t'}; on Windows this is needed to determine whether the file @@ -1545,7 +1554,13 @@ \funcline{spawnve}{mode, path, args, env} \funcline{spawnvp}{mode, file, args} \funcline{spawnvpe}{mode, file, args, env} -Execute the program \var{path} in a new process. If \var{mode} is +Execute the program \var{path} in a new process. + +(Note that the \module{subprocess} module provides more powerful +facilities for spawning new processes and retrieving their results; +using that module is preferable to using these functions.) + +If \var{mode} is \constant{P_NOWAIT}, this function returns the process ID of the new process; if \var{mode} is \constant{P_WAIT}, returns the process's exit code if it exits normally, or \code{-\var{signal}}, where @@ -1682,6 +1697,10 @@ a non-native shell, consult your shell documentation. Availability: Macintosh, \UNIX, Windows. + +The \module{subprocess} module provides more powerful facilities for +spawning new processes and retrieving their results; using that module +is preferable to using this function. \end{funcdesc} \begin{funcdesc}{times}{} Modified: stackless/branches/release25-maint/Doc/lib/libpickle.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libpickle.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libpickle.tex Sat Apr 14 15:02:57 2007 @@ -519,7 +519,7 @@ version of the object. The next element of the tuple will provide arguments for this callable, and later elements provide additional state information that will subsequently be used to fully reconstruct -the pickled date. +the pickled data. In the unpickling environment this object must be either a class, a callable registered as a ``safe constructor'' (see below), or it must Modified: stackless/branches/release25-maint/Doc/lib/libpopen2.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libpopen2.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libpopen2.tex Sat Apr 14 15:02:57 2007 @@ -2,7 +2,6 @@ Subprocesses with accessible I/O streams} \declaremodule{standard}{popen2} - \platform{Unix, Windows} \modulesynopsis{Subprocesses with accessible standard I/O streams.} \sectionauthor{Drew Csillag}{drew_csillag at geocities.com} @@ -11,10 +10,10 @@ input/output/error pipes and obtain their return codes under \UNIX{} and Windows. -Note that starting with Python 2.0, this functionality is available -using functions from the \refmodule{os} module which have the same -names as the factory functions here, but the order of the return -values is more intuitive in the \refmodule{os} module variants. +The \module{subprocess} module provides more powerful facilities for +spawning new processes and retrieving their results. Using the +\module{subprocess} module is preferable to using the \module{popen2} +module. The primary interface offered by this module is a trio of factory functions. For each of these, if \var{bufsize} is specified, @@ -184,3 +183,7 @@ separate threads to read each of the individual files provided by whichever \function{popen*()} function or \class{Popen*} class was used. + +\begin{seealso} + \seemodule{subprocess}{Module for spawning and managing subprocesses.} +\end{seealso} Modified: stackless/branches/release25-maint/Doc/lib/libprofile.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libprofile.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libprofile.tex Sat Apr 14 15:02:57 2007 @@ -319,7 +319,7 @@ \begin{funcdesc}{run}{command\optional{, filename}} -This function takes a single argument that has can be passed to the +This function takes a single argument that can be passed to the \keyword{exec} statement, and an optional file name. In all cases this routine attempts to \keyword{exec} its first argument, and gather profiling statistics from the execution. If no file name is present, then this Modified: stackless/branches/release25-maint/Doc/lib/librandom.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/librandom.tex (original) +++ stackless/branches/release25-maint/Doc/lib/librandom.tex Sat Apr 14 15:02:57 2007 @@ -185,7 +185,7 @@ \begin{funcdesc}{betavariate}{alpha, beta} Beta distribution. Conditions on the parameters are - \code{\var{alpha} > -1} and \code{\var{beta} > -1}. + \code{\var{alpha} > 0} and \code{\var{beta} > 0}. Returned values range between 0 and 1. \end{funcdesc} Modified: stackless/branches/release25-maint/Doc/lib/libshutil.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libshutil.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libshutil.tex Sat Apr 14 15:02:57 2007 @@ -34,7 +34,9 @@ is the buffer size. In particular, a negative \var{length} value means to copy the data without looping over the source data in chunks; by default the data is read in chunks to avoid uncontrolled - memory consumption. + memory consumption. Note that if the current file position of the + \var{fsrc} object is not 0, only the contents from the current file + position to the end of the file will be copied. \end{funcdesc} \begin{funcdesc}{copymode}{src, dst} Modified: stackless/branches/release25-maint/Doc/lib/libsimplexmlrpc.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libsimplexmlrpc.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libsimplexmlrpc.tex Sat Apr 14 15:02:57 2007 @@ -15,7 +15,7 @@ \begin{classdesc}{SimpleXMLRPCServer}{addr\optional{, requestHandler\optional{, - logRequests\optional{allow_none\optional{, encoding}}}}} + logRequests\optional{, allow_none\optional{, encoding}}}}} Create a new server instance. This class provides methods for registration of functions that can be called by Modified: stackless/branches/release25-maint/Doc/lib/libsmtplib.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libsmtplib.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libsmtplib.tex Sat Apr 14 15:02:57 2007 @@ -173,7 +173,7 @@ The server didn't reply properly to the \samp{HELO} greeting. \item[\exception{SMTPAuthenticationError}] The server didn't accept the username/password combination. - \item[\exception{SMTPError}] + \item[\exception{SMTPException}] No suitable authentication method was found. \end{description} \end{methoddesc} Modified: stackless/branches/release25-maint/Doc/lib/libsocket.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libsocket.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libsocket.tex Sat Apr 14 15:02:57 2007 @@ -241,8 +241,8 @@ This operation assumes that there is a valid address-to-host mapping for the host, and the assumption does not always hold. Note: \function{gethostname()} doesn't always return the fully qualified -domain name; use \code{gethostbyaddr(gethostname())} -(see below). +domain name; use \code{getfqdn()} +(see above). \end{funcdesc} \begin{funcdesc}{gethostbyaddr}{ip_address} @@ -574,6 +574,28 @@ (The format of \var{address} depends on the address family --- see above.) \end{methoddesc} +\begin{methoddesc}[socket]{recvfrom_into}{buffer\optional{, nbytes\optional{, flags}}} +Receive data from the socket, writing it into \var{buffer} instead of +creating a new string. The return value is a pair +\code{(\var{nbytes}, \var{address})} where \var{nbytes} is the number +of bytes received and \var{address} is the address of the socket +sending the data. See the \UNIX{} manual page +\manpage{recv}{2} for the meaning of the optional argument +\var{flags}; it defaults to zero. (The format of \var{address} +depends on the address family --- see above.) +\versionadded{2.5} +\end{methoddesc} + +\begin{methoddesc}[socket]{recv_into}{buffer\optional{, nbytes\optional{, flags}}} +Receive up to \var{nbytes} bytes from the socket, +storing the data into a buffer rather than creating a new string. +If \var{nbytes} is not specified (or 0), +receive up to the size available in the given buffer. +See the \UNIX{} manual page \manpage{recv}{2} for the meaning of the +optional argument \var{flags}; it defaults to zero. +\versionadded{2.5} +\end{methoddesc} + \begin{methoddesc}[socket]{send}{string\optional{, flags}} Send data to the socket. The socket must be connected to a remote socket. The optional \var{flags} argument has the same meaning as for @@ -712,14 +734,15 @@ \end{methoddesc} \begin{methoddesc}{server}{} -Returns a string containing the ASN.1 distinguished name identifying the -server's certificate. (See below for an example -showing what distinguished names look like.) +Returns a string describing the server's certificate. +Useful for debugging purposes; do not parse the content of this string +because its format can't be parsed unambiguously. \end{methoddesc} \begin{methoddesc}{issuer}{} -Returns a string containing the ASN.1 distinguished name identifying the -issuer of the server's certificate. +Returns a string describing the issuer of the server's certificate. +Useful for debugging purposes; do not parse the content of this string +because its format can't be parsed unambiguously. \end{methoddesc} \subsection{Example \label{socket-example}} Modified: stackless/branches/release25-maint/Doc/lib/libsqlite3.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libsqlite3.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libsqlite3.tex Sat Apr 14 15:02:57 2007 @@ -187,12 +187,12 @@ \end{funcdesc} \begin{funcdesc}{complete_statement}{sql} -Returns \constant{True} if the string \var{sql} one or more complete SQL -statements terminated by semicolons. It does not verify if the SQL is -syntactically correct, only if there are no unclosed string literals and if the +Returns \constant{True} if the string \var{sql} contains one or more complete SQL +statements terminated by semicolons. It does not verify that the SQL is +syntactically correct, only that there are no unclosed string literals and the statement is terminated by a semicolon. -This can be used to build a shell for SQLite, like in the following example: +This can be used to build a shell for SQLite, as in the following example: \verbatiminput{sqlite3/complete_statement.py} \end{funcdesc} Modified: stackless/branches/release25-maint/Doc/lib/libstdtypes.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libstdtypes.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libstdtypes.tex Sat Apr 14 15:02:57 2007 @@ -834,7 +834,7 @@ start\optional{, end}}} Return \code{True} if string starts with the \var{prefix}, otherwise return \code{False}. \var{prefix} can also be a tuple of -suffixes to look for. With optional \var{start}, test string beginning at +prefixes to look for. With optional \var{start}, test string beginning at that position. With optional \var{end}, stop comparing string at that position. @@ -876,6 +876,9 @@ characters have been mapped through the given translation table, which must be a string of length 256. +You can use the \function{maketrans()} helper function in the +\refmodule{string} module to create a translation table. + For Unicode objects, the \method{translate()} method does not accept the optional \var{deletechars} argument. Instead, it returns a copy of the \var{s} where all characters have been mapped @@ -1221,7 +1224,7 @@ \label{types-set}} \obindex{set} -A \dfn{set} object is an unordered collection of immutable values. +A \dfn{set} object is an unordered collection of distinct hashable objects. Common uses include membership testing, removing duplicates from a sequence, and computing mathematical operations such as intersection, union, difference, and symmetric difference. @@ -1424,7 +1427,8 @@ {(3)} \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(3)} \lineiii{\var{a}.update(\optional{\var{b}})} - {updates (and overwrites) key/value pairs from \var{b}} + {updates \var{a} with key/value pairs from \var{b}, overwriting + existing keys, returns \code{None}} {(9)} \lineiii{\var{a}.fromkeys(\var{seq}\optional{, \var{value}})} {Creates a new dictionary with keys from \var{seq} and values set to \var{value}} @@ -1674,9 +1678,12 @@ \begin{methoddesc}[file]{seek}{offset\optional{, whence}} Set the file's current position, like \code{stdio}'s \cfunction{fseek()}. - The \var{whence} argument is optional and defaults to \code{0} - (absolute file positioning); other values are \code{1} (seek - relative to the current position) and \code{2} (seek relative to the + The \var{whence} argument is optional and defaults to + \code{os.SEEK_SET} or \code{0} + (absolute file positioning); other values are \code{os.SEEK_CUR} or \code{1} + (seek + relative to the current position) and \code{os.SEEK_END} or \code{2} + (seek relative to the file's end). There is no return value. Note that if the file is opened for appending (mode \code{'a'} or \code{'a+'}), any \method{seek()} operations will be undone at the next write. If the Modified: stackless/branches/release25-maint/Doc/lib/libstring.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libstring.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libstring.tex Sat Apr 14 15:02:57 2007 @@ -220,7 +220,7 @@ \begin{funcdesc}{maketrans}{from, to} Return a translation table suitable for passing to - \function{translate()} or \function{regex.compile()}, that will map + \function{translate()}, that will map each character in \var{from} into the character at the same position in \var{to}; \var{from} and \var{to} must have the same length. Modified: stackless/branches/release25-maint/Doc/lib/libstruct.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libstruct.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libstruct.tex Sat Apr 14 15:02:57 2007 @@ -29,6 +29,15 @@ exactly. \end{funcdesc} +\begin{funcdesc}{pack_into}{fmt, buffer, offset, v1, v2, \moreargs} + Pack the values \code{\var{v1}, \var{v2}, \textrm{\ldots}} according to the given + format, write the packed bytes into the writable \var{buffer} starting at + \var{offset}. + Note that the offset is not an optional argument. + + \versionadded{2.5} +\end{funcdesc} + \begin{funcdesc}{unpack}{fmt, string} Unpack the string (presumably packed by \code{pack(\var{fmt}, \textrm{\ldots})}) according to the given format. The result is a @@ -37,6 +46,16 @@ (\code{len(\var{string})} must equal \code{calcsize(\var{fmt})}). \end{funcdesc} +\begin{funcdesc}{unpack_from}{fmt, buffer\optional{,offset \code{= 0}}} + Unpack the \var{buffer} according to tthe given format. + The result is a tuple even if it contains exactly one item. The + \var{buffer} must contain at least the amount of data required by the + format (\code{len(buffer[offset:])} must be at least + \code{calcsize(\var{fmt})}). + + \versionadded{2.5} +\end{funcdesc} + \begin{funcdesc}{calcsize}{fmt} Return the size of the struct (and hence of the string) corresponding to the given format. @@ -195,3 +214,43 @@ \seemodule{array}{Packed binary storage of homogeneous data.} \seemodule{xdrlib}{Packing and unpacking of XDR data.} \end{seealso} + +\subsection{Struct Objects \label{struct-objects}} + +The \module{struct} module also defines the following type: + +\begin{classdesc}{Struct}{format} + Return a new Struct object which writes and reads binary data according to + the format string \var{format}. Creating a Struct object once and calling + its methods is more efficient than calling the \module{struct} functions + with the same format since the format string only needs to be compiled once. + + \versionadded{2.5} +\end{classdesc} + +Compiled Struct objects support the following methods and attributes: + +\begin{methoddesc}[Struct]{pack}{v1, v2, \moreargs} + Identical to the \function{pack()} function, using the compiled format. + (\code{len(result)} will equal \member{self.size}.) +\end{methoddesc} + +\begin{methoddesc}[Struct]{pack_into}{buffer, offset, v1, v2, \moreargs} + Identical to the \function{pack_into()} function, using the compiled format. +\end{methoddesc} + +\begin{methoddesc}[Struct]{unpack}{string} + Identical to the \function{unpack()} function, using the compiled format. + (\code{len(string)} must equal \member{self.size}). +\end{methoddesc} + +\begin{methoddesc}[Struct]{unpack_from}{buffer\optional{,offset + \code{= 0}}} + Identical to the \function{unpack_from()} function, using the compiled format. + (\code{len(buffer[offset:])} must be at least \member{self.size}). +\end{methoddesc} + +\begin{memberdesc}[Struct]{format} + The format string used to construct this Struct object. +\end{memberdesc} + Modified: stackless/branches/release25-maint/Doc/lib/libsubprocess.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libsubprocess.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libsubprocess.tex Sat Apr 14 15:02:57 2007 @@ -12,9 +12,6 @@ codes. This module intends to replace several other, older modules and functions, such as: -% XXX Should add pointers to this module to at least the popen2 -% and commands sections. - \begin{verbatim} os.system os.spawn* Modified: stackless/branches/release25-maint/Doc/lib/libtarfile.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libtarfile.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libtarfile.tex Sat Apr 14 15:02:57 2007 @@ -48,8 +48,8 @@ avoid this. If a compression method is not supported, \exception{CompressionError} is raised. - If \var{fileobj} is specified, it is used as an alternative to - a file object opened for \var{name}. + If \var{fileobj} is specified, it is used as an alternative to a file + object opened for \var{name}. It is supposed to be at position 0. For special purposes, there is a second format for \var{mode}: \code{'filemode|[compression]'}. \function{open()} will return a @@ -155,6 +155,7 @@ If \var{fileobj} is given, it is used for reading or writing data. If it can be determined, \var{mode} is overridden by \var{fileobj}'s mode. + \var{fileobj} will be used from position 0. \begin{notice} \var{fileobj} is not closed, when \class{TarFile} is closed. \end{notice} Modified: stackless/branches/release25-maint/Doc/lib/libtempfile.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libtempfile.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libtempfile.tex Sat Apr 14 15:02:57 2007 @@ -86,7 +86,12 @@ prefix; otherwise, a default prefix is used. If \var{dir} is specified, the file will be created in that directory; -otherwise, a default directory is used. +otherwise, a default directory is used. The default directory is chosen +from a platform-dependent list, but the user of the application can control +the directory location by setting the \var{TMPDIR}, \var{TEMP} or \var{TMP} +environment variables. There is thus no guarantee that the generated +filename will have any nice properties, such as not requiring quoting when +passed to external commands via \code{os.popen()}. If \var{text} is specified, it indicates whether to open the file in binary mode (the default) or text mode. On some platforms, this makes Modified: stackless/branches/release25-maint/Doc/lib/libthreading.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libthreading.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libthreading.tex Sat Apr 14 15:02:57 2007 @@ -15,10 +15,9 @@ This module defines the following functions and objects: \begin{funcdesc}{activeCount}{} -Return the number of currently active \class{Thread} objects. -The returned count is equal to the length of the list returned by +Return the number of \class{Thread} objects currently alive. The +returned count is equal to the length of the list returned by \function{enumerate()}. -A function that returns the number of currently active threads. \end{funcdesc} \begin{funcdesc}{Condition}{} @@ -36,10 +35,10 @@ \end{funcdesc} \begin{funcdesc}{enumerate}{} -Return a list of all currently active \class{Thread} objects. -The list includes daemonic threads, dummy thread objects created -by \function{currentThread()}, and the main thread. It excludes terminated -threads and threads that have not yet been started. +Return a list of all \class{Thread} objects currently alive. The list +includes daemonic threads, dummy thread objects created by +\function{currentThread()}, and the main thread. It excludes +terminated threads and threads that have not yet been started. \end{funcdesc} \begin{funcdesc}{Event}{} @@ -526,12 +525,9 @@ \method{run()} method in a separate thread of control. Once the thread's activity is started, the thread is considered -'alive' and 'active' (these concepts are almost, but not quite -exactly, the same; their definition is intentionally somewhat -vague). It stops being alive and active when its \method{run()} -method terminates -- either normally, or by raising an unhandled -exception. The \method{isAlive()} method tests whether the thread is -alive. +'alive'. It stops being alive when its \method{run()} method terminates +-- either normally, or by raising an unhandled exception. The +\method{isAlive()} method tests whether the thread is alive. Other threads can call a thread's \method{join()} method. This blocks the calling thread until the thread whose \method{join()} method is @@ -551,14 +547,13 @@ initial thread of control in the Python program. It is not a daemon thread. -There is the possibility that ``dummy thread objects'' are -created. These are thread objects corresponding to ``alien -threads''. These are threads of control started outside the -threading module, such as directly from C code. Dummy thread objects -have limited functionality; they are always considered alive, -active, and daemonic, and cannot be \method{join()}ed. They are never -deleted, since it is impossible to detect the termination of alien -threads. +There is the possibility that ``dummy thread objects'' are created. +These are thread objects corresponding to ``alien threads'', which +are threads of control started outside the threading module, such as +directly from C code. Dummy thread objects have limited +functionality; they are always considered alive and daemonic, and +cannot be \method{join()}ed. They are never deleted, since it is +impossible to detect the termination of alien threads. \begin{classdesc}{Thread}{group=None, target=None, name=None, @@ -646,7 +641,8 @@ Return whether the thread is alive. Roughly, a thread is alive from the moment the \method{start()} method -returns until its \method{run()} method terminates. +returns until its \method{run()} method terminates. The module +function \function{enumerate()} returns a list of all alive threads. \end{methoddesc} \begin{methoddesc}{isDaemon}{} @@ -659,8 +655,8 @@ The initial value is inherited from the creating thread. -The entire Python program exits when no active non-daemon -threads are left. +The entire Python program exits when no alive non-daemon threads are +left. \end{methoddesc} Modified: stackless/branches/release25-maint/Doc/lib/libtimeit.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libtimeit.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libtimeit.tex Sat Apr 14 15:02:57 2007 @@ -102,7 +102,7 @@ When called as a program from the command line, the following form is used: \begin{verbatim} -python timeit.py [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...] +python -m timeit [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...] \end{verbatim} where the following options are understood: Modified: stackless/branches/release25-maint/Doc/lib/libunittest.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libunittest.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libunittest.tex Sat Apr 14 15:02:57 2007 @@ -540,7 +540,7 @@ \begin{funcdesc}{main}{\optional{module\optional{, defaultTest\optional{, argv\optional{, - testRunner\optional{, testRunner}}}}}} + testRunner\optional{, testLoader}}}}}} A command-line program that runs a set of tests; this is primarily for making test modules conveniently executable. The simplest use for this function is to include the following line at the end of a Modified: stackless/branches/release25-maint/Doc/lib/liburlparse.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/liburlparse.tex (original) +++ stackless/branches/release25-maint/Doc/lib/liburlparse.tex Sat Apr 14 15:02:57 2007 @@ -89,7 +89,7 @@ \begin{funcdesc}{urlunparse}{parts} Construct a URL from a tuple as returned by \code{urlparse()}. -The \var{parts} argument be any six-item iterable. +The \var{parts} argument can be any six-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent). @@ -133,7 +133,7 @@ \begin{funcdesc}{urlunsplit}{parts} Combine the elements of a tuple as returned by \function{urlsplit()} into a complete URL as a string. -The \var{parts} argument be any five-item iterable. +The \var{parts} argument can be any five-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent). @@ -168,7 +168,7 @@ If you do not want that behavior, preprocess the \var{url} with \function{urlsplit()} and \function{urlunsplit()}, -removing possible \em{scheme} and \em{netloc} parts. +removing possible \emph{scheme} and \emph{netloc} parts. \end{funcdesc} \begin{funcdesc}{urldefrag}{url} Modified: stackless/branches/release25-maint/Doc/lib/libwsgiref.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/libwsgiref.tex (original) +++ stackless/branches/release25-maint/Doc/lib/libwsgiref.tex Sat Apr 14 15:02:57 2007 @@ -26,8 +26,9 @@ WSGI specification (\pep{333}). % XXX If you're just trying to write a web application... -% XXX should create a URL on python.org to point people to. +See \url{http://www.wsgi.org} for more information about WSGI, +and links to tutorials and other resources. Modified: stackless/branches/release25-maint/Doc/lib/tkinter.tex ============================================================================== --- stackless/branches/release25-maint/Doc/lib/tkinter.tex (original) +++ stackless/branches/release25-maint/Doc/lib/tkinter.tex Sat Apr 14 15:02:57 2007 @@ -318,7 +318,7 @@ \item[\var{options}] configure the widget's appearance and in some cases, its behavior. The options come in the form of a list of flags and values. -Flags are proceeded by a `-', like \UNIX{} shell command flags, and +Flags are preceded by a `-', like \UNIX{} shell command flags, and values are put in quotes if they are more than one word. \end{description} Modified: stackless/branches/release25-maint/Doc/mac/toolbox.tex ============================================================================== --- stackless/branches/release25-maint/Doc/mac/toolbox.tex (original) +++ stackless/branches/release25-maint/Doc/mac/toolbox.tex Sat Apr 14 15:02:57 2007 @@ -65,7 +65,7 @@ \modulesynopsis{Interface to the Component Manager.} \section{\module{Carbon.CarbonEvt} --- Carbon Event Manager} -\declaremodule{standard}{Carbon.CaronEvt} +\declaremodule{standard}{Carbon.CarbonEvt} \platform{Mac} \modulesynopsis{Interface to the Carbon Event Manager.} Modified: stackless/branches/release25-maint/Doc/ref/ref1.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ref/ref1.tex (original) +++ stackless/branches/release25-maint/Doc/ref/ref1.tex Sat Apr 14 15:02:57 2007 @@ -93,7 +93,7 @@ \index{syntax} \index{notation} -\begin{productionlist} +\begin{productionlist}[*] \production{name}{\token{lc_letter} (\token{lc_letter} | "_")*} \production{lc_letter}{"a"..."z"} \end{productionlist} Modified: stackless/branches/release25-maint/Doc/ref/ref3.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ref/ref3.tex (original) +++ stackless/branches/release25-maint/Doc/ref/ref3.tex Sat Apr 14 15:02:57 2007 @@ -1282,10 +1282,14 @@ \code{\var{x}.__ne__(\var{y})}, \code{\var{x}>\var{y}} calls \code{\var{x}.__gt__(\var{y})}, and \code{\var{x}>=\var{y}} calls \code{\var{x}.__ge__(\var{y})}. -These methods can return any value, but if the comparison operator is -used in a Boolean context, the return value should be interpretable as -a Boolean value, else a \exception{TypeError} will be raised. -By convention, \code{False} is used for false and \code{True} for true. + +A rich comparison method may return the singleton \code{NotImplemented} if it +does not implement the operation for a given pair of arguments. +By convention, \code{False} and \code{True} are returned for a successful +comparison. However, these methods can return any value, so if the +comparison operator is used in a Boolean context (e.g., in the condition +of an \code{if} statement), Python will call \function{bool()} on the +value to determine if the result is true or false. There are no implied relationships among the comparison operators. The truth of \code{\var{x}==\var{y}} does not imply that \code{\var{x}!=\var{y}} @@ -1299,9 +1303,7 @@ \method{__ge__()} are each other's reflection, and \method{__eq__()} and \method{__ne__()} are their own reflection. -Arguments to rich comparison methods are never coerced. A rich -comparison method may return \code{NotImplemented} if it does not -implement the operation for a given pair of arguments. +Arguments to rich comparison methods are never coerced. \end{methoddesc} \begin{methoddesc}[object]{__cmp__}{self, other} @@ -1999,8 +2001,8 @@ \methodline[numeric object]{__ixor__}{self, other} \methodline[numeric object]{__ior__}{self, other} These methods are called to implement the augmented arithmetic -operations (\code{+=}, \code{-=}, \code{*=}, \code{/=}, \code{\%=}, -\code{**=}, \code{<<=}, \code{>>=}, \code{\&=}, +operations (\code{+=}, \code{-=}, \code{*=}, \code{/=}, \code{//=}, +\code{\%=}, \code{**=}, \code{<<=}, \code{>>=}, \code{\&=}, \code{\textasciicircum=}, \code{|=}). These methods should attempt to do the operation in-place (modifying \var{self}) and return the result (which could be, but does not have to be, \var{self}). If a specific method Modified: stackless/branches/release25-maint/Doc/ref/ref5.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ref/ref5.tex (original) +++ stackless/branches/release25-maint/Doc/ref/ref5.tex Sat Apr 14 15:02:57 2007 @@ -56,7 +56,7 @@ \production{enclosure} {\token{parenth_form} | \token{list_display}} \productioncont{| \token{generator_expression} | \token{dict_display}} - \productioncont{| \token{string_conversion}} + \productioncont{| \token{string_conversion} | \token{yield_atom}} \end{productionlist} @@ -65,6 +65,7 @@ \index{identifier} An identifier occurring as an atom is a name. See +section \ref{identifiers} for lexical definition and section~\ref{naming} for documentation of naming and binding. When the name is bound to an object, evaluation of the atom yields @@ -154,22 +155,20 @@ square brackets: \begin{productionlist} - \production{test} - {\token{or_test} | \token{lambda_form}} - \production{testlist} - {\token{test} ( "," \token{test} )* [ "," ]} \production{list_display} - {"[" [\token{listmaker}] "]"} - \production{listmaker} - {\token{expression} ( \token{list_for} - | ( "," \token{expression} )* [","] )} - \production{list_iter} - {\token{list_for} | \token{list_if}} + {"[" [\token{expression_list} | \token{list_comprehension}] "]"} + \production{list_comprehension} + {\token{expression} \token{list_for}} \production{list_for} - {"for" \token{expression_list} "in" \token{testlist} + {"for" \token{target_list} "in" \token{old_expression_list} [\token{list_iter}]} + \production{old_expression_list} + {\token{old_expression} + [("," \token{old_expression})+ [","]]} + \production{list_iter} + {\token{list_for} | \token{list_if}} \production{list_if} - {"if" \token{test} [\token{list_iter}]} + {"if" \token{old_expression} [\token{list_iter}]} \end{productionlist} A list display yields a new list object. Its contents are specified @@ -200,19 +199,18 @@ \begin{productionlist} \production{generator_expression} - {"(" \token{test} \token{genexpr_for} ")"} + {"(" \token{expression} \token{genexpr_for} ")"} \production{genexpr_for} - {"for" \token{expression_list} "in" \token{test} + {"for" \token{target_list} "in" \token{or_test} [\token{genexpr_iter}]} \production{genexpr_iter} {\token{genexpr_for} | \token{genexpr_if}} \production{genexpr_if} - {"if" \token{test} [\token{genexpr_iter}]} + {"if" \token{old_expression} [\token{genexpr_iter}]} \end{productionlist} A generator expression yields a new generator object. \obindex{generator} -\obindex{generator expression} It consists of a single expression followed by at least one \keyword{for} clause and zero or more \keyword{for} or \keyword{if} clauses. The iterating values of the new generator are those that @@ -311,6 +309,142 @@ \bifuncindex{str} +\subsection{Yield expressions\label{yieldexpr}} +\kwindex{yield} +\indexii{yield}{expression} +\indexii{generator}{function} + +\begin{productionlist} + \production{yield_atom} + {"(" \token{yield_expression} ")"} + \production{yield_expression} + {"yield" [\token{expression_list}]} +\end{productionlist} + +\versionadded{2.5} + +The \keyword{yield} expression is only used when defining a generator +function, and can only be used in the body of a function definition. +Using a \keyword{yield} expression in a function definition is +sufficient to cause that definition to create a generator function +instead of a normal function. + +When a generator function is called, it returns an iterator known as a +generator. That generator then controls the execution of a generator +function. The execution starts when one of the generator's methods is +called. At that time, the execution proceeds to the first +\keyword{yield} expression, where it is suspended again, returning the +value of \grammartoken{expression_list} to generator's caller. By +suspended we mean that all local state is retained, including the +current bindings of local variables, the instruction pointer, and the +internal evaluation stack. When the execution is resumed by calling +one of the generator's methods, the function can proceed exactly as +if the \keyword{yield} expression was just another external call. +The value of the \keyword{yield} expression after resuming depends on +the method which resumed the execution. + +\index{coroutine} + +All of this makes generator functions quite similar to coroutines; they +yield multiple times, they have more than one entry point and their +execution can be suspended. The only difference is that a generator +function cannot control where should the execution continue after it +yields; the control is always transfered to the generator's caller. + +\obindex{generator} + +The following generator's methods can be used to control the execution +of a generator function: + +\exindex{StopIteration} + +\begin{methoddesc}[generator]{next}{} + Starts the execution of a generator function or resumes it at the + last executed \keyword{yield} expression. When a generator function + is resumed with a \method{next()} method, the current \keyword{yield} + expression always evaluates to \constant{None}. The execution then + continues to the next \keyword{yield} expression, where the generator + is suspended again, and the value of the + \grammartoken{expression_list} is returned to \method{next()}'s + caller. If the generator exits without yielding another value, a + \exception{StopIteration} exception is raised. +\end{methoddesc} + +\begin{methoddesc}[generator]{send}{value} + Resumes the execution and ``sends'' a value into the generator + function. The \code{value} argument becomes the result of the + current \keyword{yield} expression. The \method{send()} method + returns the next value yielded by the generator, or raises + \exception{StopIteration} if the generator exits without yielding + another value. + When \method{send()} is called to start the generator, it must be + called with \constant{None} as the argument, because there is no + \keyword{yield} expression that could receieve the value. +\end{methoddesc} + +\begin{methoddesc}[generator]{throw} + {type\optional{, value\optional{, traceback}}} + Raises an exception of type \code{type} at the point where generator + was paused, and returns the next value yielded by the generator + function. If the generator exits without yielding another value, a + \exception{StopIteration} exception is raised. If the generator + function does not catch the passed-in exception, or raises a + different exception, then that exception propagates to the caller. +\end{methoddesc} + +\exindex{GeneratorExit} + +\begin{methoddesc}[generator]{close}{} + Raises a \exception{GeneratorExit} at the point where the generator + function was paused. If the generator function then raises + \exception{StopIteration} (by exiting normally, or due to already + being closed) or \exception{GeneratorExit} (by not catching the + exception), close returns to its caller. If the generator yields a + value, a \exception{RuntimeError} is raised. If the generator raises + any other exception, it is propagated to the caller. \method{close} + does nothing if the generator has already exited due to an exception + or normal exit. +\end{methoddesc} + +Here is a simple example that demonstrates the behavior of generators +and generator functions: + +\begin{verbatim} +>>> def echo(value=None): +... print "Execution starts when 'next()' is called for the first time." +... try: +... while True: +... try: +... value = (yield value) +... except GeneratorExit: +... # never catch GeneratorExit +... raise +... except Exception, e: +... value = e +... finally: +... print "Don't forget to clean up when 'close()' is called." +... +>>> generator = echo(1) +>>> print generator.next() +Execution starts when 'next()' is called for the first time. +1 +>>> print generator.next() +None +>>> print generator.send(2) +2 +>>> generator.throw(TypeError, "spam") +TypeError('spam',) +>>> generator.close() +Don't forget to clean up when 'close()' is called. +\end{verbatim} + +\begin{seealso} + \seepep{0342}{Coroutines via Enhanced Generators} + {The proposal to enhance the API and syntax of generators, + making them usable as simple coroutines.} +\end{seealso} + + \section{Primaries\label{primaries}} \index{primary} @@ -474,9 +608,8 @@ \begin{productionlist} \production{call} - {\token{primary} "(" [\token{argument_list} [","]] ")"} - {\token{primary} "(" [\token{argument_list} [","] | - \token{test} \token{genexpr_for} ] ")"} + {\token{primary} "(" [\token{argument_list} [","]} + \productioncont{ | \token{expression} \token{genexpr_for}] ")"} \production{argument_list} {\token{positional_arguments} ["," \token{keyword_arguments}]} \productioncont{ ["," "*" \token{expression}]} @@ -809,10 +942,9 @@ operations: \begin{productionlist} - % The empty groups below prevent conversion to guillemets. \production{shift_expr} {\token{a_expr} - | \token{shift_expr} ( "<{}<" | ">{}>" ) \token{a_expr}} + | \token{shift_expr} ( "<<" | ">>" ) \token{a_expr}} \end{productionlist} These operators accept plain or long integers as arguments. The @@ -1015,14 +1147,18 @@ \section{Boolean operations\label{Booleans}} +\indexii{Conditional}{expression} \indexii{Boolean}{operation} Boolean operations have the lowest priority of all Python operations: \begin{productionlist} \production{expression} - {\token{or_test} [\token{if} \token{or_test} \token{else} - \token{test}] | \token{lambda_form}} + {\token{conditional_expression} | \token{lambda_form}} + \production{old_expression} + {\token{or_test} | \token{old_lambda_form}} + \production{conditional_expression} + {\token{or_test} ["if" \token{or_test} "else" \token{expression}]} \production{or_test} {\token{and_test} | \token{or_test} "or" \token{and_test}} \production{and_test} @@ -1074,6 +1210,8 @@ \begin{productionlist} \production{lambda_form} {"lambda" [\token{parameter_list}]: \token{expression}} + \production{old_lambda_form} + {"lambda" [\token{parameter_list}]: \token{old_expression}} \end{productionlist} Lambda forms (lambda expressions) have the same syntactic position as Modified: stackless/branches/release25-maint/Doc/ref/ref6.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ref/ref6.tex (original) +++ stackless/branches/release25-maint/Doc/ref/ref6.tex Sat Apr 14 15:02:57 2007 @@ -108,7 +108,8 @@ \begin{productionlist} \production{assignment_stmt} - {(\token{target_list} "=")+ \token{expression_list}} + {(\token{target_list} "=")+ + (\token{expression_list} | \token{yield_expression})} \production{target_list} {\token{target} ("," \token{target})* [","]} \production{target} @@ -273,11 +274,11 @@ \begin{productionlist} \production{augmented_assignment_stmt} - {\token{target} \token{augop} \token{expression_list}} + {\token{target} \token{augop} + (\token{expression_list} | \token{yield_expression})} \production{augop} {"+=" | "-=" | "*=" | "/=" | "\%=" | "**="} - % The empty groups below prevent conversion to guillemets. - \productioncont{| ">{}>=" | "<{}<=" | "\&=" | "\textasciicircum=" | "|="} + \productioncont{| ">>=" | "<<=" | "\&=" | "\textasciicircum=" | "|="} \end{productionlist} (See section~\ref{primaries} for the syntax definitions for the last @@ -376,9 +377,9 @@ \begin{productionlist} \production{print_stmt} - {"print" ( \optional{\token{expression} ("," \token{expression})* \optional{","}}} + {"print" ([\token{expression} ("," \token{expression})* [","]} \productioncont{| ">>" \token{expression} - \optional{("," \token{expression})+ \optional{","}} )} + [("," \token{expression})+ [","])} \end{productionlist} \keyword{print} evaluates each expression in turn and writes the @@ -460,7 +461,7 @@ \begin{productionlist} \production{yield_stmt} - {"yield" \token{expression_list}} + {\token{yield_expression}} \end{productionlist} \index{generator!function} @@ -630,15 +631,19 @@ \production{import_stmt} {"import" \token{module} ["as" \token{name}] ( "," \token{module} ["as" \token{name}] )*} - \productioncont{| "from" \token{module} "import" \token{identifier} + \productioncont{| "from" \token{relative_module} "import" \token{identifier} ["as" \token{name}]} \productioncont{ ( "," \token{identifier} ["as" \token{name}] )*} - \productioncont{| "from" \token{module} "import" "(" \token{identifier} - ["as" \token{name}]} + \productioncont{| "from" \token{relative_module} "import" "(" + \token{identifier} ["as" \token{name}]} \productioncont{ ( "," \token{identifier} ["as" \token{name}] )* [","] ")"} \productioncont{| "from" \token{module} "import" "*"} \production{module} {(\token{identifier} ".")* \token{identifier}} + \production{relative_module} + {"."* \token{module} | "."+} + \production{name} + {\token{identifier}} \end{productionlist} Import statements are executed in two steps: (1) find a module, and @@ -757,8 +762,10 @@ \begin{productionlist}[*] \production{future_statement} - {"from" "__future__" "import" feature ["as" name] ("," feature ["as" name])*} - \productioncont{| "from" "__future__" "import" "(" feature ["as" name] ("," feature ["as" name])* [","] ")"} + {"from" "__future__" "import" feature ["as" name]} + \productioncont{ ("," feature ["as" name])*} + \productioncont{| "from" "__future__" "import" "(" feature ["as" name]} + \productioncont{ ("," feature ["as" name])* [","] ")"} \production{feature}{identifier} \production{name}{identifier} \end{productionlist} @@ -775,9 +782,10 @@ \end{itemize} -The features recognized by Python 2.3 are \samp{generators}, -\samp{division} and \samp{nested_scopes}. \samp{generators} and -\samp{nested_scopes} are redundant in 2.3 because they are always +The features recognized by Python 2.5 are \samp{absolute_import}, +\samp{division}, \samp{generators}, \samp{nested_scopes} and +\samp{with_statement}. \samp{generators} and \samp{nested_scopes} +are redundant in Python version 2.3 and above because they are always enabled. A future statement is recognized and treated specially at compile @@ -872,7 +880,7 @@ \begin{productionlist} \production{exec_stmt} - {"exec" \token{expression} + {"exec" \token{or_expr} ["in" \token{expression} ["," \token{expression}]]} \end{productionlist} @@ -916,3 +924,5 @@ + + Modified: stackless/branches/release25-maint/Doc/ref/ref7.tex ============================================================================== --- stackless/branches/release25-maint/Doc/ref/ref7.tex (original) +++ stackless/branches/release25-maint/Doc/ref/ref7.tex Sat Apr 14 15:02:57 2007 @@ -319,7 +319,7 @@ \begin{productionlist} \production{with_stmt} - {"with" \token{expression} ["as" target] ":" \token{suite}} + {"with" \token{expression} ["as" \token{target}] ":" \token{suite}} \end{productionlist} The execution of the \keyword{with} statement proceeds as follows: Modified: stackless/branches/release25-maint/Doc/tools/py2texi.el ============================================================================== --- stackless/branches/release25-maint/Doc/tools/py2texi.el (original) +++ stackless/branches/release25-maint/Doc/tools/py2texi.el Sat Apr 14 15:02:57 2007 @@ -1,5 +1,6 @@ ;;; py2texi.el -- Conversion of Python LaTeX documentation to Texinfo +;; Copyright (C) 2006 Jeroen Dekkers ;; Copyright (C) 1998, 1999, 2001, 2002 Milan Zamazal ;; Author: Milan Zamazal @@ -168,6 +169,7 @@ "@end table\n") ("productionlist" 0 "\n at table @code\n" "@end table\n") ("quotation" 0 "@quotation" "@end quotation") + ("quote" 0 "@quotation" "@end quotation") ("seealso" 0 "See also:\n at table @emph\n" "@end table\n") ("seealso*" 0 "@table @emph\n" "@end table\n") ("sloppypar" 0 "" "") @@ -246,11 +248,12 @@ ("env" 1 "@code{\\1}") ("EOF" 0 "@code{EOF}") ("email" 1 "@email{\\1}") + ("em" 1 "@emph{\\1}") ("emph" 1 "@emph{\\1}") ("envvar" 1 "@env{\\1}") ("exception" 1 "@code{\\1}") ("exindex" 1 (progn (setq obindex t) "@obindex{\\1}")) - ("fi" 0 (concat "@end " last-if)) + ("fi" 0 (if (equal last-if "ifx") "" (concat "@end " last-if))) ("file" 1 "@file{\\1}") ("filenq" 1 "@file{\\1}") ("filevar" 1 "@file{@var{\\1}}") @@ -262,6 +265,7 @@ ("grammartoken" 1 "@code{\\1}") ("guilabel" 1 "@strong{\\1}") ("hline" 0 "") + ("ifx" 0 (progn (setq last-if "ifx") "")) ("ifhtml" 0 (concat "@" (setq last-if "ifinfo"))) ("iftexi" 0 (concat "@" (setq last-if "ifinfo"))) ("index" 1 (progn (setq cindex t) "@cindex{\\1}")) @@ -284,6 +288,7 @@ ("lineiii" 3 "@item \\1 @tab \\2 @tab \\3") ("lineiv" 4 "@item \\1 @tab \\2 @tab \\3 @tab \\4") ("linev" 5 "@item \\1 @tab \\2 @tab \\3 @tab \\4 @tab \\5") + ("locallinewidth" 0 "") ("localmoduletable" 0 "") ("longprogramopt" 1 "@option{--\\1}") ("macro" 1 "@code{@backslash{}\\1}") @@ -307,6 +312,7 @@ ("moreargs" 0 "@dots{}") ("n" 0 "@backslash{}n") ("newcommand" 2 "") + ("newlength" 1 "") ("newsgroup" 1 "@samp{\\1}") ("nodename" 1 (save-excursion @@ -322,6 +328,7 @@ ("opindex" 1 (progn (setq cindex t) "@cindex{\\1}")) ("option" 1 "@option{\\1}") ("optional" 1 "[\\1]") + ("paragraph" 1 "@subsubheading \\1") ("pep" 1 (progn (setq cindex t) "PEP@ \\1 at cindex PEP \\1\n")) ("pi" 0 "pi") ("platform" 1 "") @@ -363,6 +370,7 @@ ("seetitle" 1 "@cite{\\1}") ("seeurl" 2 "\n at table @url\n at item \\1\n\\2\n at end table\n") ("setindexsubitem" 1 (progn (setq cindex t) "@cindex \\1")) + ("setlength" 2 "") ("setreleaseinfo" 1 (progn (setq py2texi-releaseinfo ""))) ("setshortversion" 1 (progn (setq py2texi-python-short-version (match-string 1 string)) "")) @@ -382,8 +390,8 @@ ("textasciicircum" 0 "^") ("textbackslash" 0 "@backslash{}") ("textbar" 0 "|") - ; Some common versions of Texinfo don't support @euro yet: - ; ("texteuro" 0 "@euro{}") + ("textbf" 1 "@strong{\\1}") + ("texteuro" 0 "@euro{}") ; Unfortunately, this alternate spelling doesn't actually apply to ; the usage found in Python Tutorial, which actually requires a ; Euro symbol to make sense, so this is commented out as well. @@ -394,6 +402,7 @@ ("textrm" 1 "\\1") ("texttt" 1 "@code{\\1}") ("textunderscore" 0 "_") + ("tilde" 0 "~") ("title" 1 (progn (setq title (match-string 1 string)) "@settitle \\1")) ("today" 0 "@today{}") ("token" 1 "@code{\\1}") @@ -402,6 +411,7 @@ ("u" 0 "@backslash{}u") ("ulink" 2 "\\1") ("UNIX" 0 "UNIX") + ("undefined" 0 "") ("unspecified" 0 "@dots{}") ("url" 1 "@url{\\1}") ("usepackage" 1 "") @@ -534,15 +544,20 @@ beg end) (py2texi-search-safe "\\\\begin{\\(verbatim\\|displaymath\\)}" - (replace-match "@example") - (setq beg (copy-marker (point) nil)) - (re-search-forward "\\\\end{\\(verbatim\\|displaymath\\)}") - (setq end (copy-marker (match-beginning 0) nil)) - (replace-match "@end example") - (py2texi-texinfo-escape beg end) - (put-text-property (- beg (length "@example")) - (+ end (length "@end example")) - 'py2texi-protected t)) + (when (save-excursion + ; Make sure we aren't looking at a commented out version + ; of a verbatim environment + (beginning-of-line) + (not (looking-at "%"))) + (replace-match "@example ") + (setq beg (copy-marker (point) nil)) + (re-search-forward "\\\\end{\\(verbatim\\|displaymath\\)}") + (setq end (copy-marker (match-beginning 0) nil)) + (replace-match "@end example") + (py2texi-texinfo-escape beg end) + (put-text-property (- beg (length "@example ")) + (+ end (length "@end example")) + 'py2texi-protected t))) (py2texi-search-safe "\\\\verb\\([^a-z]\\)" (setq delimiter (match-string 1)) (replace-match "@code{") @@ -883,6 +898,10 @@ (defun py2texi-fix-braces () "Escape braces for Texinfo." + (py2texi-search "{@{}" + (replace-match "@{")) + (py2texi-search "{@}}" + (replace-match "@}")) (let (string) (py2texi-search "{" (unless (or (py2texi-protected) Modified: stackless/branches/release25-maint/Doc/tut/tut.tex ============================================================================== --- stackless/branches/release25-maint/Doc/tut/tut.tex (original) +++ stackless/branches/release25-maint/Doc/tut/tut.tex Sat Apr 14 15:02:57 2007 @@ -2015,7 +2015,7 @@ There is a way to remove an item from a list given its index instead of its value: the \keyword{del} statement. This differs from the -\method{pop()}) method which returns a value. The \keyword{del} +\method{pop()} method which returns a value. The \keyword{del} statement can also be used to remove slices from a list or clear the entire list (which we did earlier by assignment of an empty list to the slice). For example: @@ -4329,8 +4329,7 @@ \end{verbatim} -The only rule necessary to explain the semantics is the resolution -rule used for class attribute references. This is depth-first, +For old-style classes, the only rule is depth-first, left-to-right. Thus, if an attribute is not found in \class{DerivedClassName}, it is searched in \class{Base1}, then (recursively) in the base classes of \class{Base1}, and only if it is @@ -4345,16 +4344,26 @@ rule makes no differences between direct and inherited attributes of \class{Base1}.) -It is clear that indiscriminate use of multiple inheritance is a -maintenance nightmare, given the reliance in Python on conventions to -avoid accidental name conflicts. A well-known problem with multiple -inheritance is a class derived from two classes that happen to have a -common base class. While it is easy enough to figure out what happens -in this case (the instance will have a single copy of ``instance -variables'' or data attributes used by the common base class), it is -not clear that these semantics are in any way useful. +For new-style classes, the method resolution order changes dynamically +to support cooperative calls to \function{super()}. This approach +is known in some other multiple-inheritance languages as call-next-method +and is more powerful than the super call found in single-inheritance languages. + +With new-style classes, dynamic ordering is necessary because all +cases of multiple inheritance exhibit one or more diamond relationships +(where one at least one of the parent classes can be accessed through +multiple paths from the bottommost class). For example, all new-style +classes inherit from \class{object}, so any case of multiple inheritance +provides more than one path to reach \class{object}. To keep the +base classes from being accessed more than once, the dynamic algorithm +linearizes the search order in a way that preserves the left-to-right +ordering specified in each class, that calls each parent only once, and +that is monotonic (meaning that a class can be subclassed without affecting +the precedence order of its parents). Taken together, these properties +make it possible to design reliable and extensible classes with +multiple inheritance. For more detail, see +\url{http://www.python.org/download/releases/2.3/mro/}. -%% XXX Add rules for new-style MRO? \section{Private Variables \label{private}} Modified: stackless/branches/release25-maint/Doc/whatsnew/whatsnew25.tex ============================================================================== --- stackless/branches/release25-maint/Doc/whatsnew/whatsnew25.tex (original) +++ stackless/branches/release25-maint/Doc/whatsnew/whatsnew25.tex Sat Apr 14 15:02:57 2007 @@ -5,7 +5,7 @@ % Fix XXX comments \title{What's New in Python 2.5} -\release{1.0} +\release{1.01} \author{A.M. Kuchling} \authoraddress{\email{amk at amk.ca}} @@ -409,7 +409,7 @@ specific exceptions. You couldn't combine both \keyword{except} blocks and a \keyword{finally} block, because generating the right bytecode for the combined version was complicated and it wasn't clear what the -semantics of the combined should be. +semantics of the combined statement should be. Guido van~Rossum spent some time working with Java, which does support the equivalent of combining \keyword{except} blocks and a @@ -540,7 +540,7 @@ StopIteration \end{verbatim} -\keyword{yield} will usually return \constant{None}, you +\keyword{yield} will usually return \constant{None}, so you should always check for this case. Don't just use its value in expressions unless you're sure that the \method{send()} method will be the only method used to resume your generator function. @@ -556,13 +556,14 @@ where the generator's execution is paused. \item \method{close()} raises a new \exception{GeneratorExit} - exception inside the generator to terminate the iteration. - On receiving this - exception, the generator's code must either raise - \exception{GeneratorExit} or \exception{StopIteration}; catching the - exception and doing anything else is illegal and will trigger - a \exception{RuntimeError}. \method{close()} will also be called by - Python's garbage collector when the generator is garbage-collected. + exception inside the generator to terminate the iteration. On + receiving this exception, the generator's code must either raise + \exception{GeneratorExit} or \exception{StopIteration}. Catching + the \exception{GeneratorExit} exception and returning a value is + illegal and will trigger a \exception{RuntimeError}; if the function + raises some other exception, that exception is propagated to the + caller. \method{close()} will also be called by Python's garbage + collector when the generator is garbage-collected. If you need to run cleanup code when a \exception{GeneratorExit} occurs, I suggest using a \code{try: ... finally:} suite instead of @@ -1293,6 +1294,17 @@ (Contributed by Alan McIntyre and committed at the NeedForSpeed sprint.) % Patch 1442927 +\item It's now illegal to mix iterating over a file +with \code{for line in \var{file}} and calling +the file object's \method{read()}/\method{readline()}/\method{readlines()} +methods. Iteration uses an internal buffer and the +\method{read*()} methods don't use that buffer. +Instead they would return the data following the buffer, causing the +data to appear out of order. Mixing iteration and these methods will +now trigger a \exception{ValueError} from the \method{read*()} method. +(Implemented by Thomas Wouters.) +% Patch 1397960 + \item The \module{struct} module now compiles structure format strings into an internal representation and caches this representation, yielding a 20\% speedup. (Contributed by Bob Ippolito @@ -1663,6 +1675,13 @@ \item The \module{pyexpat} module now uses version 2.0 of the Expat parser. (Contributed by Trent Mick.) +\item The \class{Queue} class provided by the \module{Queue} module +gained two new methods. \method{join()} blocks until all items in +the queue have been retrieved and all processing work on the items +have been completed. Worker threads call the other new method, +\method{task_done()}, to signal that processing for an item has been +completed. (Contributed by Raymond Hettinger.) + \item The old \module{regex} and \module{regsub} modules, which have been deprecated ever since Python 2.0, have finally been deleted. Other deleted modules: \module{statcache}, \module{tzparse}, @@ -1696,8 +1715,8 @@ In Python code, netlink addresses are represented as a tuple of 2 integers, \code{(\var{pid}, \var{group_mask})}. -Two new methods on socket objects, \method{recv_buf(\var{buffer})} and -\method{recvfrom_buf(\var{buffer})}, store the received data in an object +Two new methods on socket objects, \method{recv_into(\var{buffer})} and +\method{recvfrom_into(\var{buffer})}, store the received data in an object that supports the buffer protocol instead of returning the data as a string. This means you can put the data directly into an array or a memory-mapped file. @@ -2116,14 +2135,16 @@ SQLite embedded database, has been added to the standard library under the package name \module{sqlite3}. -SQLite is a C library that provides a SQL-language database that -stores data in disk files without requiring a separate server process. +SQLite is a C library that provides a lightweight disk-based database +that doesn't require a separate server process and allows accessing +the database using a nonstandard variant of the SQL query language. +Some applications can use SQLite for internal data storage. It's also +possible to prototype an application using SQLite and then port the +code to a larger database such as PostgreSQL or Oracle. + pysqlite was written by Gerhard H\"aring and provides a SQL interface compliant with the DB-API 2.0 specification described by -\pep{249}. This means that it should be possible to write the first -version of your applications using SQLite for data storage. If -switching to a larger database such as PostgreSQL or Oracle is -later necessary, the switch should be relatively easy. +\pep{249}. If you're compiling the Python source yourself, note that the source tree doesn't include the SQLite code, only the wrapper module. @@ -2150,8 +2171,8 @@ # Create table c.execute('''create table stocks -(date timestamp, trans varchar, symbol varchar, - qty decimal, price decimal)''') +(date text, trans text, symbol text, + qty real, price real)''') # Insert a row of data c.execute("""insert into stocks Modified: stackless/branches/release25-maint/Include/Python-ast.h ============================================================================== --- stackless/branches/release25-maint/Include/Python-ast.h (original) +++ stackless/branches/release25-maint/Include/Python-ast.h Sat Apr 14 15:02:57 2007 @@ -349,95 +349,153 @@ }; -mod_ty Module(asdl_seq * body, PyArena *arena); -mod_ty Interactive(asdl_seq * body, PyArena *arena); -mod_ty Expression(expr_ty body, PyArena *arena); -mod_ty Suite(asdl_seq * body, PyArena *arena); -stmt_ty FunctionDef(identifier name, arguments_ty args, asdl_seq * body, - asdl_seq * decorators, int lineno, int col_offset, PyArena - *arena); -stmt_ty ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int - lineno, int col_offset, PyArena *arena); -stmt_ty Return(expr_ty value, int lineno, int col_offset, PyArena *arena); -stmt_ty Delete(asdl_seq * targets, int lineno, int col_offset, PyArena *arena); -stmt_ty Assign(asdl_seq * targets, expr_ty value, int lineno, int col_offset, - PyArena *arena); -stmt_ty AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno, - int col_offset, PyArena *arena); -stmt_ty Print(expr_ty dest, asdl_seq * values, bool nl, int lineno, int - col_offset, PyArena *arena); -stmt_ty For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, - int lineno, int col_offset, PyArena *arena); -stmt_ty While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int - col_offset, PyArena *arena); -stmt_ty If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int - col_offset, PyArena *arena); -stmt_ty With(expr_ty context_expr, expr_ty optional_vars, asdl_seq * body, int - lineno, int col_offset, PyArena *arena); -stmt_ty Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno, int - col_offset, PyArena *arena); -stmt_ty TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, int - lineno, int col_offset, PyArena *arena); -stmt_ty TryFinally(asdl_seq * body, asdl_seq * finalbody, int lineno, int +#define Module(a0, a1) _Py_Module(a0, a1) +mod_ty _Py_Module(asdl_seq * body, PyArena *arena); +#define Interactive(a0, a1) _Py_Interactive(a0, a1) +mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena); +#define Expression(a0, a1) _Py_Expression(a0, a1) +mod_ty _Py_Expression(expr_ty body, PyArena *arena); +#define Suite(a0, a1) _Py_Suite(a0, a1) +mod_ty _Py_Suite(asdl_seq * body, PyArena *arena); +#define FunctionDef(a0, a1, a2, a3, a4, a5, a6) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6) +stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body, + asdl_seq * decorators, int lineno, int col_offset, + PyArena *arena); +#define ClassDef(a0, a1, a2, a3, a4, a5) _Py_ClassDef(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int + lineno, int col_offset, PyArena *arena); +#define Return(a0, a1, a2, a3) _Py_Return(a0, a1, a2, a3) +stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena); +#define Delete(a0, a1, a2, a3) _Py_Delete(a0, a1, a2, a3) +stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, PyArena + *arena); +#define Assign(a0, a1, a2, a3, a4) _Py_Assign(a0, a1, a2, a3, a4) +stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, int lineno, int col_offset, PyArena *arena); -stmt_ty Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, PyArena - *arena); -stmt_ty Import(asdl_seq * names, int lineno, int col_offset, PyArena *arena); -stmt_ty ImportFrom(identifier module, asdl_seq * names, int level, int lineno, - int col_offset, PyArena *arena); -stmt_ty Exec(expr_ty body, expr_ty globals, expr_ty locals, int lineno, int - col_offset, PyArena *arena); -stmt_ty Global(asdl_seq * names, int lineno, int col_offset, PyArena *arena); -stmt_ty Expr(expr_ty value, int lineno, int col_offset, PyArena *arena); -stmt_ty Pass(int lineno, int col_offset, PyArena *arena); -stmt_ty Break(int lineno, int col_offset, PyArena *arena); -stmt_ty Continue(int lineno, int col_offset, PyArena *arena); -expr_ty BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset, - PyArena *arena); -expr_ty BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int - col_offset, PyArena *arena); -expr_ty UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, - PyArena *arena); -expr_ty Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, - PyArena *arena); -expr_ty IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int - col_offset, PyArena *arena); -expr_ty Dict(asdl_seq * keys, asdl_seq * values, int lineno, int col_offset, - PyArena *arena); -expr_ty ListComp(expr_ty elt, asdl_seq * generators, int lineno, int +#define AugAssign(a0, a1, a2, a3, a4, a5) _Py_AugAssign(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int + lineno, int col_offset, PyArena *arena); +#define Print(a0, a1, a2, a3, a4, a5) _Py_Print(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_Print(expr_ty dest, asdl_seq * values, bool nl, int lineno, int + col_offset, PyArena *arena); +#define For(a0, a1, a2, a3, a4, a5, a6) _Py_For(a0, a1, a2, a3, a4, a5, a6) +stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * + orelse, int lineno, int col_offset, PyArena *arena); +#define While(a0, a1, a2, a3, a4, a5) _Py_While(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, + int col_offset, PyArena *arena); +#define If(a0, a1, a2, a3, a4, a5) _Py_If(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, + int col_offset, PyArena *arena); +#define With(a0, a1, a2, a3, a4, a5) _Py_With(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_With(expr_ty context_expr, expr_ty optional_vars, asdl_seq * body, + int lineno, int col_offset, PyArena *arena); +#define Raise(a0, a1, a2, a3, a4, a5) _Py_Raise(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno, int + col_offset, PyArena *arena); +#define TryExcept(a0, a1, a2, a3, a4, a5) _Py_TryExcept(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, + int lineno, int col_offset, PyArena *arena); +#define TryFinally(a0, a1, a2, a3, a4) _Py_TryFinally(a0, a1, a2, a3, a4) +stmt_ty _Py_TryFinally(asdl_seq * body, asdl_seq * finalbody, int lineno, int + col_offset, PyArena *arena); +#define Assert(a0, a1, a2, a3, a4) _Py_Assert(a0, a1, a2, a3, a4) +stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, + PyArena *arena); +#define Import(a0, a1, a2, a3) _Py_Import(a0, a1, a2, a3) +stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, PyArena + *arena); +#define ImportFrom(a0, a1, a2, a3, a4, a5) _Py_ImportFrom(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int + lineno, int col_offset, PyArena *arena); +#define Exec(a0, a1, a2, a3, a4, a5) _Py_Exec(a0, a1, a2, a3, a4, a5) +stmt_ty _Py_Exec(expr_ty body, expr_ty globals, expr_ty locals, int lineno, int + col_offset, PyArena *arena); +#define Global(a0, a1, a2, a3) _Py_Global(a0, a1, a2, a3) +stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, PyArena + *arena); +#define Expr(a0, a1, a2, a3) _Py_Expr(a0, a1, a2, a3) +stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, PyArena *arena); +#define Pass(a0, a1, a2) _Py_Pass(a0, a1, a2) +stmt_ty _Py_Pass(int lineno, int col_offset, PyArena *arena); +#define Break(a0, a1, a2) _Py_Break(a0, a1, a2) +stmt_ty _Py_Break(int lineno, int col_offset, PyArena *arena); +#define Continue(a0, a1, a2) _Py_Continue(a0, a1, a2) +stmt_ty _Py_Continue(int lineno, int col_offset, PyArena *arena); +#define BoolOp(a0, a1, a2, a3, a4) _Py_BoolOp(a0, a1, a2, a3, a4) +expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset, + PyArena *arena); +#define BinOp(a0, a1, a2, a3, a4, a5) _Py_BinOp(a0, a1, a2, a3, a4, a5) +expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int + col_offset, PyArena *arena); +#define UnaryOp(a0, a1, a2, a3, a4) _Py_UnaryOp(a0, a1, a2, a3, a4) +expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, + PyArena *arena); +#define Lambda(a0, a1, a2, a3, a4) _Py_Lambda(a0, a1, a2, a3, a4) +expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, + PyArena *arena); +#define IfExp(a0, a1, a2, a3, a4, a5) _Py_IfExp(a0, a1, a2, a3, a4, a5) +expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int + col_offset, PyArena *arena); +#define Dict(a0, a1, a2, a3, a4) _Py_Dict(a0, a1, a2, a3, a4) +expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int col_offset, PyArena *arena); -expr_ty GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int +#define ListComp(a0, a1, a2, a3, a4) _Py_ListComp(a0, a1, a2, a3, a4) +expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset, PyArena *arena); -expr_ty Yield(expr_ty value, int lineno, int col_offset, PyArena *arena); -expr_ty Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, int - lineno, int col_offset, PyArena *arena); -expr_ty Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty - starargs, expr_ty kwargs, int lineno, int col_offset, PyArena - *arena); -expr_ty Repr(expr_ty value, int lineno, int col_offset, PyArena *arena); -expr_ty Num(object n, int lineno, int col_offset, PyArena *arena); -expr_ty Str(string s, int lineno, int col_offset, PyArena *arena); -expr_ty Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int - lineno, int col_offset, PyArena *arena); -expr_ty Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int - lineno, int col_offset, PyArena *arena); -expr_ty Name(identifier id, expr_context_ty ctx, int lineno, int col_offset, - PyArena *arena); -expr_ty List(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, - PyArena *arena); -expr_ty Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, - PyArena *arena); -slice_ty Ellipsis(PyArena *arena); -slice_ty Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena); -slice_ty ExtSlice(asdl_seq * dims, PyArena *arena); -slice_ty Index(expr_ty value, PyArena *arena); -comprehension_ty comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs, - PyArena *arena); -excepthandler_ty excepthandler(expr_ty type, expr_ty name, asdl_seq * body, int - lineno, int col_offset, PyArena *arena); -arguments_ty arguments(asdl_seq * args, identifier vararg, identifier kwarg, - asdl_seq * defaults, PyArena *arena); -keyword_ty keyword(identifier arg, expr_ty value, PyArena *arena); -alias_ty alias(identifier name, identifier asname, PyArena *arena); +#define GeneratorExp(a0, a1, a2, a3, a4) _Py_GeneratorExp(a0, a1, a2, a3, a4) +expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int + col_offset, PyArena *arena); +#define Yield(a0, a1, a2, a3) _Py_Yield(a0, a1, a2, a3) +expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, PyArena *arena); +#define Compare(a0, a1, a2, a3, a4, a5) _Py_Compare(a0, a1, a2, a3, a4, a5) +expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, + int lineno, int col_offset, PyArena *arena); +#define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7) +expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty + starargs, expr_ty kwargs, int lineno, int col_offset, PyArena + *arena); +#define Repr(a0, a1, a2, a3) _Py_Repr(a0, a1, a2, a3) +expr_ty _Py_Repr(expr_ty value, int lineno, int col_offset, PyArena *arena); +#define Num(a0, a1, a2, a3) _Py_Num(a0, a1, a2, a3) +expr_ty _Py_Num(object n, int lineno, int col_offset, PyArena *arena); +#define Str(a0, a1, a2, a3) _Py_Str(a0, a1, a2, a3) +expr_ty _Py_Str(string s, int lineno, int col_offset, PyArena *arena); +#define Attribute(a0, a1, a2, a3, a4, a5) _Py_Attribute(a0, a1, a2, a3, a4, a5) +expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int + lineno, int col_offset, PyArena *arena); +#define Subscript(a0, a1, a2, a3, a4, a5) _Py_Subscript(a0, a1, a2, a3, a4, a5) +expr_ty _Py_Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int + lineno, int col_offset, PyArena *arena); +#define Name(a0, a1, a2, a3, a4) _Py_Name(a0, a1, a2, a3, a4) +expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int + col_offset, PyArena *arena); +#define List(a0, a1, a2, a3, a4) _Py_List(a0, a1, a2, a3, a4) +expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int + col_offset, PyArena *arena); +#define Tuple(a0, a1, a2, a3, a4) _Py_Tuple(a0, a1, a2, a3, a4) +expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int + col_offset, PyArena *arena); +#define Ellipsis(a0) _Py_Ellipsis(a0) +slice_ty _Py_Ellipsis(PyArena *arena); +#define Slice(a0, a1, a2, a3) _Py_Slice(a0, a1, a2, a3) +slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena); +#define ExtSlice(a0, a1) _Py_ExtSlice(a0, a1) +slice_ty _Py_ExtSlice(asdl_seq * dims, PyArena *arena); +#define Index(a0, a1) _Py_Index(a0, a1) +slice_ty _Py_Index(expr_ty value, PyArena *arena); +#define comprehension(a0, a1, a2, a3) _Py_comprehension(a0, a1, a2, a3) +comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq * + ifs, PyArena *arena); +#define excepthandler(a0, a1, a2, a3, a4, a5) _Py_excepthandler(a0, a1, a2, a3, a4, a5) +excepthandler_ty _Py_excepthandler(expr_ty type, expr_ty name, asdl_seq * body, + int lineno, int col_offset, PyArena *arena); +#define arguments(a0, a1, a2, a3, a4) _Py_arguments(a0, a1, a2, a3, a4) +arguments_ty _Py_arguments(asdl_seq * args, identifier vararg, identifier + kwarg, asdl_seq * defaults, PyArena *arena); +#define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) +keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena); +#define alias(a0, a1, a2) _Py_alias(a0, a1, a2) +alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena); PyObject* PyAST_mod2obj(mod_ty t); Modified: stackless/branches/release25-maint/Include/abstract.h ============================================================================== --- stackless/branches/release25-maint/Include/abstract.h (original) +++ stackless/branches/release25-maint/Include/abstract.h Sat Apr 14 15:02:57 2007 @@ -288,9 +288,10 @@ */ + /* Declared elsewhere + PyAPI_FUNC(int) PyCallable_Check(PyObject *o); - /* Determine if the object, o, is callable. Return 1 if the object is callable and 0 otherwise. Modified: stackless/branches/release25-maint/Include/dictobject.h ============================================================================== --- stackless/branches/release25-maint/Include/dictobject.h (original) +++ stackless/branches/release25-maint/Include/dictobject.h Sat Apr 14 15:02:57 2007 @@ -100,12 +100,15 @@ PyAPI_FUNC(void) PyDict_Clear(PyObject *mp); PyAPI_FUNC(int) PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); +PyAPI_FUNC(int) _PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp); PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp); PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key); +PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, long hash); /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */ PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other); Modified: stackless/branches/release25-maint/Include/patchlevel.h ============================================================================== --- stackless/branches/release25-maint/Include/patchlevel.h (original) +++ stackless/branches/release25-maint/Include/patchlevel.h Sat Apr 14 15:02:57 2007 @@ -21,12 +21,12 @@ /* Version parsed out into numeric values */ #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 5 -#define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL -#define PY_RELEASE_SERIAL 0 +#define PY_MICRO_VERSION 1 +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA +#define PY_RELEASE_SERIAL 1 /* Version as a string */ -#define PY_VERSION "2.5" +#define PY_VERSION "2.5.1c1" /* Subversion Revision number of this file (not of the repository) */ #define PY_PATCHLEVEL_REVISION "$Revision$" Modified: stackless/branches/release25-maint/Include/pystate.h ============================================================================== --- stackless/branches/release25-maint/Include/pystate.h (original) +++ stackless/branches/release25-maint/Include/pystate.h Sat Apr 14 15:02:57 2007 @@ -24,6 +24,7 @@ PyObject *modules; PyObject *sysdict; PyObject *builtins; + PyObject *modules_reloading; PyObject *codec_search_path; PyObject *codec_search_cache; Modified: stackless/branches/release25-maint/Include/setobject.h ============================================================================== --- stackless/branches/release25-maint/Include/setobject.h (original) +++ stackless/branches/release25-maint/Include/setobject.h Sat Apr 14 15:02:57 2007 @@ -82,7 +82,8 @@ PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key); PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key); PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key); -PyAPI_FUNC(int) _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **entry); +PyAPI_FUNC(int) _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key); +PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash); PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set); PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable); Modified: stackless/branches/release25-maint/LICENSE ============================================================================== --- stackless/branches/release25-maint/LICENSE (original) +++ stackless/branches/release25-maint/LICENSE Sat Apr 14 15:02:57 2007 @@ -53,6 +53,7 @@ 2.4.2 2.4.1 2005 PSF yes 2.4.3 2.4.2 2006 PSF yes 2.5 2.4 2006 PSF yes + 2.5.1 2.5 2007 PSF yes Footnotes: @@ -88,9 +89,9 @@ prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) -2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights -Reserved" are retained in Python alone or in any derivative version -prepared by Licensee. +2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative +version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make Modified: stackless/branches/release25-maint/Lib/CGIHTTPServer.py ============================================================================== --- stackless/branches/release25-maint/Lib/CGIHTTPServer.py (original) +++ stackless/branches/release25-maint/Lib/CGIHTTPServer.py Sat Apr 14 15:02:57 2007 @@ -105,17 +105,36 @@ def run_cgi(self): """Execute a CGI script.""" + path = self.path dir, rest = self.cgi_info + + i = path.find('/', len(dir) + 1) + while i >= 0: + nextdir = path[:i] + nextrest = path[i+1:] + + scriptdir = self.translate_path(nextdir) + if os.path.isdir(scriptdir): + dir, rest = nextdir, nextrest + i = path.find('/', len(dir) + 1) + else: + break + + # find an explicit query string, if present. i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' + + # dissect the part after the directory name into a script name & + # a possible additional path, to be stored in PATH_INFO. i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' + scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): Modified: stackless/branches/release25-maint/Lib/Queue.py ============================================================================== --- stackless/branches/release25-maint/Lib/Queue.py (original) +++ stackless/branches/release25-maint/Lib/Queue.py Sat Apr 14 15:02:57 2007 @@ -26,7 +26,7 @@ self._init(maxsize) # mutex must be held whenever the queue is mutating. All methods # that acquire mutex must release it before returning. mutex - # is shared between the two conditions, so acquiring and + # is shared between the three conditions, so acquiring and # releasing the conditions also acquires and releases mutex. self.mutex = threading.Lock() # Notify not_empty whenever an item is added to the queue; a Modified: stackless/branches/release25-maint/Lib/SimpleHTTPServer.py ============================================================================== --- stackless/branches/release25-maint/Lib/SimpleHTTPServer.py (original) +++ stackless/branches/release25-maint/Lib/SimpleHTTPServer.py Sat Apr 14 15:02:57 2007 @@ -66,6 +66,12 @@ path = self.translate_path(self.path) f = None if os.path.isdir(path): + if not self.path.endswith('/'): + # redirect browser - doing basically what apache does + self.send_response(301) + self.send_header("Location", self.path + "/") + self.end_headers() + return None for index in "index.html", "index.htm": index = os.path.join(path, index) if os.path.exists(index): Modified: stackless/branches/release25-maint/Lib/SocketServer.py ============================================================================== --- stackless/branches/release25-maint/Lib/SocketServer.py (original) +++ stackless/branches/release25-maint/Lib/SocketServer.py Sat Apr 14 15:02:57 2007 @@ -339,6 +339,7 @@ if self.allow_reuse_address: self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.bind(self.server_address) + self.server_address = self.socket.getsockname() def server_activate(self): """Called by constructor to activate the server. Modified: stackless/branches/release25-maint/Lib/StringIO.py ============================================================================== --- stackless/branches/release25-maint/Lib/StringIO.py (original) +++ stackless/branches/release25-maint/Lib/StringIO.py Sat Apr 14 15:02:57 2007 @@ -137,7 +137,7 @@ return r def readline(self, length=None): - """Read one entire line from the file. + r"""Read one entire line from the file. A trailing newline character is kept in the string (but may be absent when a file ends with an incomplete line). If the size argument is Modified: stackless/branches/release25-maint/Lib/_strptime.py ============================================================================== --- stackless/branches/release25-maint/Lib/_strptime.py (original) +++ stackless/branches/release25-maint/Lib/_strptime.py Sat Apr 14 15:02:57 2007 @@ -273,6 +273,27 @@ _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache _regex_cache = {} +def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): + """Calculate the Julian day based on the year, week of the year, and day of + the week, with week_start_day representing whether the week of the year + assumes the week starts on Sunday or Monday (6 or 0).""" + first_weekday = datetime_date(year, 1, 1).weekday() + # If we are dealing with the %U directive (week starts on Sunday), it's + # easier to just shift the view to Sunday being the first day of the + # week. + if not week_starts_Mon: + first_weekday = (first_weekday + 1) % 7 + day_of_week = (day_of_week + 1) % 7 + # Need to watch out for a week 0 (when the first day of the year is not + # the same as that specified by %U or %W). + week_0_length = (7 - first_weekday) % 7 + if week_of_year == 0: + return 1 + day_of_week - first_weekday + else: + days_to_week = week_0_length + (7 * (week_of_year - 1)) + return 1 + days_to_week + day_of_week + + def strptime(data_string, format="%a %b %d %H:%M:%S %Y"): """Return a time struct based on the input string and the format string.""" global _TimeRE_cache, _regex_cache @@ -385,10 +406,10 @@ elif group_key in ('U', 'W'): week_of_year = int(found_dict[group_key]) if group_key == 'U': - # U starts week on Sunday + # U starts week on Sunday. week_of_year_start = 6 else: - # W starts week on Monday + # W starts week on Monday. week_of_year_start = 0 elif group_key == 'Z': # Since -1 is default value only need to worry about setting tz if @@ -406,42 +427,20 @@ tz = value break # If we know the week of the year and what day of that week, we can figure - # out the Julian day of the year - # Calculations below assume 0 is a Monday + # out the Julian day of the year. if julian == -1 and week_of_year != -1 and weekday != -1: - # Calculate how many days in week 0 - first_weekday = datetime_date(year, 1, 1).weekday() - preceeding_days = 7 - first_weekday - if preceeding_days == 7: - preceeding_days = 0 - # Adjust for U directive so that calculations are not dependent on - # directive used to figure out week of year - if weekday == 6 and week_of_year_start == 6: - week_of_year -= 1 - # If a year starts and ends on a Monday but a week is specified to - # start on a Sunday we need to up the week to counter-balance the fact - # that with %W that first Monday starts week 1 while with %U that is - # week 0 and thus shifts everything by a week - if weekday == 0 and first_weekday == 0 and week_of_year_start == 6: - week_of_year += 1 - # If in week 0, then just figure out how many days from Jan 1 to day of - # week specified, else calculate by multiplying week of year by 7, - # adding in days in week 0, and the number of days from Monday to the - # day of the week - if week_of_year == 0: - julian = 1 + weekday - first_weekday - else: - days_to_week = preceeding_days + (7 * (week_of_year - 1)) - julian = 1 + days_to_week + weekday + week_starts_Mon = True if week_of_year_start == 0 else False + julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, + week_starts_Mon) # Cannot pre-calculate datetime_date() since can change in Julian - #calculation and thus could have different value for the day of the week - #calculation + # calculation and thus could have different value for the day of the week + # calculation. if julian == -1: # Need to add 1 to result since first day of the year is 1, not 0. julian = datetime_date(year, month, day).toordinal() - \ datetime_date(year, 1, 1).toordinal() + 1 else: # Assume that if they bothered to include Julian day it will - #be accurate + # be accurate. datetime_result = datetime_date.fromordinal((julian - 1) + datetime_date(year, 1, 1).toordinal()) year = datetime_result.year month = datetime_result.month Modified: stackless/branches/release25-maint/Lib/bisect.py ============================================================================== --- stackless/branches/release25-maint/Lib/bisect.py (original) +++ stackless/branches/release25-maint/Lib/bisect.py Sat Apr 14 15:02:57 2007 @@ -23,8 +23,8 @@ """Return the index where to insert item x in list a, assuming a is sorted. The return value i is such that all e in a[:i] have e <= x, and all e in - a[i:] have e > x. So if x already appears in the list, i points just - beyond the rightmost x already there. + a[i:] have e > x. So if x already appears in the list, a.insert(x) will + insert just after the rightmost x already there. Optional args lo (default 0) and hi (default len(a)) bound the slice of a to be searched. @@ -62,8 +62,8 @@ """Return the index where to insert item x in list a, assuming a is sorted. The return value i is such that all e in a[:i] have e < x, and all e in - a[i:] have e >= x. So if x already appears in the list, i points just - before the leftmost x already there. + a[i:] have e >= x. So if x already appears in the list, a.insert(x) will + insert just before the leftmost x already there. Optional args lo (default 0) and hi (default len(a)) bound the slice of a to be searched. Modified: stackless/branches/release25-maint/Lib/bsddb/dbobj.py ============================================================================== --- stackless/branches/release25-maint/Lib/bsddb/dbobj.py (original) +++ stackless/branches/release25-maint/Lib/bsddb/dbobj.py Sat Apr 14 15:02:57 2007 @@ -55,8 +55,9 @@ return apply(self._cobj.set_lg_max, args, kwargs) def set_lk_detect(self, *args, **kwargs): return apply(self._cobj.set_lk_detect, args, kwargs) - def set_lk_max(self, *args, **kwargs): - return apply(self._cobj.set_lk_max, args, kwargs) + if db.version() < (4,5): + def set_lk_max(self, *args, **kwargs): + return apply(self._cobj.set_lk_max, args, kwargs) def set_lk_max_locks(self, *args, **kwargs): return apply(self._cobj.set_lk_max_locks, args, kwargs) def set_lk_max_lockers(self, *args, **kwargs): Modified: stackless/branches/release25-maint/Lib/bsddb/test/test_1413192.py ============================================================================== --- stackless/branches/release25-maint/Lib/bsddb/test/test_1413192.py (original) +++ stackless/branches/release25-maint/Lib/bsddb/test/test_1413192.py Sat Apr 14 15:02:57 2007 @@ -14,7 +14,7 @@ env_name = '.' env = db.DBEnv() -env.open(env_name, db.DB_CREATE | db.DB_INIT_TXN) +env.open(env_name, db.DB_CREATE | db.DB_INIT_TXN | db.DB_INIT_MPOOL) the_txn = env.txn_begin() map = db.DB(env) Modified: stackless/branches/release25-maint/Lib/bsddb/test/test_dbobj.py ============================================================================== --- stackless/branches/release25-maint/Lib/bsddb/test/test_dbobj.py (original) +++ stackless/branches/release25-maint/Lib/bsddb/test/test_dbobj.py Sat Apr 14 15:02:57 2007 @@ -69,6 +69,10 @@ self.db.close() self.env.close() + def test03_dbobj_type_before_open(self): + # Ensure this doesn't cause a segfault. + self.assertRaises(db.DBInvalidArgError, db.DB().type) + #---------------------------------------------------------------------- def test_suite(): Modified: stackless/branches/release25-maint/Lib/codecs.py ============================================================================== --- stackless/branches/release25-maint/Lib/codecs.py (original) +++ stackless/branches/release25-maint/Lib/codecs.py Sat Apr 14 15:02:57 2007 @@ -329,6 +329,12 @@ """ return getattr(self.stream, name) + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + ### class StreamReader(Codec): @@ -568,6 +574,12 @@ """ return getattr(self.stream, name) + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + ### class StreamReaderWriter: @@ -641,6 +653,14 @@ """ return getattr(self.stream, name) + # these are needed to make "with codecs.open(...)" work properly + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + ### class StreamRecoder: @@ -751,6 +771,12 @@ """ return getattr(self.stream, name) + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + ### Shortcuts def open(filename, mode='rb', encoding=None, errors='strict', buffering=1): @@ -824,9 +850,10 @@ """ if file_encoding is None: file_encoding = data_encoding - info = lookup(data_encoding) - sr = StreamRecoder(file, info.encode, info.decode, - info.streamreader, info.streamwriter, errors) + data_info = lookup(data_encoding) + file_info = lookup(file_encoding) + sr = StreamRecoder(file, data_info.encode, data_info.decode, + file_info.streamreader, file_info.streamwriter, errors) # Add attributes to simplify introspection sr.data_encoding = data_encoding sr.file_encoding = file_encoding Modified: stackless/branches/release25-maint/Lib/compiler/pycodegen.py ============================================================================== --- stackless/branches/release25-maint/Lib/compiler/pycodegen.py (original) +++ stackless/branches/release25-maint/Lib/compiler/pycodegen.py Sat Apr 14 15:02:57 2007 @@ -851,6 +851,8 @@ self.emit('LOAD_CONST', None) self.nextBlock(final) self.setups.push((END_FINALLY, final)) + self._implicitNameOp('LOAD', exitvar) + self._implicitNameOp('DELETE', exitvar) self.emit('WITH_CLEANUP') self.emit('END_FINALLY') self.setups.pop() Modified: stackless/branches/release25-maint/Lib/compiler/transformer.py ============================================================================== --- stackless/branches/release25-maint/Lib/compiler/transformer.py (original) +++ stackless/branches/release25-maint/Lib/compiler/transformer.py Sat Apr 14 15:02:57 2007 @@ -960,7 +960,7 @@ if nodelist[2][0] == token.COLON: var = None else: - var = self.com_node(nodelist[2]) + var = self.com_assign(nodelist[2][2], OP_ASSIGN) return With(expr, var, body, lineno=nodelist[0][2]) def com_with_var(self, nodelist): Modified: stackless/branches/release25-maint/Lib/ctypes/__init__.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/__init__.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/__init__.py Sat Apr 14 15:02:57 2007 @@ -5,7 +5,7 @@ import os as _os, sys as _sys -__version__ = "1.0.1" +__version__ = "1.0.2" from _ctypes import Union, Structure, Array from _ctypes import _Pointer @@ -133,6 +133,18 @@ from _ctypes import sizeof, byref, addressof, alignment, resize from _ctypes import _SimpleCData +def _check_size(typ, typecode=None): + # Check if sizeof(ctypes_type) against struct.calcsize. This + # should protect somewhat against a misconfigured libffi. + from struct import calcsize + if typecode is None: + # Most _type_ codes are the same as used in struct + typecode = typ._type_ + actual, required = sizeof(typ), calcsize(typecode) + if actual != required: + raise SystemError("sizeof(%s) wrong: %d instead of %d" % \ + (typ, actual, required)) + class py_object(_SimpleCData): _type_ = "O" def __repr__(self): @@ -140,18 +152,23 @@ return super(py_object, self).__repr__() except ValueError: return "%s()" % type(self).__name__ +_check_size(py_object, "P") class c_short(_SimpleCData): _type_ = "h" +_check_size(c_short) class c_ushort(_SimpleCData): _type_ = "H" +_check_size(c_ushort) class c_long(_SimpleCData): _type_ = "l" +_check_size(c_long) class c_ulong(_SimpleCData): _type_ = "L" +_check_size(c_ulong) if _calcsize("i") == _calcsize("l"): # if int and long have the same size, make c_int an alias for c_long @@ -160,15 +177,19 @@ else: class c_int(_SimpleCData): _type_ = "i" + _check_size(c_int) class c_uint(_SimpleCData): _type_ = "I" + _check_size(c_uint) class c_float(_SimpleCData): _type_ = "f" +_check_size(c_float) class c_double(_SimpleCData): _type_ = "d" +_check_size(c_double) if _calcsize("l") == _calcsize("q"): # if long and long long have the same size, make c_longlong an alias for c_long @@ -177,33 +198,40 @@ else: class c_longlong(_SimpleCData): _type_ = "q" + _check_size(c_longlong) class c_ulonglong(_SimpleCData): _type_ = "Q" ## def from_param(cls, val): ## return ('d', float(val), val) ## from_param = classmethod(from_param) + _check_size(c_ulonglong) class c_ubyte(_SimpleCData): _type_ = "B" c_ubyte.__ctype_le__ = c_ubyte.__ctype_be__ = c_ubyte # backward compatibility: ##c_uchar = c_ubyte +_check_size(c_ubyte) class c_byte(_SimpleCData): _type_ = "b" c_byte.__ctype_le__ = c_byte.__ctype_be__ = c_byte +_check_size(c_byte) class c_char(_SimpleCData): _type_ = "c" c_char.__ctype_le__ = c_char.__ctype_be__ = c_char +_check_size(c_char) class c_char_p(_SimpleCData): _type_ = "z" +_check_size(c_char_p, "P") class c_void_p(_SimpleCData): _type_ = "P" c_voidp = c_void_p # backwards compatibility (to a bug) +_check_size(c_void_p) # This cache maps types to pointers to them. _pointer_type_cache = {} @@ -450,7 +478,7 @@ return _cast(obj, obj, typ) _string_at = CFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr) -def string_at(ptr, size=0): +def string_at(ptr, size=-1): """string_at(addr[, size]) -> string Return the string at addr.""" @@ -462,7 +490,7 @@ pass else: _wstring_at = CFUNCTYPE(py_object, c_void_p, c_int)(_wstring_at_addr) - def wstring_at(ptr, size=0): + def wstring_at(ptr, size=-1): """wstring_at(addr[, size]) -> string Return the string at addr.""" Modified: stackless/branches/release25-maint/Lib/ctypes/test/test_callbacks.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/test/test_callbacks.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/test/test_callbacks.py Sat Apr 14 15:02:57 2007 @@ -101,6 +101,19 @@ after = grc(o) self.failUnlessEqual((after, o), (before, o)) + def test_unsupported_restype_1(self): + # Only "fundamental" result types are supported for callback + # functions, the type must have a non-NULL stgdict->setfunc. + # POINTER(c_double), for example, is not supported. + + prototype = self.functype.im_func(POINTER(c_double)) + # The type is checked when the prototype is called + self.assertRaises(TypeError, prototype, lambda: None) + + def test_unsupported_restype_2(self): + prototype = self.functype.im_func(object) + self.assertRaises(TypeError, prototype, lambda: None) + try: WINFUNCTYPE except NameError: Modified: stackless/branches/release25-maint/Lib/ctypes/test/test_functions.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/test/test_functions.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/test/test_functions.py Sat Apr 14 15:02:57 2007 @@ -21,7 +21,9 @@ class POINT(Structure): _fields_ = [("x", c_int), ("y", c_int)] - +class RECT(Structure): + _fields_ = [("left", c_int), ("top", c_int), + ("right", c_int), ("bottom", c_int)] class FunctionTestCase(unittest.TestCase): def test_mro(self): @@ -379,5 +381,15 @@ self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) + def test_sf1651235(self): + # see http://www.python.org/sf/1651235 + + proto = CFUNCTYPE(c_int, RECT, POINT) + def callback(*args): + return 0 + + callback = proto(callback) + self.failUnlessRaises(ArgumentError, lambda: callback((1, 2, 3, 4), POINT())) + if __name__ == '__main__': unittest.main() Modified: stackless/branches/release25-maint/Lib/ctypes/test/test_loading.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/test/test_loading.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/test/test_loading.py Sat Apr 14 15:02:57 2007 @@ -14,8 +14,9 @@ else: libc_name = find_library("c") -if is_resource_enabled("printing"): - print "libc_name is", libc_name +if True or is_resource_enabled("printing"): + print >> sys.stderr, "\tfind_library('c') -> ", find_library('c') + print >> sys.stderr, "\tfind_library('m') -> ", find_library('m') class LoaderTest(unittest.TestCase): Modified: stackless/branches/release25-maint/Lib/ctypes/test/test_memfunctions.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/test/test_memfunctions.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/test/test_memfunctions.py Sat Apr 14 15:02:57 2007 @@ -14,6 +14,7 @@ self.failUnlessEqual(string_at(result), "Hello, World") self.failUnlessEqual(string_at(result, 5), "Hello") self.failUnlessEqual(string_at(result, 16), "Hello, World\0\0\0\0") + self.failUnlessEqual(string_at(result, 0), "") def test_memset(self): a = create_string_buffer(1000000) @@ -54,6 +55,7 @@ self.failUnlessEqual(wstring_at(a), "Hello, World") self.failUnlessEqual(wstring_at(a, 5), "Hello") self.failUnlessEqual(wstring_at(a, 16), "Hello, World\0\0\0\0") + self.failUnlessEqual(wstring_at(a, 0), "") if __name__ == "__main__": unittest.main() Modified: stackless/branches/release25-maint/Lib/ctypes/test/test_structures.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/test/test_structures.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/test/test_structures.py Sat Apr 14 15:02:57 2007 @@ -381,5 +381,35 @@ s.p = None self.failUnlessEqual(s.x, 12345678) +class TestRecursiveStructure(unittest.TestCase): + def test_contains_itself(self): + class Recursive(Structure): + pass + + try: + Recursive._fields_ = [("next", Recursive)] + except AttributeError, details: + self.failUnless("Structure or union cannot contain itself" in + str(details)) + else: + self.fail("Structure or union cannot contain itself") + + + def test_vice_versa(self): + class First(Structure): + pass + class Second(Structure): + pass + + First._fields_ = [("second", Second)] + + try: + Second._fields_ = [("first", First)] + except AttributeError, details: + self.failUnless("_fields_ is final" in + str(details)) + else: + self.fail("AttributeError not raised") + if __name__ == '__main__': unittest.main() Modified: stackless/branches/release25-maint/Lib/ctypes/util.py ============================================================================== --- stackless/branches/release25-maint/Lib/ctypes/util.py (original) +++ stackless/branches/release25-maint/Lib/ctypes/util.py Sat Apr 14 15:02:57 2007 @@ -46,24 +46,17 @@ import re, tempfile, errno def _findLib_gcc(name): - expr = '[^\(\)\s]*lib%s\.[^\(\)\s]*' % name + expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) fdout, ccout = tempfile.mkstemp() os.close(fdout) - cmd = 'if type gcc &>/dev/null; then CC=gcc; else CC=cc; fi;' \ + cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; else CC=cc; fi;' \ '$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name try: - fdout, outfile = tempfile.mkstemp() - os.close(fdout) - fd = os.popen(cmd) - trace = fd.read() - err = fd.close() + f = os.popen(cmd) + trace = f.read() + f.close() finally: try: - os.unlink(outfile) - except OSError, e: - if e.errno != errno.ENOENT: - raise - try: os.unlink(ccout) except OSError, e: if e.errno != errno.ENOENT: @@ -73,29 +66,58 @@ return None return res.group(0) - def _findLib_ld(name): - expr = '/[^\(\)\s]*lib%s\.[^\(\)\s]*' % name - res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read()) - if not res: - # Hm, this works only for libs needed by the python executable. - cmd = 'ldd %s 2>/dev/null' % sys.executable - res = re.search(expr, os.popen(cmd).read()) - if not res: - return None - return res.group(0) - def _get_soname(f): + # assuming GNU binutils / ELF + if not f: + return None cmd = "objdump -p -j .dynamic 2>/dev/null " + f res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read()) if not res: return None return res.group(1) - def find_library(name): - lib = _findLib_ld(name) or _findLib_gcc(name) - if not lib: - return None - return _get_soname(lib) + if (sys.platform.startswith("freebsd") + or sys.platform.startswith("openbsd") + or sys.platform.startswith("dragonfly")): + + def _num_version(libname): + # "libxyz.so.MAJOR.MINOR" => [ MAJOR, MINOR ] + parts = libname.split(".") + nums = [] + try: + while parts: + nums.insert(0, int(parts.pop())) + except ValueError: + pass + return nums or [ sys.maxint ] + + def find_library(name): + ename = re.escape(name) + expr = r':-l%s\.\S+ => \S*/(lib%s\.\S+)' % (ename, ename) + res = re.findall(expr, + os.popen('/sbin/ldconfig -r 2>/dev/null').read()) + if not res: + return _get_soname(_findLib_gcc(name)) + res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y))) + return res[-1] + + else: + + def _findLib_ldconfig(name): + # XXX assuming GLIBC's ldconfig (with option -p) + expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) + res = re.search(expr, + os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + if not res: + # Hm, this works only for libs needed by the python executable. + cmd = 'ldd %s 2>/dev/null' % sys.executable + res = re.search(expr, os.popen(cmd).read()) + if not res: + return None + return res.group(0) + + def find_library(name): + return _get_soname(_findLib_ldconfig(name) or _findLib_gcc(name)) ################################################################ # test code Modified: stackless/branches/release25-maint/Lib/decimal.py ============================================================================== --- stackless/branches/release25-maint/Lib/decimal.py (original) +++ stackless/branches/release25-maint/Lib/decimal.py Sat Apr 14 15:02:57 2007 @@ -487,7 +487,7 @@ 28 >>> with localcontext(): ... ctx = getcontext() - ... ctx.prec() += 2 + ... ctx.prec += 2 ... print ctx.prec ... 30 Modified: stackless/branches/release25-maint/Lib/difflib.py ============================================================================== --- stackless/branches/release25-maint/Lib/difflib.py (original) +++ stackless/branches/release25-maint/Lib/difflib.py Sat Apr 14 15:02:57 2007 @@ -1311,7 +1311,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None, charjunk=IS_CHARACTER_JUNK): - """Returns generator yielding marked up from/to side by side differences. + r"""Returns generator yielding marked up from/to side by side differences. Arguments: fromlines -- list of text lines to compared to tolines @@ -1945,8 +1945,7 @@ fromlist,tolist,flaglist,next_href,next_id = self._convert_flags( fromlist,tolist,flaglist,context,numlines) - import cStringIO - s = cStringIO.StringIO() + s = [] fmt = ' %s%s' + \ '%s%s\n' for i in range(len(flaglist)): @@ -1954,9 +1953,9 @@ # mdiff yields None on separator lines skip the bogus ones # generated for the first line if i > 0: - s.write(' \n \n') + s.append(' \n \n') else: - s.write( fmt % (next_id[i],next_href[i],fromlist[i], + s.append( fmt % (next_id[i],next_href[i],fromlist[i], next_href[i],tolist[i])) if fromdesc or todesc: header_row = '%s%s%s%s' % ( @@ -1968,7 +1967,7 @@ header_row = '' table = self._table_template % dict( - data_rows=s.getvalue(), + data_rows=''.join(s), header_row=header_row, prefix=self._prefix[1]) Modified: stackless/branches/release25-maint/Lib/distutils/__init__.py ============================================================================== --- stackless/branches/release25-maint/Lib/distutils/__init__.py (original) +++ stackless/branches/release25-maint/Lib/distutils/__init__.py Sat Apr 14 15:02:57 2007 @@ -20,4 +20,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.0" +__version__ = "2.5.1" Modified: stackless/branches/release25-maint/Lib/distutils/command/bdist_rpm.py ============================================================================== --- stackless/branches/release25-maint/Lib/distutils/command/bdist_rpm.py (original) +++ stackless/branches/release25-maint/Lib/distutils/command/bdist_rpm.py Sat Apr 14 15:02:57 2007 @@ -337,37 +337,47 @@ if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) + # Determine the binary rpm names that should be built out of this spec + # file + # Note that some of these may not be really built (if the file + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" + non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" + q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( + src_rpm, non_src_rpm, spec_path) + + out = os.popen(q_cmd) + binary_rpms = [] + source_rpm = None + while 1: + line = out.readline() + if not line: + break + l = string.split(string.strip(line)) + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + self.spawn(rpm_cmd) - # XXX this is a nasty hack -- we really should have a proper way to - # find out the names of the RPM files created; also, this assumes - # that RPM creates exactly one source and one binary RPM. if not self.dry_run: if not self.binary_only: - srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) - assert len(srpms) == 1, \ - "unexpected number of SRPM files found: %s" % srpms - dist_file = ('bdist_rpm', 'any', - self._dist_path(srpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(srpms[0], self.dist_dir) + srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) + assert(os.path.exists(srpm)) + self.move_file(srpm, self.dist_dir) if not self.source_only: - rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], - "*/*debuginfo*.rpm")) - if debuginfo: - rpms.remove(debuginfo[0]) - assert len(rpms) == 1, \ - "unexpected number of RPM files found: %s" % rpms - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(rpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(rpms[0], self.dist_dir) - if debuginfo: - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(debuginfo[0])) - self.move_file(debuginfo[0], self.dist_dir) + for rpm in binary_rpms: + rpm = os.path.join(rpm_dir['RPMS'], rpm) + if os.path.exists(rpm): + self.move_file(rpm, self.dist_dir) # run() def _dist_path(self, path): @@ -381,6 +391,7 @@ spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), + '%define unmangled_version ' + self.distribution.get_version(), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), @@ -402,9 +413,9 @@ # but only after it has run: and we create the spec file before # running "sdist", in case of --spec-only. if self.use_bzip2: - spec_file.append('Source0: %{name}-%{version}.tar.bz2') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') else: - spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') spec_file.extend([ 'License: ' + self.distribution.get_license(), @@ -479,7 +490,7 @@ # are just text that we drop in as-is. Hmmm. script_options = [ - ('prep', 'prep_script', "%setup"), + ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), ('install', 'install_script', ("%s install " Modified: stackless/branches/release25-maint/Lib/distutils/command/build_ext.py ============================================================================== --- stackless/branches/release25-maint/Lib/distutils/command/build_ext.py (original) +++ stackless/branches/release25-maint/Lib/distutils/command/build_ext.py Sat Apr 14 15:02:57 2007 @@ -185,10 +185,8 @@ # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - (sys.platform.startswith('linux') and - sysconfig.get_config_var('Py_ENABLE_SHARED')): - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -197,6 +195,17 @@ # building python standard extensions self.library_dirs.append('.') + # for extensions under Linux with a shared Python library, + # Python's library directory must be appended to library_dirs + if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ + and sysconfig.get_config_var('Py_ENABLE_SHARED'): + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: + # building python standard extensions + self.library_dirs.append('.') + # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option will be set to '1'. Multiple Modified: stackless/branches/release25-maint/Lib/distutils/command/install_egg_info.py ============================================================================== --- stackless/branches/release25-maint/Lib/distutils/command/install_egg_info.py (original) +++ stackless/branches/release25-maint/Lib/distutils/command/install_egg_info.py Sat Apr 14 15:02:57 2007 @@ -35,6 +35,9 @@ dir_util.remove_tree(target, dry_run=self.dry_run) elif os.path.exists(target): self.execute(os.unlink,(self.target,),"Removing "+target) + elif not os.path.isdir(self.install_dir): + self.execute(os.makedirs, (self.install_dir,), + "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: f = open(target, 'w') Modified: stackless/branches/release25-maint/Lib/distutils/msvccompiler.py ============================================================================== --- stackless/branches/release25-maint/Lib/distutils/msvccompiler.py (original) +++ stackless/branches/release25-maint/Lib/distutils/msvccompiler.py Sat Apr 14 15:02:57 2007 @@ -187,6 +187,19 @@ j = string.find(sys.version, ")", i) return sys.version[i+len(prefix):j] +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths class MSVCCompiler (CCompiler) : @@ -270,6 +283,7 @@ self.__paths.append(p) except KeyError: pass + self.__paths = normalize_and_reduce_paths(self.__paths) os.environ['path'] = string.join(self.__paths, ';') self.preprocess_options = None Modified: stackless/branches/release25-maint/Lib/email/_parseaddr.py ============================================================================== --- stackless/branches/release25-maint/Lib/email/_parseaddr.py (original) +++ stackless/branches/release25-maint/Lib/email/_parseaddr.py Sat Apr 14 15:02:57 2007 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2006 Python Software Foundation +# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig at python.org """Email address parsing code. @@ -172,6 +172,7 @@ self.pos = 0 self.LWS = ' \t' self.CR = '\r\n' + self.FWS = self.LWS + self.CR self.atomends = self.specials + self.LWS + self.CR # Note that RFC 2822 now specifies `.' as obs-phrase, meaning that it # is obsolete syntax. RFC 2822 requires that we recognize obsolete @@ -418,7 +419,7 @@ plist = [] while self.pos < len(self.field): - if self.field[self.pos] in self.LWS: + if self.field[self.pos] in self.FWS: self.pos += 1 elif self.field[self.pos] == '"': plist.append(self.getquote()) Modified: stackless/branches/release25-maint/Lib/email/header.py ============================================================================== --- stackless/branches/release25-maint/Lib/email/header.py (original) +++ stackless/branches/release25-maint/Lib/email/header.py Sat Apr 14 15:02:57 2007 @@ -39,7 +39,8 @@ \? # literal ? (?P.*?) # non-greedy up to the next ?= is the encoded string \?= # literal ?= - ''', re.VERBOSE | re.IGNORECASE) + (?=[ \t]|$) # whitespace or the end of the string + ''', re.VERBOSE | re.IGNORECASE | re.MULTILINE) # Field name regexp, including trailing colon, but not separating whitespace, # according to RFC 2822. Character range is from tilde to exclamation mark. Modified: stackless/branches/release25-maint/Lib/email/message.py ============================================================================== --- stackless/branches/release25-maint/Lib/email/message.py (original) +++ stackless/branches/release25-maint/Lib/email/message.py Sat Apr 14 15:02:57 2007 @@ -238,7 +238,7 @@ self.del_param('charset') self._charset = None return - if isinstance(charset, str): + if isinstance(charset, basestring): charset = email.charset.Charset(charset) if not isinstance(charset, email.charset.Charset): raise TypeError(charset) @@ -756,7 +756,9 @@ charset = charset[2] # charset character must be in us-ascii range try: - charset = unicode(charset, 'us-ascii').encode('us-ascii') + if isinstance(charset, str): + charset = unicode(charset, 'us-ascii') + charset = charset.encode('us-ascii') except UnicodeError: return failobj # RFC 2046, $4.1.2 says charsets are not case sensitive Modified: stackless/branches/release25-maint/Lib/email/test/test_email.py ============================================================================== --- stackless/branches/release25-maint/Lib/email/test/test_email.py (original) +++ stackless/branches/release25-maint/Lib/email/test/test_email.py Sat Apr 14 15:02:57 2007 @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2006 Python Software Foundation +# Copyright (C) 2001-2007 Python Software Foundation # Contact: email-sig at python.org # email package unit tests @@ -502,6 +502,13 @@ msg.set_payload(x) self.assertEqual(msg.get_payload(decode=True), x) + def test_get_content_charset(self): + msg = Message() + msg.set_charset('us-ascii') + self.assertEqual('us-ascii', msg.get_content_charset()) + msg.set_charset(u'us-ascii') + self.assertEqual('us-ascii', msg.get_content_charset()) + # Test the email.Encoders module @@ -1520,6 +1527,18 @@ hu = make_header(dh).__unicode__() eq(hu, u'The quick brown fox jumped over the lazy dog') + def test_rfc2047_without_whitespace(self): + s = 'Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord' + dh = decode_header(s) + self.assertEqual(dh, [(s, None)]) + + def test_rfc2047_with_whitespace(self): + s = 'Sm =?ISO-8859-1?B?9g==?= rg =?ISO-8859-1?B?5Q==?= sbord' + dh = decode_header(s) + self.assertEqual(dh, [('Sm', None), ('\xf6', 'iso-8859-1'), + ('rg', None), ('\xe5', 'iso-8859-1'), + ('sbord', None)]) + # Test the MIMEMessage class @@ -2165,6 +2184,12 @@ # formataddr() quotes the name if there's a dot in it self.assertEqual(Utils.formataddr((a, b)), y) + def test_multiline_from_comment(self): + x = """\ +Foo +\tBar """ + self.assertEqual(Utils.parseaddr(x), ('Foo Bar', 'foo at example.com')) + def test_quote_dump(self): self.assertEqual( Utils.formataddr(('A Silly; Person', 'person at dom.ain')), Modified: stackless/branches/release25-maint/Lib/email/test/test_email_renamed.py ============================================================================== --- stackless/branches/release25-maint/Lib/email/test/test_email_renamed.py (original) +++ stackless/branches/release25-maint/Lib/email/test/test_email_renamed.py Sat Apr 14 15:02:57 2007 @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2006 Python Software Foundation +# Copyright (C) 2001-2007 Python Software Foundation # Contact: email-sig at python.org # email package unit tests @@ -1525,6 +1525,18 @@ hu = make_header(dh).__unicode__() eq(hu, u'The quick brown fox jumped over the lazy dog') + def test_rfc2047_missing_whitespace(self): + s = 'Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord' + dh = decode_header(s) + self.assertEqual(dh, [(s, None)]) + + def test_rfc2047_with_whitespace(self): + s = 'Sm =?ISO-8859-1?B?9g==?= rg =?ISO-8859-1?B?5Q==?= sbord' + dh = decode_header(s) + self.assertEqual(dh, [('Sm', None), ('\xf6', 'iso-8859-1'), + ('rg', None), ('\xe5', 'iso-8859-1'), + ('sbord', None)]) + # Test the MIMEMessage class @@ -2171,6 +2183,12 @@ # formataddr() quotes the name if there's a dot in it self.assertEqual(utils.formataddr((a, b)), y) + def test_multiline_from_comment(self): + x = """\ +Foo +\tBar """ + self.assertEqual(utils.parseaddr(x), ('Foo Bar', 'foo at example.com')) + def test_quote_dump(self): self.assertEqual( utils.formataddr(('A Silly; Person', 'person at dom.ain')), Modified: stackless/branches/release25-maint/Lib/encodings/bz2_codec.py ============================================================================== --- stackless/branches/release25-maint/Lib/encodings/bz2_codec.py (original) +++ stackless/branches/release25-maint/Lib/encodings/bz2_codec.py Sat Apr 14 15:02:57 2007 @@ -52,14 +52,35 @@ return bz2_decode(input, errors) class IncrementalEncoder(codecs.IncrementalEncoder): + def __init__(self, errors='strict'): + assert errors == 'strict' + self.errors = errors + self.compressobj = bz2.BZ2Compressor() + def encode(self, input, final=False): - assert self.errors == 'strict' - return bz2.compress(input) + if final: + c = self.compressobj.compress(input) + return c + self.compressobj.flush() + else: + return self.compressobj.compress(input) + + def reset(self): + self.compressobj = bz2.BZ2Compressor() class IncrementalDecoder(codecs.IncrementalDecoder): + def __init__(self, errors='strict'): + assert errors == 'strict' + self.errors = errors + self.decompressobj = bz2.BZ2Decompressor() + def decode(self, input, final=False): - assert self.errors == 'strict' - return bz2.decompress(input) + try: + return self.decompressobj.decompress(input) + except EOFError: + return '' + + def reset(self): + self.decompressobj = bz2.BZ2Decompressor() class StreamWriter(Codec,codecs.StreamWriter): pass Modified: stackless/branches/release25-maint/Lib/encodings/utf_8_sig.py ============================================================================== --- stackless/branches/release25-maint/Lib/encodings/utf_8_sig.py (original) +++ stackless/branches/release25-maint/Lib/encodings/utf_8_sig.py Sat Apr 14 15:02:57 2007 @@ -16,7 +16,7 @@ def decode(input, errors='strict'): prefix = 0 - if input.startswith(codecs.BOM_UTF8): + if input[:3] == codecs.BOM_UTF8: input = input[3:] prefix = 3 (output, consumed) = codecs.utf_8_decode(input, errors, True) Modified: stackless/branches/release25-maint/Lib/encodings/zlib_codec.py ============================================================================== --- stackless/branches/release25-maint/Lib/encodings/zlib_codec.py (original) +++ stackless/branches/release25-maint/Lib/encodings/zlib_codec.py Sat Apr 14 15:02:57 2007 @@ -51,14 +51,36 @@ return zlib_decode(input, errors) class IncrementalEncoder(codecs.IncrementalEncoder): + def __init__(self, errors='strict'): + assert errors == 'strict' + self.errors = errors + self.compressobj = zlib.compressobj() + def encode(self, input, final=False): - assert self.errors == 'strict' - return zlib.compress(input) + if final: + c = self.compressobj.compress(input) + return c + self.compressobj.flush() + else: + return self.compressobj.compress(input) + + def reset(self): + self.compressobj = zlib.compressobj() class IncrementalDecoder(codecs.IncrementalDecoder): + def __init__(self, errors='strict'): + assert errors == 'strict' + self.errors = errors + self.decompressobj = zlib.decompressobj() + def decode(self, input, final=False): - assert self.errors == 'strict' - return zlib.decompress(input) + if final: + c = self.decompressobj.decompress(input) + return c + self.decompressobj.flush() + else: + return self.decompressobj.decompress(input) + + def reset(self): + self.decompressobj = zlib.decompressobj() class StreamWriter(Codec,codecs.StreamWriter): pass Modified: stackless/branches/release25-maint/Lib/ftplib.py ============================================================================== --- stackless/branches/release25-maint/Lib/ftplib.py (original) +++ stackless/branches/release25-maint/Lib/ftplib.py Sat Apr 14 15:02:57 2007 @@ -325,6 +325,14 @@ if rest is not None: self.sendcmd("REST %s" % rest) resp = self.sendcmd(cmd) + # Some servers apparently send a 200 reply to + # a LIST or STOR command, before the 150 reply + # (and way before the 226 reply). This seems to + # be in violation of the protocol (which only allows + # 1xx or error messages for LIST), so we just discard + # this response. + if resp[0] == '2': + resp = self.getresp() if resp[0] != '1': raise error_reply, resp else: @@ -332,6 +340,9 @@ if rest is not None: self.sendcmd("REST %s" % rest) resp = self.sendcmd(cmd) + # See above. + if resp[0] == '2': + resp = self.getresp() if resp[0] != '1': raise error_reply, resp conn, sockaddr = sock.accept() Modified: stackless/branches/release25-maint/Lib/functools.py ============================================================================== --- stackless/branches/release25-maint/Lib/functools.py (original) +++ stackless/branches/release25-maint/Lib/functools.py Sat Apr 14 15:02:57 2007 @@ -32,7 +32,7 @@ for attr in assigned: setattr(wrapper, attr, getattr(wrapped, attr)) for attr in updated: - getattr(wrapper, attr).update(getattr(wrapped, attr)) + getattr(wrapper, attr).update(getattr(wrapped, attr, {})) # Return the wrapper so this can be used as a decorator via partial() return wrapper Modified: stackless/branches/release25-maint/Lib/hashlib.py ============================================================================== --- stackless/branches/release25-maint/Lib/hashlib.py (original) +++ stackless/branches/release25-maint/Lib/hashlib.py Sat Apr 14 15:02:57 2007 @@ -18,8 +18,37 @@ More algorithms may be available on your platform but the above are guaranteed to exist. -Choose your hash function wisely. Some have known weaknesses. +Choose your hash function wisely. Some have known collision weaknesses. sha384 and sha512 will be slow on 32 bit platforms. + +Hash objects have these methods: + - update(arg): Update the hash object with the string arg. Repeated calls + are equivalent to a single call with the concatenation of all + the arguments. + - digest(): Return the digest of the strings passed to the update() method + so far. This may contain non-ASCII characters, including + NUL bytes. + - hexdigest(): Like digest() except the digest is returned as a string of + double length, containing only hexadecimal digits. + - copy(): Return a copy (clone) of the hash object. This can be used to + efficiently compute the digests of strings that share a common + initial substring. + +For example, to obtain the digest of the string 'Nobody inspects the +spammish repetition': + + >>> import hashlib + >>> m = hashlib.md5() + >>> m.update("Nobody inspects") + >>> m.update(" the spammish repetition") + >>> m.digest() + '\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9' + +More condensed: + + >>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest() + 'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2' + """ Modified: stackless/branches/release25-maint/Lib/heapq.py ============================================================================== --- stackless/branches/release25-maint/Lib/heapq.py (original) +++ stackless/branches/release25-maint/Lib/heapq.py Sat Apr 14 15:02:57 2007 @@ -130,7 +130,7 @@ 'nsmallest'] from itertools import islice, repeat, count, imap, izip, tee -from operator import itemgetter +from operator import itemgetter, neg import bisect def heappush(heap, item): @@ -315,8 +315,6 @@ Equivalent to: sorted(iterable, key=key)[:n] """ - if key is None: - return _nsmallest(n, iterable) in1, in2 = tee(iterable) it = izip(imap(key, in1), count(), in2) # decorate result = _nsmallest(n, it) @@ -328,10 +326,8 @@ Equivalent to: sorted(iterable, key=key, reverse=True)[:n] """ - if key is None: - return _nlargest(n, iterable) in1, in2 = tee(iterable) - it = izip(imap(key, in1), count(), in2) # decorate + it = izip(imap(key, in1), imap(neg, count()), in2) # decorate result = _nlargest(n, it) return map(itemgetter(2), result) # undecorate Modified: stackless/branches/release25-maint/Lib/httplib.py ============================================================================== --- stackless/branches/release25-maint/Lib/httplib.py (original) +++ stackless/branches/release25-maint/Lib/httplib.py Sat Apr 14 15:02:57 2007 @@ -926,8 +926,8 @@ self.__state = _CS_IDLE if response.will_close: - # Pass the socket to the response - self.sock = None + # this effectively passes the connection to the response + self.close() else: # remember this, so we can tell when it is complete self.__response = response Modified: stackless/branches/release25-maint/Lib/idlelib/EditorWindow.py ============================================================================== --- stackless/branches/release25-maint/Lib/idlelib/EditorWindow.py (original) +++ stackless/branches/release25-maint/Lib/idlelib/EditorWindow.py Sat Apr 14 15:02:57 2007 @@ -819,7 +819,7 @@ def close(self): reply = self.maybesave() - if reply != "cancel": + if str(reply) != "cancel": self._close() return reply Modified: stackless/branches/release25-maint/Lib/idlelib/MultiCall.py ============================================================================== --- stackless/branches/release25-maint/Lib/idlelib/MultiCall.py (original) +++ stackless/branches/release25-maint/Lib/idlelib/MultiCall.py Sat Apr 14 15:02:57 2007 @@ -349,6 +349,8 @@ triplets.append(triplet) def event_delete(self, virtual, *sequences): + if virtual not in self.__eventinfo: + return func, triplets = self.__eventinfo[virtual] for seq in sequences: triplet = _parse_sequence(seq) Modified: stackless/branches/release25-maint/Lib/idlelib/NEWS.txt ============================================================================== --- stackless/branches/release25-maint/Lib/idlelib/NEWS.txt (original) +++ stackless/branches/release25-maint/Lib/idlelib/NEWS.txt Sat Apr 14 15:02:57 2007 @@ -1,3 +1,8 @@ +What's New in IDLE 1.2.1c1? +=========================== + +*Release date: 05-APR-2007* + What's New in IDLE 1.2? ======================= Modified: stackless/branches/release25-maint/Lib/idlelib/idlever.py ============================================================================== --- stackless/branches/release25-maint/Lib/idlelib/idlever.py (original) +++ stackless/branches/release25-maint/Lib/idlelib/idlever.py Sat Apr 14 15:02:57 2007 @@ -1 +1 @@ -IDLE_VERSION = "1.2" +IDLE_VERSION = "1.2.1c1" Modified: stackless/branches/release25-maint/Lib/imputil.py ============================================================================== --- stackless/branches/release25-maint/Lib/imputil.py (original) +++ stackless/branches/release25-maint/Lib/imputil.py Sat Apr 14 15:02:57 2007 @@ -552,6 +552,10 @@ # This method is only used when we look for a module within a package. assert parent + for submodule_path in parent.__path__: + code = self._import_pathname(_os_path_join(submodule_path, modname), fqname) + if code is not None: + return code return self._import_pathname(_os_path_join(parent.__pkgdir__, modname), fqname) Modified: stackless/branches/release25-maint/Lib/lib-tk/Tix.py ============================================================================== --- stackless/branches/release25-maint/Lib/lib-tk/Tix.py (original) +++ stackless/branches/release25-maint/Lib/lib-tk/Tix.py Sat Apr 14 15:02:57 2007 @@ -421,7 +421,7 @@ except: plist = [] - if (not check_intermediate) or len(plist) < 2: + if not check_intermediate: # immediate descendant TixWidget.__init__(self, master, None, None, {'name' : name}) else: @@ -437,6 +437,9 @@ parent = TixSubWidget(parent, plist[i], destroy_physically=0, check_intermediate=0) + # The Tk widget name is in plist, not in name + if plist: + name = plist[-1] TixWidget.__init__(self, parent, None, None, {'name' : name}) self.destroy_physically = destroy_physically Modified: stackless/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py ============================================================================== --- stackless/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py (original) +++ stackless/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py Sat Apr 14 15:02:57 2007 @@ -46,8 +46,13 @@ title -- the dialog title ''' Toplevel.__init__(self, parent) - self.transient(parent) + # If the master is not viewable, don't + # make the child transient, or else it + # would be opened withdrawn + if parent.winfo_viewable(): + self.transient(parent) + if title: self.title(title) @@ -124,9 +129,10 @@ self.withdraw() self.update_idletasks() - self.apply() - - self.cancel() + try: + self.apply() + finally: + self.cancel() def cancel(self, event=None): Modified: stackless/branches/release25-maint/Lib/logging/__init__.py ============================================================================== --- stackless/branches/release25-maint/Lib/logging/__init__.py (original) +++ stackless/branches/release25-maint/Lib/logging/__init__.py Sat Apr 14 15:02:57 2007 @@ -1,4 +1,4 @@ -# Copyright 2001-2005 by Vinay Sajip. All Rights Reserved. +# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, @@ -21,7 +21,7 @@ Should work under Python versions >= 1.5.2, except that source line information is not available unless 'sys._getframe()' is. -Copyright (C) 2001-2004 Vinay Sajip. All Rights Reserved. +Copyright (C) 2001-2007 Vinay Sajip. All Rights Reserved. To use, simply 'import logging' and log away! """ @@ -41,8 +41,8 @@ __author__ = "Vinay Sajip " __status__ = "production" -__version__ = "0.4.9.9" -__date__ = "06 February 2006" +__version__ = "0.5.0.2" +__date__ = "16 February 2007" #--------------------------------------------------------------------------- # Miscellaneous module data @@ -68,7 +68,7 @@ except: return sys.exc_traceback.tb_frame.f_back -if hasattr(sys, '_getframe'): currentframe = sys._getframe +if hasattr(sys, '_getframe'): currentframe = lambda: sys._getframe(3) # done filching # _srcfile is only used in conjunction with sys._getframe(). @@ -214,7 +214,7 @@ information to be logged. """ def __init__(self, name, level, pathname, lineno, - msg, args, exc_info, func): + msg, args, exc_info, func=None): """ Initialize a logging record with interesting information. """ @@ -910,9 +910,12 @@ Ensure that children of the placeholder ph are connected to the specified logger. """ - #for c in ph.loggers: + name = alogger.name + namelen = len(name) for c in ph.loggerMap.keys(): - if string.find(c.parent.name, alogger.name) <> 0: + #The if means ... if not c.parent.name.startswith(nm) + #if string.find(c.parent.name, nm) <> 0: + if c.parent.name[:namelen] != name: alogger.parent = c.parent c.parent = alogger Modified: stackless/branches/release25-maint/Lib/logging/config.py ============================================================================== --- stackless/branches/release25-maint/Lib/logging/config.py (original) +++ stackless/branches/release25-maint/Lib/logging/config.py Sat Apr 14 15:02:57 2007 @@ -110,7 +110,7 @@ flist = string.split(flist, ",") formatters = {} for form in flist: - sectname = "formatter_%s" % form + sectname = "formatter_%s" % string.strip(form) opts = cp.options(sectname) if "format" in opts: fs = cp.get(sectname, "format", 1) @@ -139,7 +139,7 @@ handlers = {} fixups = [] #for inter-handler references for hand in hlist: - sectname = "handler_%s" % hand + sectname = "handler_%s" % string.strip(hand) klass = cp.get(sectname, "class") opts = cp.options(sectname) if "formatter" in opts: @@ -176,6 +176,7 @@ # configure the root first llist = cp.get("loggers", "keys") llist = string.split(llist, ",") + llist = map(lambda x: string.strip(x), llist) llist.remove("root") sectname = "logger_root" root = logging.root @@ -190,7 +191,7 @@ if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: - log.addHandler(handlers[hand]) + log.addHandler(handlers[string.strip(hand)]) #and now the others... #we don't want to lose the existing loggers, @@ -225,7 +226,7 @@ if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: - logger.addHandler(handlers[hand]) + logger.addHandler(handlers[string.strip(hand)]) #Disable any old loggers. There's no point deleting #them as other threads may continue to hold references Modified: stackless/branches/release25-maint/Lib/logging/handlers.py ============================================================================== --- stackless/branches/release25-maint/Lib/logging/handlers.py (original) +++ stackless/branches/release25-maint/Lib/logging/handlers.py Sat Apr 14 15:02:57 2007 @@ -586,11 +586,11 @@ self.address = address self.facility = facility if type(address) == types.StringType: - self._connect_unixsocket(address) self.unixsocket = 1 + self._connect_unixsocket(address) else: - self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.unixsocket = 0 + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.formatter = None Modified: stackless/branches/release25-maint/Lib/mailbox.py ============================================================================== --- stackless/branches/release25-maint/Lib/mailbox.py (original) +++ stackless/branches/release25-maint/Lib/mailbox.py Sat Apr 14 15:02:57 2007 @@ -2,6 +2,12 @@ """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.""" +# Notes for authors of new mailbox subclasses: +# +# Remember to fsync() changes to disk before closing a modified file +# or returning from a flush() method. See functions _sync_flush() and +# _sync_close(). + import sys import os import time @@ -238,7 +244,7 @@ try: self._dump_message(message, tmp_file) finally: - tmp_file.close() + _sync_close(tmp_file) if isinstance(message, MaildirMessage): subdir = message.get_subdir() suffix = self.colon + message.get_info() @@ -249,7 +255,19 @@ suffix = '' uniq = os.path.basename(tmp_file.name).split(self.colon)[0] dest = os.path.join(self._path, subdir, uniq + suffix) - os.rename(tmp_file.name, dest) + try: + if hasattr(os, 'link'): + os.link(tmp_file.name, dest) + os.remove(tmp_file.name) + else: + os.rename(tmp_file.name, dest) + except OSError, e: + os.remove(tmp_file.name) + if e.errno == errno.EEXIST: + raise ExternalClashError('Name clash with existing message: %s' + % dest) + else: + raise if isinstance(message, MaildirMessage): os.utime(dest, (os.path.getatime(dest), message.get_date())) return uniq @@ -367,12 +385,14 @@ def get_folder(self, folder): """Return a Maildir instance for the named folder.""" - return Maildir(os.path.join(self._path, '.' + folder), create=False) + return Maildir(os.path.join(self._path, '.' + folder), + factory=self._factory, + create=False) def add_folder(self, folder): """Create a folder and return a Maildir instance representing it.""" path = os.path.join(self._path, '.' + folder) - result = Maildir(path) + result = Maildir(path, factory=self._factory) maildirfolder_path = os.path.join(path, 'maildirfolder') if not os.path.exists(maildirfolder_path): os.close(os.open(maildirfolder_path, os.O_CREAT | os.O_WRONLY)) @@ -423,12 +443,17 @@ except OSError, e: if e.errno == errno.ENOENT: Maildir._count += 1 - return open(path, 'wb+') + try: + return _create_carefully(path) + except OSError, e: + if e.errno != errno.EEXIST: + raise else: raise - else: - raise ExternalClashError('Name clash prevented file creation: %s' % - path) + + # Fall through to here if stat succeeded or open raised EEXIST. + raise ExternalClashError('Name clash prevented file creation: %s' % + path) def _refresh(self): """Update table of contents mapping.""" @@ -563,7 +588,8 @@ new_file.close() os.remove(new_file.name) raise - new_file.close() + _sync_close(new_file) + # self._file is about to get replaced, so no need to sync. self._file.close() try: os.rename(new_file.name, self._path) @@ -578,7 +604,7 @@ self._toc = new_toc self._pending = False if self._locked: - _lock_file(new_file, dotlock=False) + _lock_file(self._file, dotlock=False) def _pre_mailbox_hook(self, f): """Called before writing the mailbox to file f.""" @@ -597,7 +623,7 @@ self.flush() if self._locked: self.unlock() - self._file.close() + self._file.close() # Sync has been done by self.flush() above. def _lookup(self, key=None): """Return (start, stop) or raise KeyError.""" @@ -787,7 +813,7 @@ if self._locked: _unlock_file(f) finally: - f.close() + _sync_close(f) return new_key def remove(self, key): @@ -834,7 +860,7 @@ if self._locked: _unlock_file(f) finally: - f.close() + _sync_close(f) def get_message(self, key): """Return a Message representation or raise a KeyError.""" @@ -921,7 +947,7 @@ """Unlock the mailbox if it is locked.""" if self._locked: _unlock_file(self._file) - self._file.close() + _sync_close(self._file) del self._file self._locked = False @@ -944,11 +970,13 @@ def get_folder(self, folder): """Return an MH instance for the named folder.""" - return MH(os.path.join(self._path, folder), create=False) + return MH(os.path.join(self._path, folder), + factory=self._factory, create=False) def add_folder(self, folder): """Create a folder and return an MH instance representing it.""" - return MH(os.path.join(self._path, folder)) + return MH(os.path.join(self._path, folder), + factory=self._factory) def remove_folder(self, folder): """Delete the named folder, which must be empty.""" @@ -1016,7 +1044,7 @@ else: f.write('\n') finally: - f.close() + _sync_close(f) def pack(self): """Re-name messages to eliminate numbering gaps. Invalidates keys.""" @@ -1026,27 +1054,13 @@ for key in self.iterkeys(): if key - 1 != prev: changes.append((key, prev + 1)) - f = open(os.path.join(self._path, str(key)), 'r+') - try: - if self._locked: - _lock_file(f) - try: - if hasattr(os, 'link'): - os.link(os.path.join(self._path, str(key)), - os.path.join(self._path, str(prev + 1))) - if sys.platform == 'os2emx': - # cannot unlink an open file on OS/2 - f.close() - os.unlink(os.path.join(self._path, str(key))) - else: - f.close() - os.rename(os.path.join(self._path, str(key)), - os.path.join(self._path, str(prev + 1))) - finally: - if self._locked: - _unlock_file(f) - finally: - f.close() + if hasattr(os, 'link'): + os.link(os.path.join(self._path, str(key)), + os.path.join(self._path, str(prev + 1))) + os.unlink(os.path.join(self._path, str(key))) + else: + os.rename(os.path.join(self._path, str(key)), + os.path.join(self._path, str(prev + 1))) prev += 1 self._next_key = prev + 1 if len(changes) == 0: @@ -1870,6 +1884,16 @@ socket.gethostname(), os.getpid())) +def _sync_flush(f): + """Ensure changes to file f are physically on disk.""" + f.flush() + if hasattr(os, 'fsync'): + os.fsync(f.fileno()) + +def _sync_close(f): + """Close file f, ensuring all changes are physically on disk.""" + _sync_flush(f) + f.close() ## Start: classes from the original module (for backward compatibility). @@ -1948,10 +1972,12 @@ # that the two characters preceding "From " are \n\n or the beginning of # the file. Fixing this would require a more extensive rewrite than is # necessary. For convenience, we've added a PortableUnixMailbox class - # which uses the more lenient _fromlinepattern regular expression. + # which does no checking of the format of the 'From' line. - _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ - r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" + _fromlinepattern = (r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" + r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*" + r"[^\s]*\s*" + "$") _regexp = None def _strict_isrealfromline(self, line): Modified: stackless/branches/release25-maint/Lib/os.py ============================================================================== --- stackless/branches/release25-maint/Lib/os.py (original) +++ stackless/branches/release25-maint/Lib/os.py Sat Apr 14 15:02:57 2007 @@ -156,11 +156,17 @@ recursive. """ + from errno import EEXIST head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): - makedirs(head, mode) + try: + makedirs(head, mode) + except OSError, e: + # be happy if someone already created the path + if e.errno != EEXIST: + raise if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists return mkdir(name, mode) Modified: stackless/branches/release25-maint/Lib/pdb.py ============================================================================== --- stackless/branches/release25-maint/Lib/pdb.py (original) +++ stackless/branches/release25-maint/Lib/pdb.py Sat Apr 14 15:02:57 2007 @@ -474,12 +474,22 @@ def do_condition(self, arg): # arg is breakpoint number and condition args = arg.split(' ', 1) - bpnum = int(args[0].strip()) + try: + bpnum = int(args[0].strip()) + except ValueError: + # something went wrong + print >>self.stdout, \ + 'Breakpoint index %r is not a number' % args[0] + return try: cond = args[1] except: cond = None - bp = bdb.Breakpoint.bpbynumber[bpnum] + try: + bp = bdb.Breakpoint.bpbynumber[bpnum] + except IndexError: + print >>self.stdout, 'Breakpoint index %r is not valid' % args[0] + return if bp: bp.cond = cond if not cond: @@ -489,12 +499,22 @@ def do_ignore(self,arg): """arg is bp number followed by ignore count.""" args = arg.split() - bpnum = int(args[0].strip()) + try: + bpnum = int(args[0].strip()) + except ValueError: + # something went wrong + print >>self.stdout, \ + 'Breakpoint index %r is not a number' % args[0] + return try: count = int(args[1].strip()) except: count = 0 - bp = bdb.Breakpoint.bpbynumber[bpnum] + try: + bp = bdb.Breakpoint.bpbynumber[bpnum] + except IndexError: + print >>self.stdout, 'Breakpoint index %r is not valid' % args[0] + return if bp: bp.ignore = count if count > 0: Modified: stackless/branches/release25-maint/Lib/pstats.py ============================================================================== --- stackless/branches/release25-maint/Lib/pstats.py (original) +++ stackless/branches/release25-maint/Lib/pstats.py Sat Apr 14 15:02:57 2007 @@ -116,7 +116,7 @@ def load_stats(self, arg): if not arg: self.stats = {} - elif type(arg) == type(""): + elif isinstance(arg, basestring): f = open(arg, 'rb') self.stats = marshal.load(f) f.close() Modified: stackless/branches/release25-maint/Lib/pty.py ============================================================================== --- stackless/branches/release25-maint/Lib/pty.py (original) +++ stackless/branches/release25-maint/Lib/pty.py Sat Apr 14 15:02:57 2007 @@ -118,6 +118,12 @@ if (slave_fd > STDERR_FILENO): os.close (slave_fd) + # Explicitly open the tty to make it become a controlling tty. + tmp_fd = os.open(os.ttyname(STDOUT_FILENO), os.O_RDWR) + os.close(tmp_fd) + else: + os.close(slave_fd) + # Parent and child process. return pid, master_fd Modified: stackless/branches/release25-maint/Lib/pydoc.py ============================================================================== --- stackless/branches/release25-maint/Lib/pydoc.py (original) +++ stackless/branches/release25-maint/Lib/pydoc.py Sat Apr 14 15:02:57 2007 @@ -855,7 +855,7 @@ if imclass is not cl: note = ' from ' + self.classlink(imclass, mod) else: - if object.im_self: + if object.im_self is not None: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: @@ -1226,7 +1226,7 @@ if imclass is not cl: note = ' from ' + classname(imclass, mod) else: - if object.im_self: + if object.im_self is not None: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: @@ -1504,6 +1504,7 @@ class Helper: keywords = { 'and': 'BOOLEAN', + 'as': 'with', 'assert': ('ref/assert', ''), 'break': ('ref/break', 'while for'), 'class': ('ref/class', 'CLASSES SPECIALMETHODS'), @@ -1531,6 +1532,7 @@ 'return': ('ref/return', 'FUNCTIONS'), 'try': ('ref/try', 'EXCEPTIONS'), 'while': ('ref/while', 'break continue if TRUTHVALUE'), + 'with': ('ref/with', 'CONTEXTMANAGERS EXCEPTIONS yield'), 'yield': ('ref/yield', ''), } @@ -1612,6 +1614,7 @@ 'LOOPING': ('ref/compound', 'for while break continue'), 'TRUTHVALUE': ('lib/truth', 'if while and or not BASICMETHODS'), 'DEBUGGING': ('lib/module-pdb', 'pdb'), + 'CONTEXTMANAGERS': ('ref/context-managers', 'with'), } def __init__(self, input, output): @@ -1737,6 +1740,9 @@ Sorry, topic and keyword documentation is not available because the Python HTML documentation files could not be found. If you have installed them, please set the environment variable PYTHONDOCS to indicate their location. + +On the Microsoft Windows operating system, the files can be built by +running "hh -decompile . PythonNN.chm" in the C:\PythonNN\Doc> directory. ''') return target = self.topics.get(topic, self.keywords.get(topic)) Modified: stackless/branches/release25-maint/Lib/random.py ============================================================================== --- stackless/branches/release25-maint/Lib/random.py (original) +++ stackless/branches/release25-maint/Lib/random.py Sat Apr 14 15:02:57 2007 @@ -205,7 +205,7 @@ raise ValueError, "empty range for randrange()" if n >= maxwidth: - return istart + self._randbelow(n) + return istart + istep*self._randbelow(n) return istart + istep*int(self.random() * n) def randint(self, a, b): @@ -569,7 +569,7 @@ def betavariate(self, alpha, beta): """Beta distribution. - Conditions on the parameters are alpha > -1 and beta} > -1. + Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1. """ Modified: stackless/branches/release25-maint/Lib/rfc822.py ============================================================================== --- stackless/branches/release25-maint/Lib/rfc822.py (original) +++ stackless/branches/release25-maint/Lib/rfc822.py Sat Apr 14 15:02:57 2007 @@ -854,6 +854,11 @@ if data[0][-1] in (',', '.') or data[0].lower() in _daynames: # There's a dayname here. Skip it del data[0] + else: + # no space after the "weekday,"? + i = data[0].rfind(',') + if i >= 0: + data[0] = data[0][i+1:] if len(data) == 3: # RFC 850 date, deprecated stuff = data[0].split('-') if len(stuff) == 3: Modified: stackless/branches/release25-maint/Lib/sched.py ============================================================================== --- stackless/branches/release25-maint/Lib/sched.py (original) +++ stackless/branches/release25-maint/Lib/sched.py Sat Apr 14 15:02:57 2007 @@ -72,7 +72,7 @@ def empty(self): """Check whether the queue is empty.""" - return not not self.queue + return not self.queue def run(self): """Execute events until the queue is empty. Modified: stackless/branches/release25-maint/Lib/socket.py ============================================================================== --- stackless/branches/release25-maint/Lib/socket.py (original) +++ stackless/branches/release25-maint/Lib/socket.py Sat Apr 14 15:02:57 2007 @@ -139,8 +139,6 @@ __slots__ = [] def _dummy(*args): raise error(EBADF, 'Bad file descriptor') - def close(self): - pass # All _delegate_methods must also be initialized here. send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy __getattr__ = _dummy @@ -159,7 +157,6 @@ setattr(self, method, getattr(_sock, method)) def close(self): - self._sock.close() self._sock = _closedsocket() dummy = self._sock._dummy for method in _delegate_methods: @@ -204,9 +201,10 @@ __slots__ = ["mode", "bufsize", "softspace", # "closed" is a property, see below - "_sock", "_rbufsize", "_wbufsize", "_rbuf", "_wbuf"] + "_sock", "_rbufsize", "_wbufsize", "_rbuf", "_wbuf", + "_close"] - def __init__(self, sock, mode='rb', bufsize=-1): + def __init__(self, sock, mode='rb', bufsize=-1, close=False): self._sock = sock self.mode = mode # Not actually used in this version if bufsize < 0: @@ -222,6 +220,7 @@ self._wbufsize = bufsize self._rbuf = "" # A string self._wbuf = [] # A list of strings + self._close = close def _getclosed(self): return self._sock is None @@ -232,6 +231,8 @@ if self._sock: self.flush() finally: + if self._close: + self._sock.close() self._sock = None def __del__(self): Modified: stackless/branches/release25-maint/Lib/sre.py ============================================================================== --- stackless/branches/release25-maint/Lib/sre.py (original) +++ stackless/branches/release25-maint/Lib/sre.py Sat Apr 14 15:02:57 2007 @@ -8,3 +8,6 @@ from re import * from re import __all__ + +# old pickles expect the _compile() reconstructor in this module +from re import _compile Modified: stackless/branches/release25-maint/Lib/subprocess.py ============================================================================== --- stackless/branches/release25-maint/Lib/subprocess.py (original) +++ stackless/branches/release25-maint/Lib/subprocess.py Sat Apr 14 15:02:57 2007 @@ -166,7 +166,7 @@ communicate(input=None) Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to - terminate. The optional stdin argument should be a string to be + terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child. @@ -499,7 +499,7 @@ if result: result.append(' ') - needquote = (" " in arg) or ("\t" in arg) + needquote = (" " in arg) or ("\t" in arg) or arg == "" if needquote: result.append('"') @@ -592,6 +592,22 @@ c2pread, c2pwrite, errread, errwrite) + # On Windows, you cannot just redirect one or two handles: You + # either have to redirect all three or none. If the subprocess + # user has only redirected one or two handles, we are + # automatically creating PIPEs for the rest. We should close + # these after the process is started. See bug #1124861. + if mswindows: + if stdin is None and p2cwrite is not None: + os.close(p2cwrite) + p2cwrite = None + if stdout is None and c2pread is not None: + os.close(c2pread) + c2pread = None + if stderr is None and errread is not None: + os.close(errread) + errread = None + if p2cwrite: self.stdin = os.fdopen(p2cwrite, 'wb', bufsize) if c2pread: @@ -668,7 +684,9 @@ if stdin is None: p2cread = GetStdHandle(STD_INPUT_HANDLE) - elif stdin == PIPE: + if p2cread is not None: + pass + elif stdin is None or stdin == PIPE: p2cread, p2cwrite = CreatePipe(None, 0) # Detach and turn into fd p2cwrite = p2cwrite.Detach() @@ -682,7 +700,9 @@ if stdout is None: c2pwrite = GetStdHandle(STD_OUTPUT_HANDLE) - elif stdout == PIPE: + if c2pwrite is not None: + pass + elif stdout is None or stdout == PIPE: c2pread, c2pwrite = CreatePipe(None, 0) # Detach and turn into fd c2pread = c2pread.Detach() @@ -696,7 +716,9 @@ if stderr is None: errwrite = GetStdHandle(STD_ERROR_HANDLE) - elif stderr == PIPE: + if errwrite is not None: + pass + elif stderr is None or stderr == PIPE: errread, errwrite = CreatePipe(None, 0) # Detach and turn into fd errread = errread.Detach() @@ -965,6 +987,8 @@ if isinstance(args, types.StringTypes): args = [args] + else: + args = list(args) if shell: args = ["/bin/sh", "-c"] + args @@ -1002,8 +1026,12 @@ # Close pipe fds. Make sure we don't close the same # fd more than once, or standard fds. - for fd in set((p2cread, c2pwrite, errwrite))-set((0,1,2)): - if fd: os.close(fd) + if p2cread and p2cread not in (0,): + os.close(p2cread) + if c2pwrite and c2pwrite not in (p2cread, 1): + os.close(c2pwrite) + if errwrite and errwrite not in (p2cread, c2pwrite, 2): + os.close(errwrite) # Close all other fds, if asked for if close_fds: @@ -1105,6 +1133,7 @@ read_set.append(self.stderr) stderr = [] + input_offset = 0 while read_set or write_set: rlist, wlist, xlist = select.select(read_set, write_set, []) @@ -1112,9 +1141,9 @@ # When select has indicated that the file is writable, # we can write up to PIPE_BUF bytes without risk # blocking. POSIX defines PIPE_BUF >= 512 - bytes_written = os.write(self.stdin.fileno(), input[:512]) - input = input[bytes_written:] - if not input: + bytes_written = os.write(self.stdin.fileno(), buffer(input, input_offset, 512)) + input_offset += bytes_written + if input_offset >= len(input): self.stdin.close() write_set.remove(self.stdin) Modified: stackless/branches/release25-maint/Lib/tarfile.py ============================================================================== --- stackless/branches/release25-maint/Lib/tarfile.py (original) +++ stackless/branches/release25-maint/Lib/tarfile.py Sat Apr 14 15:02:57 2007 @@ -49,6 +49,7 @@ import errno import time import struct +import copy if sys.platform == 'mac': # This module needs work for MacOS9, especially in the area of pathname @@ -136,7 +137,7 @@ def stn(s, length): """Convert a python string to a null-terminated string buffer. """ - return s[:length-1] + (length - len(s) - 1) * NUL + NUL + return s[:length] + (length - len(s)) * NUL def nti(s): """Convert a number field to a python number. @@ -621,140 +622,194 @@ #------------------------ # Extraction file object #------------------------ -class ExFileObject(object): - """File-like object for reading an archive member. - Is returned by TarFile.extractfile(). Support for - sparse files included. +class _FileInFile(object): + """A thin wrapper around an existing file object that + provides a part of its data as an individual file + object. """ - def __init__(self, tarfile, tarinfo): - self.fileobj = tarfile.fileobj - self.name = tarinfo.name - self.mode = "r" - self.closed = False - self.offset = tarinfo.offset_data - self.size = tarinfo.size - self.pos = 0L - self.linebuffer = "" - if tarinfo.issparse(): - self.sparse = tarinfo.sparse - self.read = self._readsparse - else: - self.read = self._readnormal + def __init__(self, fileobj, offset, size, sparse=None): + self.fileobj = fileobj + self.offset = offset + self.size = size + self.sparse = sparse + self.position = 0 - def __read(self, size): - """Overloadable read method. + def tell(self): + """Return the current file position. """ - return self.fileobj.read(size) + return self.position - def readline(self, size=-1): - """Read a line with approx. size. If size is negative, - read a whole line. readline() and read() must not - be mixed up (!). - """ - if size < 0: - size = sys.maxint - - nl = self.linebuffer.find("\n") - if nl >= 0: - nl = min(nl, size) - else: - size -= len(self.linebuffer) - while (nl < 0 and size > 0): - buf = self.read(min(size, 100)) - if not buf: - break - self.linebuffer += buf - size -= len(buf) - nl = self.linebuffer.find("\n") - if nl == -1: - s = self.linebuffer - self.linebuffer = "" - return s - buf = self.linebuffer[:nl] - self.linebuffer = self.linebuffer[nl + 1:] - while buf[-1:] == "\r": - buf = buf[:-1] - return buf + "\n" - - def readlines(self): - """Return a list with all (following) lines. + def seek(self, position): + """Seek to a position in the file. """ - result = [] - while True: - line = self.readline() - if not line: break - result.append(line) - return result + self.position = position - def _readnormal(self, size=None): - """Read operation for regular files. + def read(self, size=None): + """Read data from the file. """ - if self.closed: - raise ValueError("file is closed") - self.fileobj.seek(self.offset + self.pos) - bytesleft = self.size - self.pos if size is None: - bytestoread = bytesleft + size = self.size - self.position else: - bytestoread = min(size, bytesleft) - self.pos += bytestoread - return self.__read(bytestoread) + size = min(size, self.size - self.position) - def _readsparse(self, size=None): - """Read operation for sparse files. - """ - if self.closed: - raise ValueError("file is closed") + if self.sparse is None: + return self.readnormal(size) + else: + return self.readsparse(size) - if size is None: - size = self.size - self.pos + def readnormal(self, size): + """Read operation for regular files. + """ + self.fileobj.seek(self.offset + self.position) + self.position += size + return self.fileobj.read(size) + def readsparse(self, size): + """Read operation for sparse files. + """ data = [] while size > 0: - buf = self._readsparsesection(size) + buf = self.readsparsesection(size) if not buf: break size -= len(buf) data.append(buf) return "".join(data) - def _readsparsesection(self, size): + def readsparsesection(self, size): """Read a single section of a sparse file. """ - section = self.sparse.find(self.pos) + section = self.sparse.find(self.position) if section is None: return "" - toread = min(size, section.offset + section.size - self.pos) + size = min(size, section.offset + section.size - self.position) + if isinstance(section, _data): - realpos = section.realpos + self.pos - section.offset - self.pos += toread + realpos = section.realpos + self.position - section.offset self.fileobj.seek(self.offset + realpos) - return self.__read(toread) + self.position += size + return self.fileobj.read(size) + else: + self.position += size + return NUL * size +#class _FileInFile + + +class ExFileObject(object): + """File-like object for reading an archive member. + Is returned by TarFile.extractfile(). + """ + blocksize = 1024 + + def __init__(self, tarfile, tarinfo): + self.fileobj = _FileInFile(tarfile.fileobj, + tarinfo.offset_data, + tarinfo.size, + getattr(tarinfo, "sparse", None)) + self.name = tarinfo.name + self.mode = "r" + self.closed = False + self.size = tarinfo.size + + self.position = 0 + self.buffer = "" + + def read(self, size=None): + """Read at most size bytes from the file. If size is not + present or None, read all data until EOF is reached. + """ + if self.closed: + raise ValueError("I/O operation on closed file") + + buf = "" + if self.buffer: + if size is None: + buf = self.buffer + self.buffer = "" + else: + buf = self.buffer[:size] + self.buffer = self.buffer[size:] + + if size is None: + buf += self.fileobj.read() else: - self.pos += toread - return NUL * toread + buf += self.fileobj.read(size - len(buf)) + + self.position += len(buf) + return buf + + def readline(self, size=-1): + """Read one entire line from the file. If size is present + and non-negative, return a string with at most that + size, which may be an incomplete line. + """ + if self.closed: + raise ValueError("I/O operation on closed file") + + if "\n" in self.buffer: + pos = self.buffer.find("\n") + 1 + else: + buffers = [self.buffer] + while True: + buf = self.fileobj.read(self.blocksize) + buffers.append(buf) + if not buf or "\n" in buf: + self.buffer = "".join(buffers) + pos = self.buffer.find("\n") + 1 + if pos == 0: + # no newline found. + pos = len(self.buffer) + break + + if size != -1: + pos = min(size, pos) + + buf = self.buffer[:pos] + self.buffer = self.buffer[pos:] + self.position += len(buf) + return buf + + def readlines(self): + """Return a list with all remaining lines. + """ + result = [] + while True: + line = self.readline() + if not line: break + result.append(line) + return result def tell(self): """Return the current file position. """ - return self.pos + if self.closed: + raise ValueError("I/O operation on closed file") + + return self.position - def seek(self, pos, whence=0): + def seek(self, pos, whence=os.SEEK_SET): """Seek to a position in the file. """ - self.linebuffer = "" - if whence == 0: - self.pos = min(max(pos, 0), self.size) - if whence == 1: + if self.closed: + raise ValueError("I/O operation on closed file") + + if whence == os.SEEK_SET: + self.position = min(max(pos, 0), self.size) + elif whence == os.SEEK_CUR: if pos < 0: - self.pos = max(self.pos + pos, 0) + self.position = max(self.position + pos, 0) else: - self.pos = min(self.pos + pos, self.size) - if whence == 2: - self.pos = max(min(self.size + pos, self.size), 0) + self.position = min(self.position + pos, self.size) + elif whence == os.SEEK_END: + self.position = max(min(self.size + pos, self.size), 0) + else: + raise ValueError("Invalid argument") + + self.buffer = "" + self.fileobj.seek(self.position) def close(self): """Close the file object. @@ -762,20 +817,13 @@ self.closed = True def __iter__(self): - """Get an iterator over the file object. + """Get an iterator over the file's lines. """ - if self.closed: - raise ValueError("I/O operation on closed file") - return self - - def next(self): - """Get the next item from the file iterator. - """ - result = self.readline() - if not result: - raise StopIteration - return result - + while True: + line = self.readline() + if not line: + break + yield line #class ExFileObject #------------------ @@ -793,7 +841,6 @@ """Construct a TarInfo object. name is the optional name of the member. """ - self.name = name # member name (dirnames must end with '/') self.mode = 0666 # file permissions self.uid = 0 # user id @@ -807,8 +854,6 @@ self.gname = "group" # group name self.devmajor = 0 # device major number self.devminor = 0 # device minor number - self.prefix = "" # prefix to filename or information - # about sparse files self.offset = 0 # the tar header starts here self.offset_data = 0 # the file's data starts here @@ -840,24 +885,74 @@ tarinfo.gname = buf[297:329].rstrip(NUL) tarinfo.devmajor = nti(buf[329:337]) tarinfo.devminor = nti(buf[337:345]) - tarinfo.prefix = buf[345:500] + prefix = buf[345:500].rstrip(NUL) + + if prefix and not tarinfo.issparse(): + tarinfo.name = prefix + "/" + tarinfo.name if tarinfo.chksum not in calc_chksums(buf): raise ValueError("invalid header") return tarinfo def tobuf(self, posix=False): - """Return a tar header block as a 512 byte string. + """Return a tar header as a string of 512 byte blocks. """ + buf = "" + type = self.type + prefix = "" + + if self.name.endswith("/"): + type = DIRTYPE + + if type in (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK): + # Prevent "././@LongLink" from being normalized. + name = self.name + else: + name = normpath(self.name) + + if type == DIRTYPE: + # directories should end with '/' + name += "/" + + linkname = self.linkname + if linkname: + # if linkname is empty we end up with a '.' + linkname = normpath(linkname) + + if posix: + if self.size > MAXSIZE_MEMBER: + raise ValueError("file is too large (>= 8 GB)") + + if len(self.linkname) > LENGTH_LINK: + raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK)) + + if len(name) > LENGTH_NAME: + prefix = name[:LENGTH_PREFIX + 1] + while prefix and prefix[-1] != "/": + prefix = prefix[:-1] + + name = name[len(prefix):] + prefix = prefix[:-1] + + if not prefix or len(name) > LENGTH_NAME: + raise ValueError("name is too long") + + else: + if len(self.linkname) > LENGTH_LINK: + buf += self._create_gnulong(self.linkname, GNUTYPE_LONGLINK) + + if len(name) > LENGTH_NAME: + buf += self._create_gnulong(name, GNUTYPE_LONGNAME) + parts = [ - stn(self.name, 100), + stn(name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field - self.type, + type, stn(self.linkname, 100), stn(MAGIC, 6), stn(VERSION, 2), @@ -865,15 +960,38 @@ stn(self.gname, 32), itn(self.devmajor, 8, posix), itn(self.devminor, 8, posix), - stn(self.prefix, 155) + stn(prefix, 155) ] - buf = struct.pack("%ds" % BLOCKSIZE, "".join(parts)) - chksum = calc_chksums(buf)[0] - buf = buf[:148] + "%06o\0" % chksum + buf[155:] + buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts)) + chksum = calc_chksums(buf[-BLOCKSIZE:])[0] + buf = buf[:-364] + "%06o\0" % chksum + buf[-357:] self.buf = buf return buf + def _create_gnulong(self, name, type): + """Create a GNU longname/longlink header from name. + It consists of an extended tar header, with the length + of the longname as size, followed by data blocks, + which contain the longname as a null terminated string. + """ + name += NUL + + tarinfo = self.__class__() + tarinfo.name = "././@LongLink" + tarinfo.type = type + tarinfo.mode = 0 + tarinfo.size = len(name) + + # create extended header + buf = tarinfo.tobuf() + # create name blocks + buf += name + blocks, remainder = divmod(len(name), BLOCKSIZE) + if remainder > 0: + buf += (BLOCKSIZE - remainder) * NUL + return buf + def isreg(self): return self.type in REGULAR_TYPES def isfile(self): @@ -926,7 +1044,7 @@ can be determined, `mode' is overridden by `fileobj's mode. `fileobj' is not closed, when TarFile is closed. """ - self.name = name + self.name = os.path.abspath(name) if len(mode) > 1 or mode not in "raw": raise ValueError("mode must be 'r', 'a' or 'w'") @@ -938,7 +1056,7 @@ self._extfileobj = False else: if self.name is None and hasattr(fileobj, "name"): - self.name = fileobj.name + self.name = os.path.abspath(fileobj.name) if hasattr(fileobj, "mode"): self.mode = fileobj.mode self._extfileobj = True @@ -1015,9 +1133,13 @@ # Find out which *open() is appropriate for opening the file. for comptype in cls.OPEN_METH: func = getattr(cls, cls.OPEN_METH[comptype]) + if fileobj is not None: + saved_pos = fileobj.tell() try: return func(name, "r", fileobj) except (ReadError, CompressionError): + if fileobj is not None: + fileobj.seek(saved_pos) continue raise ReadError("file could not be opened successfully") @@ -1074,24 +1196,12 @@ except (ImportError, AttributeError): raise CompressionError("gzip module is not available") - pre, ext = os.path.splitext(name) - pre = os.path.basename(pre) - if ext == ".tgz": - ext = ".tar" - if ext == ".gz": - ext = "" - tarname = pre + ext - if fileobj is None: fileobj = file(name, mode + "b") - if mode != "r": - name = tarname - try: - t = cls.taropen(tarname, mode, - gzip.GzipFile(name, mode, compresslevel, fileobj) - ) + t = cls.taropen(name, mode, + gzip.GzipFile(name, mode, compresslevel, fileobj)) except IOError: raise ReadError("not a gzip file") t._extfileobj = False @@ -1110,21 +1220,13 @@ except ImportError: raise CompressionError("bz2 module is not available") - pre, ext = os.path.splitext(name) - pre = os.path.basename(pre) - if ext == ".tbz2": - ext = ".tar" - if ext == ".bz2": - ext = "" - tarname = pre + ext - if fileobj is not None: fileobj = _BZ2Proxy(fileobj, mode) else: fileobj = bz2.BZ2File(name, mode, compresslevel=compresslevel) try: - t = cls.taropen(tarname, mode, fileobj) + t = cls.taropen(name, mode, fileobj) except IOError: raise ReadError("not a bzip2 file") t._extfileobj = False @@ -1329,8 +1431,7 @@ arcname = name # Skip if somebody tries to archive the archive... - if self.name is not None \ - and os.path.abspath(name) == os.path.abspath(self.name): + if self.name is not None and os.path.abspath(name) == self.name: self._dbg(2, "tarfile: Skipped %r" % name) return @@ -1377,50 +1478,11 @@ """ self._check("aw") - tarinfo.name = normpath(tarinfo.name) - if tarinfo.isdir(): - # directories should end with '/' - tarinfo.name += "/" + tarinfo = copy.copy(tarinfo) - if tarinfo.linkname: - tarinfo.linkname = normpath(tarinfo.linkname) - - if tarinfo.size > MAXSIZE_MEMBER: - if self.posix: - raise ValueError("file is too large (>= 8 GB)") - else: - self._dbg(2, "tarfile: Created GNU tar largefile header") - - - if len(tarinfo.linkname) > LENGTH_LINK: - if self.posix: - raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK)) - else: - self._create_gnulong(tarinfo.linkname, GNUTYPE_LONGLINK) - tarinfo.linkname = tarinfo.linkname[:LENGTH_LINK -1] - self._dbg(2, "tarfile: Created GNU tar extension LONGLINK") - - if len(tarinfo.name) > LENGTH_NAME: - if self.posix: - prefix = tarinfo.name[:LENGTH_PREFIX + 1] - while prefix and prefix[-1] != "/": - prefix = prefix[:-1] - - name = tarinfo.name[len(prefix):] - prefix = prefix[:-1] - - if not prefix or len(name) > LENGTH_NAME: - raise ValueError("name is too long (>%d)" % (LENGTH_NAME)) - - tarinfo.name = name - tarinfo.prefix = prefix - else: - self._create_gnulong(tarinfo.name, GNUTYPE_LONGNAME) - tarinfo.name = tarinfo.name[:LENGTH_NAME - 1] - self._dbg(2, "tarfile: Created GNU tar extension LONGNAME") - - self.fileobj.write(tarinfo.tobuf(self.posix)) - self.offset += BLOCKSIZE + buf = tarinfo.tobuf(self.posix) + self.fileobj.write(buf) + self.offset += len(buf) # If there's data to follow, append it. if fileobj is not None: @@ -1779,12 +1841,6 @@ if tarinfo.isreg() and tarinfo.name.endswith("/"): tarinfo.type = DIRTYPE - # The prefix field is used for filenames > 100 in - # the POSIX standard. - # name = prefix + '/' + name - tarinfo.name = normpath(os.path.join(tarinfo.prefix.rstrip(NUL), - tarinfo.name)) - # Directory names should have a '/' at the end. if tarinfo.isdir(): tarinfo.name += "/" @@ -1909,10 +1965,6 @@ self.offset += self._block(tarinfo.size) tarinfo.size = origsize - # Clear the prefix field so that it is not used - # as a pathname in next(). - tarinfo.prefix = "" - return tarinfo #-------------------------------------------------------------------------- @@ -1970,31 +2022,6 @@ else: return TarIter(self) - def _create_gnulong(self, name, type): - """Write a GNU longname/longlink member to the TarFile. - It consists of an extended tar header, with the length - of the longname as size, followed by data blocks, - which contain the longname as a null terminated string. - """ - name += NUL - - tarinfo = TarInfo() - tarinfo.name = "././@LongLink" - tarinfo.type = type - tarinfo.mode = 0 - tarinfo.size = len(name) - - # write extended header - self.fileobj.write(tarinfo.tobuf()) - self.offset += BLOCKSIZE - # write name blocks - self.fileobj.write(name) - blocks, remainder = divmod(tarinfo.size, BLOCKSIZE) - if remainder > 0: - self.fileobj.write(NUL * (BLOCKSIZE - remainder)) - blocks += 1 - self.offset += blocks * BLOCKSIZE - def _dbg(self, level, msg): """Write debugging output to sys.stderr. """ Modified: stackless/branches/release25-maint/Lib/test/crashers/weakref_in_del.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/crashers/weakref_in_del.py (original) +++ stackless/branches/release25-maint/Lib/test/crashers/weakref_in_del.py Sat Apr 14 15:02:57 2007 @@ -1,11 +1,12 @@ import weakref # http://python.org/sf/1377858 +# Fixed for new-style classes in 2.5c1. ref = None def test_weakref_in_del(): - class Target(object): + class Target(): def __del__(self): global ref ref = weakref.ref(self) Modified: stackless/branches/release25-maint/Lib/test/pickletester.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/pickletester.py (original) +++ stackless/branches/release25-maint/Lib/test/pickletester.py Sat Apr 14 15:02:57 2007 @@ -831,6 +831,24 @@ y = self.loads(s) self.assertEqual(y._proto, None) + def test_reduce_ex_calls_base(self): + for proto in 0, 1, 2: + x = REX_four() + self.assertEqual(x._proto, None) + s = self.dumps(x, proto) + self.assertEqual(x._proto, proto) + y = self.loads(s) + self.assertEqual(y._proto, proto) + + def test_reduce_calls_base(self): + for proto in 0, 1, 2: + x = REX_five() + self.assertEqual(x._reduce_called, 0) + s = self.dumps(x, proto) + self.assertEqual(x._reduce_called, 1) + y = self.loads(s) + self.assertEqual(y._reduce_called, 1) + # Test classes for reduce_ex class REX_one(object): @@ -855,6 +873,20 @@ def __reduce__(self): raise TestFailed, "This __reduce__ shouldn't be called" +class REX_four(object): + _proto = None + def __reduce_ex__(self, proto): + self._proto = proto + return object.__reduce_ex__(self, proto) + # Calling base class method should succeed + +class REX_five(object): + _reduce_called = 0 + def __reduce__(self): + self._reduce_called = 1 + return object.__reduce__(self) + # This one used to fail with infinite recursion + # Test classes for newobj class MyInt(int): Modified: stackless/branches/release25-maint/Lib/test/regrtest.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/regrtest.py (original) +++ stackless/branches/release25-maint/Lib/test/regrtest.py Sat Apr 14 15:02:57 2007 @@ -474,6 +474,9 @@ 'test_builtin', 'test_exceptions', 'test_types', + 'test_unittest', + 'test_doctest', + 'test_doctest2', ] NOTTESTS = [ Modified: stackless/branches/release25-maint/Lib/test/test_array.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_array.py (original) +++ stackless/branches/release25-maint/Lib/test/test_array.py Sat Apr 14 15:02:57 2007 @@ -12,6 +12,10 @@ class ArraySubclass(array.array): pass +class ArraySubclassWithKwargs(array.array): + def __init__(self, typecode, newarg=None): + array.array.__init__(typecode) + tests = [] # list to accumulate all tests typecodes = "cubBhHiIlLfd" @@ -85,6 +89,13 @@ self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) + def test_deepcopy(self): + import copy + a = array.array(self.typecode, self.example) + b = copy.deepcopy(a) + self.assertNotEqual(id(a), id(b)) + self.assertEqual(a, b) + def test_pickle(self): for protocol in (0, 1, 2): a = array.array(self.typecode, self.example) @@ -100,6 +111,21 @@ self.assertEqual(a.x, b.x) self.assertEqual(type(a), type(b)) + def test_pickle_for_empty_array(self): + for protocol in (0, 1, 2): + a = array.array(self.typecode) + b = loads(dumps(a, protocol)) + self.assertNotEqual(id(a), id(b)) + self.assertEqual(a, b) + + a = ArraySubclass(self.typecode) + a.x = 10 + b = loads(dumps(a, protocol)) + self.assertNotEqual(id(a), id(b)) + self.assertEqual(a, b) + self.assertEqual(a.x, b.x) + self.assertEqual(type(a), type(b)) + def test_insert(self): a = array.array(self.typecode, self.example) a.insert(0, self.example[0]) @@ -676,6 +702,9 @@ b = array.array('B', range(64)) self.assertEqual(rc, sys.getrefcount(10)) + def test_subclass_with_kwargs(self): + # SF bug #1486663 -- this used to erroneously raise a TypeError + ArraySubclassWithKwargs('b', newarg=1) class StringTest(BaseTest): Modified: stackless/branches/release25-maint/Lib/test/test_binascii.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_binascii.py (original) +++ stackless/branches/release25-maint/Lib/test/test_binascii.py Sat Apr 14 15:02:57 2007 @@ -134,7 +134,7 @@ pass else: self.fail("binascii.a2b_qp(**{1:1}) didn't raise TypeError") - self.assertEqual(binascii.a2b_qp("= "), "") + self.assertEqual(binascii.a2b_qp("= "), "= ") self.assertEqual(binascii.a2b_qp("=="), "=") self.assertEqual(binascii.a2b_qp("=AX"), "=AX") self.assertRaises(TypeError, binascii.b2a_qp, foo="bar") Modified: stackless/branches/release25-maint/Lib/test/test_builtin.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_builtin.py (original) +++ stackless/branches/release25-maint/Lib/test/test_builtin.py Sat Apr 14 15:02:57 2007 @@ -1017,6 +1017,11 @@ self.assertRaises(ValueError, long, '53', 40) self.assertRaises(TypeError, long, 1, 12) + # SF patch #1638879: embedded NULs were not detected with + # explicit base + self.assertRaises(ValueError, long, '123\0', 10) + self.assertRaises(ValueError, long, '123\x00 245', 20) + self.assertEqual(long('100000000000000000000000000000000', 2), 4294967296) self.assertEqual(long('102002022201221111211', 3), 4294967296) Modified: stackless/branches/release25-maint/Lib/test/test_class.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_class.py (original) +++ stackless/branches/release25-maint/Lib/test/test_class.py Sat Apr 14 15:02:57 2007 @@ -172,6 +172,14 @@ # List/dict operations +class Empty: pass + +try: + 1 in Empty() + print 'failed, should have raised TypeError' +except TypeError: + pass + 1 in testme testme[1] Modified: stackless/branches/release25-maint/Lib/test/test_cmd_line.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_cmd_line.py (original) +++ stackless/branches/release25-maint/Lib/test/test_cmd_line.py Sat Apr 14 15:02:57 2007 @@ -6,7 +6,7 @@ class CmdLineTest(unittest.TestCase): def start_python(self, cmd_line): - outfp, infp = popen2.popen4('%s %s' % (sys.executable, cmd_line)) + outfp, infp = popen2.popen4('"%s" %s' % (sys.executable, cmd_line)) infp.close() data = outfp.read() outfp.close() Modified: stackless/branches/release25-maint/Lib/test/test_codecs.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_codecs.py (original) +++ stackless/branches/release25-maint/Lib/test/test_codecs.py Sat Apr 14 15:02:57 2007 @@ -1,3 +1,4 @@ +from __future__ import with_statement from test import test_support import unittest import codecs @@ -425,6 +426,10 @@ ] ) + def test_bug1601501(self): + # SF bug #1601501: check that the codec works with a buffer + unicode("\xef\xbb\xbf", "utf-8-sig") + class EscapeDecodeTest(unittest.TestCase): def test_empty(self): self.assertEquals(codecs.escape_decode(""), ("", 0)) @@ -910,6 +915,18 @@ f = self.reader(self.stream) self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00']) +class EncodedFileTest(unittest.TestCase): + + def test_basic(self): + f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80') + ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8') + self.assertEquals(ef.read(), '\\\xd5\n\x00\x00\xae') + + f = StringIO.StringIO() + ef = codecs.EncodedFile(f, 'utf-8', 'latin1') + ef.write('\xc3\xbc') + self.assertEquals(f.getvalue(), '\xfc') + class Str2StrTest(unittest.TestCase): def test_read(self): @@ -1050,6 +1067,7 @@ "punycode", "unicode_internal" ] +broken_incremental_coders = broken_unicode_with_streams[:] try: import bz2 @@ -1099,6 +1117,7 @@ decodedresult += reader.read() self.assertEqual(decodedresult, s, "%r != %r (encoding=%r)" % (decodedresult, s, encoding)) + if encoding not in broken_incremental_coders: # check incremental decoder/encoder (fetched via the Python # and C API) and iterencode()/iterdecode() try: @@ -1214,6 +1233,19 @@ (u"", len(allbytes)) ) +class WithStmtTest(unittest.TestCase): + def test_encodedfile(self): + f = StringIO.StringIO("\xc3\xbc") + with codecs.EncodedFile(f, "latin-1", "utf-8") as ef: + self.assertEquals(ef.read(), "\xfc") + + def test_streamreaderwriter(self): + f = StringIO.StringIO("\xc3\xbc") + info = codecs.lookup("utf-8") + with codecs.StreamReaderWriter(f, info.streamreader, + info.streamwriter, 'strict') as srw: + self.assertEquals(srw.read(), u"\xfc") + def test_main(): test_support.run_unittest( @@ -1234,10 +1266,12 @@ IDNACodecTest, CodecsModuleTest, StreamReaderTest, + EncodedFileTest, Str2StrTest, BasicUnicodeTest, BasicStrTest, - CharmapTest + CharmapTest, + WithStmtTest, ) Modified: stackless/branches/release25-maint/Lib/test/test_compiler.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_compiler.py (original) +++ stackless/branches/release25-maint/Lib/test/test_compiler.py Sat Apr 14 15:02:57 2007 @@ -7,6 +7,12 @@ # How much time in seconds can pass before we print a 'Still working' message. _PRINT_WORKING_MSG_INTERVAL = 5 * 60 +class TrivialContext(object): + def __enter__(self): + return self + def __exit__(self, *exc_info): + pass + class CompilerTest(unittest.TestCase): def testCompileLibrary(self): @@ -123,6 +129,31 @@ 'eval') self.assertEquals(eval(c), [(0, 3), (1, 3), (2, 3)]) + def testWith(self): + # SF bug 1638243 + c = compiler.compile('from __future__ import with_statement\n' + 'def f():\n' + ' with TrivialContext():\n' + ' return 1\n' + 'result = f()', + '', + 'exec' ) + dct = {'TrivialContext': TrivialContext} + exec c in dct + self.assertEquals(dct.get('result'), 1) + + def testWithAss(self): + c = compiler.compile('from __future__ import with_statement\n' + 'def f():\n' + ' with TrivialContext() as tc:\n' + ' return 1\n' + 'result = f()', + '', + 'exec' ) + dct = {'TrivialContext': TrivialContext} + exec c in dct + self.assertEquals(dct.get('result'), 1) + NOLINENO = (compiler.ast.Module, compiler.ast.Stmt, compiler.ast.Discard) Modified: stackless/branches/release25-maint/Lib/test/test_curses.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_curses.py (original) +++ stackless/branches/release25-maint/Lib/test/test_curses.py Sat Apr 14 15:02:57 2007 @@ -241,12 +241,21 @@ except curses.panel.error: pass +def test_resize_term(stdscr): + if hasattr(curses, 'resizeterm'): + lines, cols = curses.LINES, curses.COLS + curses.resizeterm(lines - 1, cols + 1) + + if curses.LINES != lines - 1 or curses.COLS != cols + 1: + raise RuntimeError, "Expected resizeterm to update LINES and COLS" + def main(stdscr): curses.savetty() try: module_funcs(stdscr) window_funcs(stdscr) test_userptr_without_set(stdscr) + test_resize_term(stdscr) finally: curses.resetty() Modified: stackless/branches/release25-maint/Lib/test/test_datetime.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_datetime.py (original) +++ stackless/branches/release25-maint/Lib/test/test_datetime.py Sat Apr 14 15:02:57 2007 @@ -3,6 +3,7 @@ See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases """ +import os import sys import pickle import cPickle @@ -1425,6 +1426,21 @@ self.assertRaises(ValueError, self.theclass.utcfromtimestamp, insane) + def test_negative_float_fromtimestamp(self): + # Windows doesn't accept negative timestamps + if os.name == "nt": + return + # The result is tz-dependent; at least test that this doesn't + # fail (like it did before bug 1646728 was fixed). + self.theclass.fromtimestamp(-1.05) + + def test_negative_float_utcfromtimestamp(self): + # Windows doesn't accept negative timestamps + if os.name == "nt": + return + d = self.theclass.utcfromtimestamp(-1.05) + self.assertEquals(d, self.theclass(1969, 12, 31, 23, 59, 58, 950000)) + def test_utcnow(self): import time Modified: stackless/branches/release25-maint/Lib/test/test_dbm.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_dbm.py (original) +++ stackless/branches/release25-maint/Lib/test/test_dbm.py Sat Apr 14 15:02:57 2007 @@ -6,11 +6,11 @@ import random import dbm from dbm import error -from test.test_support import verbose, verify, TestSkipped +from test.test_support import verbose, verify, TestSkipped, TESTFN # make filename unique to allow multiple concurrent tests # and to minimize the likelihood of a problem from an old file -filename = '/tmp/delete_me_' + str(random.random())[-6:] +filename = TESTFN def cleanup(): for suffix in ['', '.pag', '.dir', '.db']: Modified: stackless/branches/release25-maint/Lib/test/test_defaultdict.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_defaultdict.py (original) +++ stackless/branches/release25-maint/Lib/test/test_defaultdict.py Sat Apr 14 15:02:57 2007 @@ -47,6 +47,7 @@ self.assertEqual(err.args, (15,)) else: self.fail("d2[15] didn't raise KeyError") + self.assertRaises(TypeError, defaultdict, 1) def test_missing(self): d1 = defaultdict() @@ -60,10 +61,10 @@ self.assertEqual(repr(d1), "defaultdict(None, {})") d1[11] = 41 self.assertEqual(repr(d1), "defaultdict(None, {11: 41})") - d2 = defaultdict(0) - self.assertEqual(d2.default_factory, 0) + d2 = defaultdict(int) + self.assertEqual(d2.default_factory, int) d2[12] = 42 - self.assertEqual(repr(d2), "defaultdict(0, {12: 42})") + self.assertEqual(repr(d2), "defaultdict(, {12: 42})") def foo(): return 43 d3 = defaultdict(foo) self.assert_(d3.default_factory is foo) @@ -131,6 +132,15 @@ self.assertEqual(d2.default_factory, list) self.assertEqual(d2, d1) + def test_keyerror_without_factory(self): + d1 = defaultdict() + try: + d1[(1,)] + except KeyError, err: + self.assertEqual(err.message, (1,)) + else: + self.fail("expected KeyError") + def test_main(): test_support.run_unittest(TestDefaultDict) Modified: stackless/branches/release25-maint/Lib/test/test_deque.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_deque.py (original) +++ stackless/branches/release25-maint/Lib/test/test_deque.py Sat Apr 14 15:02:57 2007 @@ -396,6 +396,12 @@ d.pop() self.assertRaises(RuntimeError, it.next) + def test_runtime_error_on_empty_deque(self): + d = deque() + it = iter(d) + d.append(10) + self.assertRaises(RuntimeError, it.next) + class Deque(deque): pass @@ -480,6 +486,16 @@ d1 == d2 # not clear if this is supposed to be True or False, # but it used to give a SystemError + +class SubclassWithKwargs(deque): + def __init__(self, newarg=1): + deque.__init__(self) + +class TestSubclassWithKwargs(unittest.TestCase): + def test_subclass_with_kwargs(self): + # SF bug #1486663 -- this used to erroneously raise a TypeError + SubclassWithKwargs(newarg=1) + #============================================================================== libreftest = """ @@ -593,6 +609,7 @@ TestBasic, TestVariousIteratorArgs, TestSubclass, + TestSubclassWithKwargs, ) test_support.run_unittest(*test_classes) Modified: stackless/branches/release25-maint/Lib/test/test_descr.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_descr.py (original) +++ stackless/branches/release25-maint/Lib/test/test_descr.py Sat Apr 14 15:02:57 2007 @@ -1210,6 +1210,29 @@ class C(object): __slots__ = ["a", "a_b", "_a", "A0123456789Z"] + # Test unicode slot names + try: + unichr + except NameError: + pass + else: + # _unicode_to_string used to modify slots in certain circumstances + slots = (unicode("foo"), unicode("bar")) + class C(object): + __slots__ = slots + x = C() + x.foo = 5 + vereq(x.foo, 5) + veris(type(slots[0]), unicode) + # this used to leak references + try: + class C(object): + __slots__ = [unichr(128)] + except (TypeError, UnicodeEncodeError): + pass + else: + raise TestFailed, "[unichr(128)] slots not caught" + # Test leaks class Counted(object): counter = 0 # counts the number of instances alive @@ -4143,6 +4166,19 @@ check(iexpr, c, N1) check(iexpr, c, N2) +def test_assign_slice(): + # ceval.c's assign_slice used to check for + # tp->tp_as_sequence->sq_slice instead of + # tp->tp_as_sequence->sq_ass_slice + + class C(object): + def __setslice__(self, start, stop, value): + self.value = value + + c = C() + c[1:2] = 3 + vereq(c.value, 3) + def test_main(): weakref_segfault() # Must be first, somehow wrapper_segfault() @@ -4239,6 +4275,7 @@ test_init() methodwrapper() notimplemented() + test_assign_slice() if verbose: print "All OK" Modified: stackless/branches/release25-maint/Lib/test/test_dict.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_dict.py (original) +++ stackless/branches/release25-maint/Lib/test/test_dict.py Sat Apr 14 15:02:57 2007 @@ -189,6 +189,14 @@ self.assertRaises(ValueError, {}.update, [(1, 2, 3)]) + # SF #1615701: make d.update(m) honor __getitem__() and keys() in dict subclasses + class KeyUpperDict(dict): + def __getitem__(self, key): + return key.upper() + d.clear() + d.update(KeyUpperDict.fromkeys('abc')) + self.assertEqual(d, {'a':'A', 'b':'B', 'c':'C'}) + def test_fromkeys(self): self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = {} @@ -422,7 +430,7 @@ except RuntimeError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("e[42] didn't raise RuntimeError") + self.fail("e[42] didn't raise RuntimeError") class F(dict): def __init__(self): # An instance variable __missing__ should have no effect @@ -433,7 +441,7 @@ except KeyError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("f[42] didn't raise KeyError") + self.fail("f[42] didn't raise KeyError") class G(dict): pass g = G() @@ -442,7 +450,17 @@ except KeyError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("g[42] didn't raise KeyError") + self.fail("g[42] didn't raise KeyError") + + def test_tuple_keyerror(self): + # SF #1576657 + d = {} + try: + d[(1,)] + except KeyError, e: + self.assertEqual(e.args, ((1,),)) + else: + self.fail("missing KeyError") from test import mapping_tests Modified: stackless/branches/release25-maint/Lib/test/test_exceptions.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_exceptions.py (original) +++ stackless/branches/release25-maint/Lib/test/test_exceptions.py Sat Apr 14 15:02:57 2007 @@ -183,6 +183,19 @@ test_capi1() test_capi2() + def test_WindowsError(self): + try: + WindowsError + except NameError: + pass + else: + self.failUnlessEqual(str(WindowsError(1001)), + "1001") + self.failUnlessEqual(str(WindowsError(1001, "message")), + "[Error 1001] message") + self.failUnlessEqual(WindowsError(1001, "message").errno, 22) + self.failUnlessEqual(WindowsError(1001, "message").winerror, 1001) + def testAttributes(self): # test that exception attributes are happy Modified: stackless/branches/release25-maint/Lib/test/test_functools.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_functools.py (original) +++ stackless/branches/release25-maint/Lib/test/test_functools.py Sat Apr 14 15:02:57 2007 @@ -210,6 +210,13 @@ self.assertEqual(wrapper.attr, 'This is a different test') self.assertEqual(wrapper.dict_attr, f.dict_attr) + def test_builtin_update(self): + # Test for bug #1576241 + def wrapper(): + pass + functools.update_wrapper(wrapper, max) + self.assertEqual(wrapper.__name__, 'max') + self.assert_(wrapper.__doc__.startswith('max(')) class TestWraps(TestUpdateWrapper): Modified: stackless/branches/release25-maint/Lib/test/test_gdbm.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_gdbm.py (original) +++ stackless/branches/release25-maint/Lib/test/test_gdbm.py Sat Apr 14 15:02:57 2007 @@ -5,9 +5,9 @@ import gdbm from gdbm import error -from test.test_support import verbose, verify, TestFailed +from test.test_support import verbose, verify, TestFailed, TESTFN -filename= '/tmp/delete_me' +filename = TESTFN g = gdbm.open(filename, 'c') verify(g.keys() == []) Modified: stackless/branches/release25-maint/Lib/test/test_grammar.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_grammar.py (original) +++ stackless/branches/release25-maint/Lib/test/test_grammar.py Sat Apr 14 15:02:57 2007 @@ -709,6 +709,7 @@ x = `x` x = `1 or 2 or 3` +x = `1,2` x = x x = 'x' x = 123 Modified: stackless/branches/release25-maint/Lib/test/test_heapq.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_heapq.py (original) +++ stackless/branches/release25-maint/Lib/test/test_heapq.py Sat Apr 14 15:02:57 2007 @@ -104,20 +104,20 @@ self.assertEqual(heap_sorted, sorted(data)) def test_nsmallest(self): - data = [random.randrange(2000) for i in range(1000)] - f = lambda x: x * 547 % 2000 - for n in (0, 1, 2, 10, 100, 400, 999, 1000, 1100): - self.assertEqual(nsmallest(n, data), sorted(data)[:n]) - self.assertEqual(nsmallest(n, data, key=f), - sorted(data, key=f)[:n]) + data = [(random.randrange(2000), i) for i in range(1000)] + for f in (None, lambda x: x[0] * 547 % 2000): + for n in (0, 1, 2, 10, 100, 400, 999, 1000, 1100): + self.assertEqual(nsmallest(n, data), sorted(data)[:n]) + self.assertEqual(nsmallest(n, data, key=f), + sorted(data, key=f)[:n]) def test_nlargest(self): - data = [random.randrange(2000) for i in range(1000)] - f = lambda x: x * 547 % 2000 - for n in (0, 1, 2, 10, 100, 400, 999, 1000, 1100): - self.assertEqual(nlargest(n, data), sorted(data, reverse=True)[:n]) - self.assertEqual(nlargest(n, data, key=f), - sorted(data, key=f, reverse=True)[:n]) + data = [(random.randrange(2000), i) for i in range(1000)] + for f in (None, lambda x: x[0] * 547 % 2000): + for n in (0, 1, 2, 10, 100, 400, 999, 1000, 1100): + self.assertEqual(nlargest(n, data), sorted(data, reverse=True)[:n]) + self.assertEqual(nlargest(n, data, key=f), + sorted(data, key=f, reverse=True)[:n]) #============================================================================== Modified: stackless/branches/release25-maint/Lib/test/test_import.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_import.py (original) +++ stackless/branches/release25-maint/Lib/test/test_import.py Sat Apr 14 15:02:57 2007 @@ -222,3 +222,15 @@ warnings.filters = oldfilters test_import_initless_directory_warning() + +def test_infinite_reload(): + # Bug #742342 reports that Python segfaults (infinite recursion in C) + # when faced with self-recursive reload()ing. + + sys.path.insert(0, os.path.dirname(__file__)) + try: + import infinite_reload + finally: + sys.path.pop(0) + +test_infinite_reload() Modified: stackless/branches/release25-maint/Lib/test/test_itertools.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_itertools.py (original) +++ stackless/branches/release25-maint/Lib/test/test_itertools.py Sat Apr 14 15:02:57 2007 @@ -52,8 +52,7 @@ self.assertEqual(take(2, zip('abc',count(3))), [('a', 3), ('b', 4)]) self.assertRaises(TypeError, count, 2, 3) self.assertRaises(TypeError, count, 'a') - c = count(sys.maxint-2) # verify that rollover doesn't crash - c.next(); c.next(); c.next(); c.next(); c.next() + self.assertRaises(OverflowError, list, islice(count(sys.maxint-5), 10)) c = count(3) self.assertEqual(repr(c), 'count(3)') c.next() @@ -740,6 +739,21 @@ self.assertRaises(AssertionError, list, cycle(gen1())) self.assertEqual(hist, [0,1]) +class SubclassWithKwargsTest(unittest.TestCase): + def test_keywords_in_subclass(self): + # count is not subclassable... + for cls in (repeat, izip, ifilter, ifilterfalse, chain, imap, + starmap, islice, takewhile, dropwhile, cycle): + class Subclass(cls): + def __init__(self, newarg=None, *args): + cls.__init__(self, *args) + try: + Subclass(newarg=1) + except TypeError, err: + # we expect type errors because of wrong argument count + self.failIf("does not take keyword arguments" in err.args[0]) + + libreftest = """ Doctest for examples in the library reference: libitertools.tex @@ -934,7 +948,8 @@ def test_main(verbose=None): test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC, - RegressionTests, LengthTransparency) + RegressionTests, LengthTransparency, + SubclassWithKwargsTest) test_support.run_unittest(*test_classes) # verify reference counting Modified: stackless/branches/release25-maint/Lib/test/test_logging.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_logging.py (original) +++ stackless/branches/release25-maint/Lib/test/test_logging.py Sat Apr 14 15:02:57 2007 @@ -555,6 +555,8 @@ except KeyError: logging.exception("just testing") os.remove(fn) + hdlr = logging.getLogger().handlers[0] + logging.getLogger().handlers.remove(hdlr) finally: logging._acquireLock() try: Modified: stackless/branches/release25-maint/Lib/test/test_mailbox.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_mailbox.py (original) +++ stackless/branches/release25-maint/Lib/test/test_mailbox.py Sat Apr 14 15:02:57 2007 @@ -673,6 +673,19 @@ self._box.lock() self._box.unlock() + def test_folder (self): + # Test for bug #1569790: verify that folders returned by .get_folder() + # use the same factory function. + def dummy_factory (s): + return None + box = self._factory(self._path, factory=dummy_factory) + folder = box.add_folder('folder1') + self.assert_(folder._factory is dummy_factory) + + folder1_alias = box.get_folder('folder1') + self.assert_(folder1_alias._factory is dummy_factory) + + class _TestMboxMMDF(TestMailbox): @@ -747,6 +760,22 @@ self._box.lock() self._box.unlock() + def test_relock(self): + # Test case for bug #1575506: the mailbox class was locking the + # wrong file object in its flush() method. + msg = "Subject: sub\n\nbody\n" + key1 = self._box.add(msg) + self._box.flush() + self._box.close() + + self._box = self._factory(self._path) + self._box.lock() + key2 = self._box.add(msg) + self._box.flush() + self.assert_(self._box._locked) + self._box.close() + + class TestMbox(_TestMboxMMDF): @@ -773,7 +802,11 @@ def test_get_folder(self): # Open folders - self._box.add_folder('foo.bar') + def dummy_factory (s): + return None + self._box = self._factory(self._path, dummy_factory) + + new_folder = self._box.add_folder('foo.bar') folder0 = self._box.get_folder('foo.bar') folder0.add(self._template % 'bar') self.assert_(os.path.isdir(os.path.join(self._path, 'foo.bar'))) @@ -781,6 +814,11 @@ self.assert_(folder1.get_string(folder1.keys()[0]) == \ self._template % 'bar') + # Test for bug #1569790: verify that folders returned by .get_folder() + # use the same factory function. + self.assert_(new_folder._factory is self._box._factory) + self.assert_(folder0._factory is self._box._factory) + def test_add_and_remove_folders(self): # Delete folders self._box.add_folder('one') @@ -849,6 +887,21 @@ self.assert_(self._box.get_sequences() == {'foo':[1, 2, 3], 'unseen':[1], 'bar':[3], 'replied':[3]}) + # Test case for packing while holding the mailbox locked. + key0 = self._box.add(msg1) + key1 = self._box.add(msg1) + key2 = self._box.add(msg1) + key3 = self._box.add(msg1) + + self._box.remove(key0) + self._box.remove(key2) + self._box.lock() + self._box.pack() + self._box.unlock() + self.assert_(self._box.get_sequences() == + {'foo':[1, 2, 3, 4, 5], + 'unseen':[1], 'bar':[3], 'replied':[3]}) + def _get_lock_path(self): return os.path.join(self._path, '.mh_sequences.lock') Modified: stackless/branches/release25-maint/Lib/test/test_nis.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_nis.py (original) +++ stackless/branches/release25-maint/Lib/test/test_nis.py Sat Apr 14 15:02:57 2007 @@ -11,6 +11,13 @@ # only do this if running under the regression suite raise TestSkipped, msg +try: + # On some systems, this map is only accessible to the + # super user + maps.remove("passwd.adjunct.byname") +except ValueError: + pass + done = 0 for nismap in maps: if verbose: Modified: stackless/branches/release25-maint/Lib/test/test_old_mailbox.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_old_mailbox.py (original) +++ stackless/branches/release25-maint/Lib/test/test_old_mailbox.py Sat Apr 14 15:02:57 2007 @@ -109,11 +109,44 @@ self.assertEqual(len(str(msg)), len(FROM_)+len(DUMMY_MESSAGE)) self.assertEqual(n, 1) +class MboxTestCase(unittest.TestCase): + def setUp(self): + # create a new maildir mailbox to work with: + self._path = test_support.TESTFN + + def tearDown(self): + os.unlink(self._path) + + def test_from_regex (self): + # Testing new regex from bug #1633678 + f = open(self._path, 'w') + f.write("""From fred at example.com Mon May 31 13:24:50 2004 +0200 +Subject: message 1 + +body1 +From fred at example.com Mon May 31 13:24:50 2004 -0200 +Subject: message 2 + +body2 +From fred at example.com Mon May 31 13:24:50 2004 +Subject: message 3 + +body3 +From fred at example.com Mon May 31 13:24:50 2004 +Subject: message 4 + +body4 +""") + f.close() + box = mailbox.UnixMailbox(open(self._path, 'r')) + self.assert_(len(list(iter(box))) == 4) + + # XXX We still need more tests! def test_main(): - test_support.run_unittest(MaildirTestCase) + test_support.run_unittest(MaildirTestCase, MboxTestCase) if __name__ == "__main__": Modified: stackless/branches/release25-maint/Lib/test/test_operator.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_operator.py (original) +++ stackless/branches/release25-maint/Lib/test/test_operator.py Sat Apr 14 15:02:57 2007 @@ -143,6 +143,8 @@ self.failUnlessRaises(TypeError, operator.delslice, a, None, None) self.failUnless(operator.delslice(a, 2, 8) is None) self.assert_(a == [0, 1, 8, 9]) + operator.delslice(a, 0, test_support.MAX_Py_ssize_t) + self.assert_(a == []) def test_div(self): self.failUnlessRaises(TypeError, operator.div, 5) @@ -170,6 +172,8 @@ self.failUnlessRaises(TypeError, operator.getslice) self.failUnlessRaises(TypeError, operator.getslice, a, None, None) self.failUnless(operator.getslice(a, 4, 6) == [4, 5]) + b = operator.getslice(a, 0, test_support.MAX_Py_ssize_t) + self.assert_(b == a) def test_indexOf(self): self.failUnlessRaises(TypeError, operator.indexOf) @@ -215,6 +219,8 @@ self.failUnless(operator.isSequenceType(xrange(10))) self.failUnless(operator.isSequenceType('yeahbuddy')) self.failIf(operator.isSequenceType(3)) + class Dict(dict): pass + self.failIf(operator.isSequenceType(Dict())) def test_lshift(self): self.failUnlessRaises(TypeError, operator.lshift) @@ -316,6 +322,8 @@ self.failUnlessRaises(TypeError, operator.setslice, a, None, None, None) self.failUnless(operator.setslice(a, 1, 3, [2, 1]) is None) self.assert_(a == [0, 2, 1, 3]) + operator.setslice(a, 0, test_support.MAX_Py_ssize_t, []) + self.assert_(a == []) def test_sub(self): self.failUnlessRaises(TypeError, operator.sub) Modified: stackless/branches/release25-maint/Lib/test/test_os.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_os.py (original) +++ stackless/branches/release25-maint/Lib/test/test_os.py Sat Apr 14 15:02:57 2007 @@ -231,6 +231,15 @@ os.utime(self.fname, (t1, t1)) self.assertEquals(os.stat(self.fname).st_mtime, t1) + def test_1686475(self): + # Verify that an open file can be stat'ed + try: + os.stat(r"c:\pagefile.sys") + except WindowsError, e: + if e == 2: # file does not exist; cannot run test + return + self.fail("Could not stat pagefile.sys") + from test import mapping_tests class EnvironTests(mapping_tests.BasicTestMappingProtocol): Modified: stackless/branches/release25-maint/Lib/test/test_peepholer.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_peepholer.py (original) +++ stackless/branches/release25-maint/Lib/test/test_peepholer.py Sat Apr 14 15:02:57 2007 @@ -49,6 +49,11 @@ self.assert_(elem not in asm) for elem in ('LOAD_CONST', '(None)'): self.assert_(elem in asm) + def f(): + 'Adding a docstring made this test fail in Py2.5.0' + return None + self.assert_('LOAD_CONST' in disassemble(f)) + self.assert_('LOAD_GLOBAL' not in disassemble(f)) def test_while_one(self): # Skip over: LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP Modified: stackless/branches/release25-maint/Lib/test/test_pty.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_pty.py (original) +++ stackless/branches/release25-maint/Lib/test/test_pty.py Sat Apr 14 15:02:57 2007 @@ -115,6 +115,12 @@ os._exit(4) else: debug("Waiting for child (%d) to finish."%pid) + ##line = os.read(master_fd, 80) + ##lines = line.replace('\r\n', '\n').split('\n') + ##if False and lines != ['In child, calling os.setsid()', + ## 'Good: OSError was raised.', '']: + ## raise TestFailed("Unexpected output from child: %r" % line) + (pid, status) = os.waitpid(pid, 0) res = status >> 8 debug("Child (%d) exited with status %d (%d)."%(pid, res, status)) @@ -127,6 +133,15 @@ elif res != 4: raise TestFailed, "pty.fork() failed for unknown reasons." + ##debug("Reading from master_fd now that the child has exited") + ##try: + ## s1 = os.read(master_fd, 1024) + ##except os.error: + ## pass + ##else: + ## raise TestFailed("Read from master_fd did not raise exception") + + os.close(master_fd) # pty.fork() passed. Modified: stackless/branches/release25-maint/Lib/test/test_random.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_random.py (original) +++ stackless/branches/release25-maint/Lib/test/test_random.py Sat Apr 14 15:02:57 2007 @@ -439,6 +439,14 @@ self.assertEqual(k, numbits) # note the stronger assertion self.assert_(2**k > n > 2**(k-1)) # note the stronger assertion + def test_randrange_bug_1590891(self): + start = 1000000000000 + stop = -100000000000000000000 + step = -200 + x = self.gen.randrange(start, stop, step) + self.assert_(stop < x <= start) + self.assertEqual((x+stop)%step, 0) + _gammacoeff = (0.9999999999995183, 676.5203681218835, -1259.139216722289, 771.3234287757674, -176.6150291498386, 12.50734324009056, -0.1385710331296526, 0.9934937113930748e-05, 0.1659470187408462e-06) @@ -508,6 +516,14 @@ # tests validity but not completeness of the __all__ list self.failUnless(set(random.__all__) <= set(dir(random))) + def test_random_subclass_with_kwargs(self): + # SF bug #1486663 -- this used to erroneously raise a TypeError + class Subclass(random.Random): + def __init__(self, newarg=None): + random.Random.__init__(self) + Subclass(newarg=1) + + def test_main(verbose=None): testclasses = [WichmannHill_TestBasicOps, MersenneTwister_TestBasicOps, Modified: stackless/branches/release25-maint/Lib/test/test_re.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_re.py (original) +++ stackless/branches/release25-maint/Lib/test/test_re.py Sat Apr 14 15:02:57 2007 @@ -414,6 +414,15 @@ self.pickle_test(pickle) import cPickle self.pickle_test(cPickle) + # old pickles expect the _compile() reconstructor in sre module + import warnings + original_filters = warnings.filters[:] + try: + warnings.filterwarnings("ignore", "The sre module is deprecated", + DeprecationWarning) + from sre import _compile + finally: + warnings.filters = original_filters def pickle_test(self, pickle): oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)') @@ -595,6 +604,13 @@ self.assertEqual(iter.next().span(), (4, 4)) self.assertRaises(StopIteration, iter.next) + def test_empty_array(self): + # SF buf 1647541 + import array + for typecode in 'cbBuhHiIlLfd': + a = array.array(typecode) + self.assertEqual(re.compile("bla").match(a), None) + self.assertEqual(re.compile("").match(a).groups(), ()) def run_re_tests(): from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR Modified: stackless/branches/release25-maint/Lib/test/test_sax.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_sax.py (original) +++ stackless/branches/release25-maint/Lib/test/test_sax.py Sat Apr 14 15:02:57 2007 @@ -216,7 +216,44 @@ ('' % ns_uri) -# ===== XMLFilterBase +def test_1463026_1(): + result = StringIO() + gen = XMLGenerator(result) + + gen.startDocument() + gen.startElementNS((None, 'a'), 'a', {(None, 'b'):'c'}) + gen.endElementNS((None, 'a'), 'a') + gen.endDocument() + + return result.getvalue() == start+'' + +def test_1463026_2(): + result = StringIO() + gen = XMLGenerator(result) + + gen.startDocument() + gen.startPrefixMapping(None, 'qux') + gen.startElementNS(('qux', 'a'), 'a', {}) + gen.endElementNS(('qux', 'a'), 'a') + gen.endPrefixMapping(None) + gen.endDocument() + + return result.getvalue() == start+'' + +def test_1463026_3(): + result = StringIO() + gen = XMLGenerator(result) + + gen.startDocument() + gen.startPrefixMapping('my', 'qux') + gen.startElementNS(('qux', 'a'), 'a', {(None, 'b'):'c'}) + gen.endElementNS(('qux', 'a'), 'a') + gen.endPrefixMapping('my') + gen.endDocument() + + return result.getvalue() == start+'' + +# ===== Xmlfilterbase def test_filter_basic(): result = StringIO() Modified: stackless/branches/release25-maint/Lib/test/test_set.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_set.py (original) +++ stackless/branches/release25-maint/Lib/test/test_set.py Sat Apr 14 15:02:57 2007 @@ -21,6 +21,19 @@ def __cmp__(self, other): raise RuntimeError +class ReprWrapper: + 'Used to test self-referential repr() calls' + def __repr__(self): + return repr(self.value) + +class HashCountingInt(int): + 'int-like object that counts the number of times __hash__ is called' + def __init__(self, *args): + self.hash_count = 0 + def __hash__(self): + self.hash_count += 1 + return int.__hash__(self) + class TestJointOps(unittest.TestCase): # Tests common to both set and frozenset @@ -244,6 +257,46 @@ self.assertRaises(RuntimeError, s.discard, BadCmp()) self.assertRaises(RuntimeError, s.remove, BadCmp()) + def test_cyclical_repr(self): + w = ReprWrapper() + s = self.thetype([w]) + w.value = s + name = repr(s).partition('(')[0] # strip class name from repr string + self.assertEqual(repr(s), '%s([%s(...)])' % (name, name)) + + def test_cyclical_print(self): + w = ReprWrapper() + s = self.thetype([w]) + w.value = s + try: + fo = open(test_support.TESTFN, "wb") + print >> fo, s, + fo.close() + fo = open(test_support.TESTFN, "rb") + self.assertEqual(fo.read(), repr(s)) + finally: + fo.close() + os.remove(test_support.TESTFN) + + def test_do_not_rehash_dict_keys(self): + n = 10 + d = dict.fromkeys(map(HashCountingInt, xrange(n))) + self.assertEqual(sum(elem.hash_count for elem in d), n) + s = self.thetype(d) + self.assertEqual(sum(elem.hash_count for elem in d), n) + s.difference(d) + self.assertEqual(sum(elem.hash_count for elem in d), n) + if hasattr(s, 'symmetric_difference_update'): + s.symmetric_difference_update(d) + self.assertEqual(sum(elem.hash_count for elem in d), n) + d2 = dict.fromkeys(set(d)) + self.assertEqual(sum(elem.hash_count for elem in d), n) + d3 = dict.fromkeys(frozenset(d)) + self.assertEqual(sum(elem.hash_count for elem in d), n) + d3 = dict.fromkeys(frozenset(d), 123) + self.assertEqual(sum(elem.hash_count for elem in d), n) + self.assertEqual(d3, dict.fromkeys(d, 123)) + class TestSet(TestJointOps): thetype = set @@ -293,6 +346,17 @@ self.assert_(self.thetype(self.word) not in s) self.assertRaises(KeyError, self.s.remove, self.thetype(self.word)) + def test_remove_keyerror_unpacking(self): + # bug: www.python.org/sf/1576657 + for v1 in ['Q', (1,)]: + try: + self.s.remove(v1) + except KeyError, e: + v2 = e.args[0] + self.assertEqual(v1, v2) + else: + self.fail() + def test_discard(self): self.s.discard('a') self.assert_('a' not in self.s) @@ -431,6 +495,16 @@ class TestSetSubclass(TestSet): thetype = SetSubclass +class SetSubclassWithKeywordArgs(set): + def __init__(self, iterable=[], newarg=None): + set.__init__(self, iterable) + +class TestSetSubclassWithKeywordArgs(TestSet): + + def test_keywords_in_subclass(self): + 'SF bug #1486663 -- this used to erroneously raise a TypeError' + SetSubclassWithKeywordArgs(newarg=1) + class TestFrozenSet(TestJointOps): thetype = frozenset @@ -1413,6 +1487,7 @@ test_classes = ( TestSet, TestSetSubclass, + TestSetSubclassWithKeywordArgs, TestFrozenSet, TestFrozenSetSubclass, TestSetOfSets, Modified: stackless/branches/release25-maint/Lib/test/test_sha.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_sha.py (original) +++ stackless/branches/release25-maint/Lib/test/test_sha.py Sat Apr 14 15:02:57 2007 @@ -11,9 +11,23 @@ class SHATestCase(unittest.TestCase): def check(self, data, digest): - computed = sha.new(data).hexdigest() + # Check digest matches the expected value + obj = sha.new(data) + computed = obj.hexdigest() self.assert_(computed == digest) + # Verify that the value doesn't change between two consecutive + # digest operations. + computed_again = obj.hexdigest() + self.assert_(computed == computed_again) + + # Check hexdigest() output matches digest()'s output + digest = obj.digest() + hexd = "" + for c in digest: + hexd += '%02x' % ord(c) + self.assert_(computed == hexd) + def test_case_1(self): self.check("abc", "a9993e364706816aba3e25717850c26c9cd0d89d") @@ -26,6 +40,9 @@ self.check("a" * 1000000, "34aa973cd4c4daa4f61eeb2bdbad27316534016f") + def test_case_4(self): + self.check(chr(0xAA) * 80, + '4ca0ef38f1794b28a8f8ee110ee79d48ce13be25') def test_main(): test_support.run_unittest(SHATestCase) Modified: stackless/branches/release25-maint/Lib/test/test_slice.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_slice.py (original) +++ stackless/branches/release25-maint/Lib/test/test_slice.py Sat Apr 14 15:02:57 2007 @@ -92,6 +92,17 @@ self.assertRaises(OverflowError, slice(None).indices, 1L<<100) + def test_setslice_without_getslice(self): + tmp = [] + class X(object): + def __setslice__(self, i, j, k): + tmp.append((i, j, k)) + + x = X() + x[1:2] = 42 + self.assertEquals(tmp, [(1, 2, 42)]) + + def test_main(): test_support.run_unittest(SliceTest) Modified: stackless/branches/release25-maint/Lib/test/test_socket.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_socket.py (original) +++ stackless/branches/release25-maint/Lib/test/test_socket.py Sat Apr 14 15:02:57 2007 @@ -583,6 +583,13 @@ def _testRecvFrom(self): self.cli.sendto(MSG, 0, (HOST, PORT)) + def testRecvFromNegative(self): + # Negative lengths passed to recvfrom should give ValueError. + self.assertRaises(ValueError, self.serv.recvfrom, -1) + + def _testRecvFromNegative(self): + self.cli.sendto(MSG, 0, (HOST, PORT)) + class TCPCloserTest(ThreadedTCPSocketTest): def testClose(self): @@ -795,6 +802,31 @@ bufsize = 2 # Exercise the buffering code + +class Urllib2FileobjectTest(unittest.TestCase): + + # urllib2.HTTPHandler has "borrowed" socket._fileobject, and requires that + # it close the socket if the close c'tor argument is true + + def testClose(self): + class MockSocket: + closed = False + def flush(self): pass + def close(self): self.closed = True + + # must not close unless we request it: the original use of _fileobject + # by module socket requires that the underlying socket not be closed until + # the _socketobject that created the _fileobject is closed + s = MockSocket() + f = socket._fileobject(s) + f.close() + self.assert_(not s.closed) + + s = MockSocket() + f = socket._fileobject(s, close=True) + f.close() + self.assert_(s.closed) + class TCPTimeoutTest(SocketTCPTest): def testTCPTimeout(self): @@ -947,7 +979,8 @@ FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, - SmallBufferedFileObjectClassTestCase + SmallBufferedFileObjectClassTestCase, + Urllib2FileobjectTest, ]) if hasattr(socket, "socketpair"): tests.append(BasicSocketPairTest) Modified: stackless/branches/release25-maint/Lib/test/test_socket_ssl.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_socket_ssl.py (original) +++ stackless/branches/release25-maint/Lib/test/test_socket_ssl.py Sat Apr 14 15:02:57 2007 @@ -27,7 +27,13 @@ print "didn't raise TypeError" socket.RAND_add("this is a random string", 75.0) - f = urllib.urlopen('https://sf.net') + try: + f = urllib.urlopen('https://sf.net') + except IOError, exc: + if exc.errno == errno.ETIMEDOUT: + raise test_support.ResourceDenied('HTTPS connection is timing out') + else: + raise buf = f.read() f.close() Modified: stackless/branches/release25-maint/Lib/test/test_socketserver.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_socketserver.py (original) +++ stackless/branches/release25-maint/Lib/test/test_socketserver.py Sat Apr 14 15:02:57 2007 @@ -81,9 +81,12 @@ svr = svrcls(self.__addr, self.__hdlrcls) # pull the address out of the server in case it changed # this can happen if another process is using the port - addr = getattr(svr, 'server_address') + addr = svr.server_address if addr: self.__addr = addr + if self.__addr != svr.socket.getsockname(): + raise RuntimeError('server_address was %s, expected %s' % + (self.__addr, svr.socket.getsockname())) if verbose: print "thread: serving three times" svr.serve_a_few() if verbose: print "thread: done" Modified: stackless/branches/release25-maint/Lib/test/test_strptime.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_strptime.py (original) +++ stackless/branches/release25-maint/Lib/test/test_strptime.py Sat Apr 14 15:02:57 2007 @@ -463,6 +463,10 @@ "of the year") test_helper((1917, 12, 31), "Dec 31 on Monday with year starting and " "ending on Monday") + test_helper((2007, 01, 07), "First Sunday of 2007") + test_helper((2007, 01, 14), "Second Sunday of 2007") + test_helper((2006, 12, 31), "Last Sunday of 2006") + test_helper((2006, 12, 24), "Second to last Sunday of 2006") class CacheTests(unittest.TestCase): Modified: stackless/branches/release25-maint/Lib/test/test_struct.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_struct.py (original) +++ stackless/branches/release25-maint/Lib/test/test_struct.py Sat Apr 14 15:02:57 2007 @@ -612,8 +612,14 @@ assertRaises(struct.error, pack_into, small_buf, 0, test_string) assertRaises(struct.error, pack_into, small_buf, 2, test_string) +def test_unpack_with_buffer(): + # SF bug 1563759: struct.unpack doens't support buffer protocol objects + data = array.array('B', '\x12\x34\x56\x78') + value, = struct.unpack('>I', data) + vereq(value, 0x12345678) # Test methods to pack and unpack from buffers rather than strings. test_unpack_from() test_pack_into() test_pack_into_fn() +test_unpack_with_buffer() Modified: stackless/branches/release25-maint/Lib/test/test_subprocess.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_subprocess.py (original) +++ stackless/branches/release25-maint/Lib/test/test_subprocess.py Sat Apr 14 15:02:57 2007 @@ -430,6 +430,8 @@ '"a\\\\b c" d e') self.assertEqual(subprocess.list2cmdline(['a\\\\b\\ c', 'd', 'e']), '"a\\\\b\\ c" d e') + self.assertEqual(subprocess.list2cmdline(['ab', '']), + 'ab ""') def test_poll(self): Modified: stackless/branches/release25-maint/Lib/test/test_syntax.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_syntax.py (original) +++ stackless/branches/release25-maint/Lib/test/test_syntax.py Sat Apr 14 15:02:57 2007 @@ -333,6 +333,87 @@ Traceback (most recent call last): ... SyntaxError: 'break' outside loop (, line 3) + +This should probably raise a better error than a SystemError (or none at all). +In 2.5 there was a missing exception and an assert was triggered in a debug +build. The number of blocks must be greater than CO_MAXBLOCKS. SF #1565514 + + >>> while 1: + ... while 2: + ... while 3: + ... while 4: + ... while 5: + ... while 6: + ... while 8: + ... while 9: + ... while 10: + ... while 11: + ... while 12: + ... while 13: + ... while 14: + ... while 15: + ... while 16: + ... while 17: + ... while 18: + ... while 19: + ... while 20: + ... while 21: + ... while 22: + ... break + Traceback (most recent call last): + ... + SystemError: too many statically nested blocks + +This tests assignment-context; there was a bug in Python 2.5 where compiling +a complex 'if' (one with 'elif') would fail to notice an invalid suite, +leading to spurious errors. + + >>> if 1: + ... x() = 1 + ... elif 1: + ... pass + Traceback (most recent call last): + ... + SyntaxError: can't assign to function call (, line 2) + + >>> if 1: + ... pass + ... elif 1: + ... x() = 1 + Traceback (most recent call last): + ... + SyntaxError: can't assign to function call (, line 4) + + >>> if 1: + ... x() = 1 + ... elif 1: + ... pass + ... else: + ... pass + Traceback (most recent call last): + ... + SyntaxError: can't assign to function call (, line 2) + + >>> if 1: + ... pass + ... elif 1: + ... x() = 1 + ... else: + ... pass + Traceback (most recent call last): + ... + SyntaxError: can't assign to function call (, line 4) + + >>> if 1: + ... pass + ... elif 1: + ... pass + ... else: + ... x() = 1 + Traceback (most recent call last): + ... + SyntaxError: can't assign to function call (, line 6) + """ import re Modified: stackless/branches/release25-maint/Lib/test/test_tarfile.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_tarfile.py (original) +++ stackless/branches/release25-maint/Lib/test/test_tarfile.py Sat Apr 14 15:02:57 2007 @@ -110,7 +110,7 @@ """Test seek() method of _FileObject, incl. random reading. """ if self.sep != "|": - filename = "0-REGTYPE" + filename = "0-REGTYPE-TEXT" self.tar.extract(filename, dirname()) f = open(os.path.join(dirname(), filename), "rb") data = f.read() @@ -149,6 +149,16 @@ s2 = fobj.readlines() self.assert_(s1 == s2, "readlines() after seek failed") + fobj.seek(0) + self.assert_(len(fobj.readline()) == fobj.tell(), + "tell() after readline() failed") + fobj.seek(512) + self.assert_(len(fobj.readline()) + 512 == fobj.tell(), + "tell() after seek() and readline() failed") + fobj.seek(0) + line = fobj.readline() + self.assert_(fobj.read() == data[len(line):], + "read() after readline() failed") fobj.close() def test_old_dirtype(self): @@ -280,6 +290,46 @@ else: self.dst.addfile(tarinfo, f) + def test_add_self(self): + dstname = os.path.abspath(self.dstname) + + self.assertEqual(self.dst.name, dstname, "archive name must be absolute") + + self.dst.add(dstname) + self.assertEqual(self.dst.getnames(), [], "added the archive to itself") + + cwd = os.getcwd() + os.chdir(dirname()) + self.dst.add(dstname) + os.chdir(cwd) + self.assertEqual(self.dst.getnames(), [], "added the archive to itself") + + +class Write100Test(BaseTest): + # The name field in a tar header stores strings of at most 100 chars. + # If a string is shorter than 100 chars it has to be padded with '\0', + # which implies that a string of exactly 100 chars is stored without + # a trailing '\0'. + + def setUp(self): + self.name = "01234567890123456789012345678901234567890123456789" + self.name += "01234567890123456789012345678901234567890123456789" + + self.tar = tarfile.open(tmpname(), "w") + t = tarfile.TarInfo(self.name) + self.tar.addfile(t) + self.tar.close() + + self.tar = tarfile.open(tmpname()) + + def tearDown(self): + self.tar.close() + + def test(self): + self.assertEqual(self.tar.getnames()[0], self.name, + "failed to store 100 char filename") + + class WriteSize0Test(BaseTest): mode = 'w' @@ -362,13 +412,6 @@ is tested as well. """ - def setUp(self): - self.tar = tarfile.open(tmpname(), "w") - self.tar.posix = False - - def tearDown(self): - self.tar.close() - def _length(self, s): blocks, remainder = divmod(len(s) + 1, 512) if remainder: @@ -397,12 +440,23 @@ tarinfo.linkname = link tarinfo.type = tarfile.LNKTYPE - self.tar.addfile(tarinfo) + tar = tarfile.open(tmpname(), "w") + tar.posix = False + tar.addfile(tarinfo) v1 = self._calc_size(name, link) - v2 = self.tar.offset + v2 = tar.offset self.assertEqual(v1, v2, "GNU longname/longlink creation failed") + tar.close() + + tar = tarfile.open(tmpname()) + member = tar.next() + self.failIf(member is None, "unable to read longname member") + self.assert_(tarinfo.name == member.name and \ + tarinfo.linkname == member.linkname, \ + "unable to read longname member") + def test_longname_1023(self): self._test(("longnam/" * 127) + "longnam") @@ -571,6 +625,15 @@ self.assertEqual(tarfile.filemode(0755), '-rwxr-xr-x') self.assertEqual(tarfile.filemode(07111), '---s--s--t') +class OpenFileobjTest(BaseTest): + # Test for SF bug #1496501. + + def test_opener(self): + fobj = StringIO.StringIO("foo\n") + try: + tarfile.open("", "r", fileobj=fobj) + except tarfile.ReadError: + self.assertEqual(fobj.tell(), 0, "fileobj's position has moved") if bz2: # Bzip2 TestCases @@ -616,6 +679,7 @@ tests = [ FileModeTest, + OpenFileobjTest, ReadTest, ReadStreamTest, ReadDetectTest, @@ -623,6 +687,7 @@ ReadAsteriskTest, ReadStreamAsteriskTest, WriteTest, + Write100Test, WriteSize0Test, WriteStreamTest, WriteGNULongTest, Modified: stackless/branches/release25-maint/Lib/test/test_unpack.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_unpack.py (original) +++ stackless/branches/release25-maint/Lib/test/test_unpack.py Sat Apr 14 15:02:57 2007 @@ -55,7 +55,7 @@ >>> a, b, c = 7 Traceback (most recent call last): ... - TypeError: unpack non-sequence + TypeError: 'int' object is not iterable Unpacking tuple of wrong size Modified: stackless/branches/release25-maint/Lib/test/test_urllib.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_urllib.py (original) +++ stackless/branches/release25-maint/Lib/test/test_urllib.py Sat Apr 14 15:02:57 2007 @@ -122,6 +122,15 @@ finally: self.unfakehttp() + def test_empty_socket(self): + """urlopen() raises IOError if the underlying socket does not send any + data. (#1680230) """ + self.fakehttp('') + try: + self.assertRaises(IOError, urllib.urlopen, 'http://something') + finally: + self.unfakehttp() + class urlretrieve_FileTests(unittest.TestCase): """Test urllib.urlretrieve() on local files""" Modified: stackless/branches/release25-maint/Lib/test/test_urllib2net.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_urllib2net.py (original) +++ stackless/branches/release25-maint/Lib/test/test_urllib2net.py Sat Apr 14 15:02:57 2007 @@ -64,6 +64,27 @@ # urllib2.urlopen, "http://evil:thing at example.com") +class CloseSocketTest(unittest.TestCase): + + def test_close(self): + import socket, httplib, gc + + # calling .close() on urllib2's response objects should close the + # underlying socket + + # delve deep into response to fetch socket._socketobject + response = urllib2.urlopen("http://www.python.org/") + abused_fileobject = response.fp + self.assert_(abused_fileobject.__class__ is socket._fileobject) + httpresponse = abused_fileobject._sock + self.assert_(httpresponse.__class__ is httplib.HTTPResponse) + fileobject = httpresponse.fp + self.assert_(fileobject.__class__ is socket._fileobject) + + self.assert_(not fileobject.closed) + response.close() + self.assert_(fileobject.closed) + class urlopenNetworkTests(unittest.TestCase): """Tests urllib2.urlopen using the network. @@ -263,8 +284,12 @@ def test_main(): test_support.requires("network") - test_support.run_unittest(URLTimeoutTest, urlopenNetworkTests, - AuthTests, OtherNetworkTests) + test_support.run_unittest(URLTimeoutTest, + urlopenNetworkTests, + AuthTests, + OtherNetworkTests, + CloseSocketTest, + ) if __name__ == "__main__": test_main() Modified: stackless/branches/release25-maint/Lib/test/test_userdict.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_userdict.py (original) +++ stackless/branches/release25-maint/Lib/test/test_userdict.py Sat Apr 14 15:02:57 2007 @@ -174,7 +174,7 @@ except RuntimeError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("e[42] didn't raise RuntimeError") + self.fail("e[42] didn't raise RuntimeError") class F(UserDict.UserDict): def __init__(self): # An instance variable __missing__ should have no effect @@ -186,7 +186,7 @@ except KeyError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("f[42] didn't raise KeyError") + self.fail("f[42] didn't raise KeyError") class G(UserDict.UserDict): pass g = G() @@ -195,7 +195,7 @@ except KeyError, err: self.assertEqual(err.args, (42,)) else: - self.fail_("g[42] didn't raise KeyError") + self.fail("g[42] didn't raise KeyError") ########################## # Test Dict Mixin Modified: stackless/branches/release25-maint/Lib/test/test_weakref.py ============================================================================== --- stackless/branches/release25-maint/Lib/test/test_weakref.py (original) +++ stackless/branches/release25-maint/Lib/test/test_weakref.py Sat Apr 14 15:02:57 2007 @@ -6,6 +6,8 @@ from test import test_support +# Used in ReferencesTestCase.test_ref_created_during_del() . +ref_from_del = None class C: def method(self): @@ -630,6 +632,18 @@ finally: gc.set_threshold(*thresholds) + def test_ref_created_during_del(self): + # Bug #1377858 + # A weakref created in an object's __del__() would crash the + # interpreter when the weakref was cleaned up since it would refer to + # non-existent memory. This test should not segfault the interpreter. + class Target(object): + def __del__(self): + global ref_from_del + ref_from_del = weakref.ref(self) + + w = Target() + class SubclassableWeakrefTestCase(unittest.TestCase): Modified: stackless/branches/release25-maint/Lib/threading.py ============================================================================== --- stackless/branches/release25-maint/Lib/threading.py (original) +++ stackless/branches/release25-maint/Lib/threading.py Sat Apr 14 15:02:57 2007 @@ -636,13 +636,11 @@ _active_limbo_lock.acquire() _active[_get_ident()] = self _active_limbo_lock.release() - import atexit - atexit.register(self.__exitfunc) def _set_daemon(self): return False - def __exitfunc(self): + def _exitfunc(self): self._Thread__stop() t = _pickSomeNonDaemonThread() if t: @@ -715,9 +713,11 @@ from thread import stack_size -# Create the main thread object +# Create the main thread object, +# and make it available for the interpreter +# (Py_Main) as threading._shutdown. -_MainThread() +_shutdown = _MainThread()._exitfunc # get thread-local implementation, either from the thread # module, or from the python fallback Modified: stackless/branches/release25-maint/Lib/trace.py ============================================================================== --- stackless/branches/release25-maint/Lib/trace.py (original) +++ stackless/branches/release25-maint/Lib/trace.py Sat Apr 14 15:02:57 2007 @@ -587,7 +587,7 @@ """ if why == 'call': code = frame.f_code - filename = code.co_filename + filename = frame.f_globals.get('__file__', None) if filename: # XXX modname() doesn't work right for packages, so # the ignore support won't work right for packages Modified: stackless/branches/release25-maint/Lib/unittest.py ============================================================================== --- stackless/branches/release25-maint/Lib/unittest.py (original) +++ stackless/branches/release25-maint/Lib/unittest.py Sat Apr 14 15:02:57 2007 @@ -411,9 +411,18 @@ return cases def addTest(self, test): + # sanity checks + if not callable(test): + raise TypeError("the test to add must be callable") + if (isinstance(test, (type, types.ClassType)) and + issubclass(test, (TestCase, TestSuite))): + raise TypeError("TestCases and TestSuites must be instantiated " + "before passing them to addTest()") self._tests.append(test) def addTests(self, tests): + if isinstance(tests, basestring): + raise TypeError("tests must be an iterable of tests, not a string") for test in tests: self.addTest(test) Modified: stackless/branches/release25-maint/Lib/urllib.py ============================================================================== --- stackless/branches/release25-maint/Lib/urllib.py (original) +++ stackless/branches/release25-maint/Lib/urllib.py Sat Apr 14 15:02:57 2007 @@ -302,13 +302,13 @@ if proxy_passwd: import base64 - proxy_auth = base64.encodestring(proxy_passwd).strip() + proxy_auth = base64.b64encode(proxy_passwd).strip() else: proxy_auth = None if user_passwd: import base64 - auth = base64.encodestring(user_passwd).strip() + auth = base64.b64encode(user_passwd).strip() else: auth = None h = httplib.HTTP(host) @@ -326,6 +326,10 @@ if data is not None: h.send(data) errcode, errmsg, headers = h.getreply() + if errcode == -1: + # something went wrong with the HTTP status line + raise IOError, ('http protocol error', 0, + 'got a bad status line', None) fp = h.getfile() if errcode == 200: return addinfourl(fp, headers, "http:" + url) @@ -387,12 +391,12 @@ if not host: raise IOError, ('https error', 'no host given') if proxy_passwd: import base64 - proxy_auth = base64.encodestring(proxy_passwd).strip() + proxy_auth = base64.b64encode(proxy_passwd).strip() else: proxy_auth = None if user_passwd: import base64 - auth = base64.encodestring(user_passwd).strip() + auth = base64.b64encode(user_passwd).strip() else: auth = None h = httplib.HTTPS(host, 0, @@ -405,14 +409,18 @@ h.putheader('Content-Length', '%d' % len(data)) else: h.putrequest('GET', selector) - if proxy_auth: h.putheader('Proxy-Authorization: Basic %s' % proxy_auth) - if auth: h.putheader('Authorization: Basic %s' % auth) + if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth) + if auth: h.putheader('Authorization', 'Basic %s' % auth) if realhost: h.putheader('Host', realhost) for args in self.addheaders: h.putheader(*args) h.endheaders() if data is not None: h.send(data) errcode, errmsg, headers = h.getreply() + if errcode == -1: + # something went wrong with the HTTP status line + raise IOError, ('http protocol error', 0, + 'got a bad status line', None) fp = h.getfile() if errcode == 200: return addinfourl(fp, headers, "https:" + url) @@ -1471,7 +1479,7 @@ '/etc/passwd', 'file:/etc/passwd', 'file://localhost/etc/passwd', - 'ftp://ftp.python.org/pub/python/README', + 'ftp://ftp.gnu.org/pub/README', ## 'gopher://gopher.micro.umn.edu/1/', 'http://www.python.org/index.html', ] Modified: stackless/branches/release25-maint/Lib/urllib2.py ============================================================================== --- stackless/branches/release25-maint/Lib/urllib2.py (original) +++ stackless/branches/release25-maint/Lib/urllib2.py Sat Apr 14 15:02:57 2007 @@ -674,7 +674,7 @@ proxy_type = orig_type if user and password: user_pass = '%s:%s' % (unquote(user), unquote(password)) - creds = base64.encodestring(user_pass).strip() + creds = base64.b64encode(user_pass).strip() req.add_header('Proxy-authorization', 'Basic ' + creds) hostport = unquote(hostport) req.set_proxy(hostport, proxy_type) @@ -766,11 +766,10 @@ class AbstractBasicAuthHandler: - rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I) + # XXX this allows for multiple auth-schemes, but will stupidly pick + # the last one with a realm specified. - # XXX there can actually be multiple auth-schemes in a - # www-authenticate header. should probably be a lot more careful - # in parsing them to extract multiple alternatives + rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I) # XXX could pre-emptively send auth info already accepted (RFC 2617, # end of section 2, and section 1.2 immediately after "credentials" @@ -798,7 +797,7 @@ user, pw = self.passwd.find_user_password(realm, host) if pw is not None: raw = "%s:%s" % (user, pw) - auth = 'Basic %s' % base64.encodestring(raw).strip() + auth = 'Basic %s' % base64.b64encode(raw).strip() if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) @@ -1087,7 +1086,7 @@ # out of socket._fileobject() and into a base class. r.recv = r.read - fp = socket._fileobject(r) + fp = socket._fileobject(r, close=True) resp = addinfourl(fp, r.msg, req.get_full_url()) resp.code = r.status Modified: stackless/branches/release25-maint/Lib/uu.py ============================================================================== --- stackless/branches/release25-maint/Lib/uu.py (original) +++ stackless/branches/release25-maint/Lib/uu.py Sat Apr 14 15:02:57 2007 @@ -114,6 +114,7 @@ # # Open the output file # + opened = False if out_file == '-': out_file = sys.stdout elif isinstance(out_file, basestring): @@ -123,6 +124,7 @@ except AttributeError: pass out_file = fp + opened = True # # Main decoding loop # @@ -140,6 +142,8 @@ s = in_file.readline() if not s: raise Error('Truncated input file') + if opened: + out_file.close() def test(): """uuencode/uudecode main program""" Modified: stackless/branches/release25-maint/Lib/wave.py ============================================================================== --- stackless/branches/release25-maint/Lib/wave.py (original) +++ stackless/branches/release25-maint/Lib/wave.py Sat Apr 14 15:02:57 2007 @@ -159,7 +159,12 @@ f = __builtin__.open(f, 'rb') self._i_opened_the_file = f # else, assume it is an open file object already - self.initfp(f) + try: + self.initfp(f) + except: + if self._i_opened_the_file: + f.close() + raise def __del__(self): self.close() @@ -297,7 +302,12 @@ if isinstance(f, basestring): f = __builtin__.open(f, 'wb') self._i_opened_the_file = f - self.initfp(f) + try: + self.initfp(f) + except: + if self._i_opened_the_file: + f.close() + raise def initfp(self, file): self._file = file Modified: stackless/branches/release25-maint/Lib/webbrowser.py ============================================================================== --- stackless/branches/release25-maint/Lib/webbrowser.py (original) +++ stackless/branches/release25-maint/Lib/webbrowser.py Sat Apr 14 15:02:57 2007 @@ -2,6 +2,7 @@ """Interfaces for launching and remotely controlling Web browsers.""" import os +import shlex import sys import stat import subprocess @@ -32,7 +33,11 @@ for browser in alternatives: if '%s' in browser: # User gave us a command line, split it into name and args - return GenericBrowser(browser.split()) + browser = shlex.split(browser) + if browser[-1] == '&': + return BackgroundBrowser(browser[:-1]) + else: + return GenericBrowser(browser) else: # User gave us a browser name or path. try: Modified: stackless/branches/release25-maint/Lib/xml/sax/saxutils.py ============================================================================== --- stackless/branches/release25-maint/Lib/xml/sax/saxutils.py (original) +++ stackless/branches/release25-maint/Lib/xml/sax/saxutils.py Sat Apr 14 15:02:57 2007 @@ -100,6 +100,17 @@ else: self._out.write(text.encode(self._encoding, _error_handling)) + def _qname(self, name): + """Builds a qualified name from a (ns_url, localname) pair""" + if name[0]: + # The name is in a non-empty namespace + prefix = self._current_context[name[0]] + if prefix: + # If it is not the default namespace, prepend the prefix + return prefix + ":" + name[1] + # Return the unqualified name + return name[1] + # ContentHandler methods def startDocument(self): @@ -125,29 +136,21 @@ self._write('' % name) def startElementNS(self, name, qname, attrs): - if name[0] is None: - # if the name was not namespace-scoped, use the unqualified part - name = name[1] - else: - # else try to restore the original prefix from the namespace - name = self._current_context[name[0]] + ":" + name[1] - self._write('<' + name) + self._write('<' + self._qname(name)) - for pair in self._undeclared_ns_maps: - self._write(' xmlns:%s="%s"' % pair) + for prefix, uri in self._undeclared_ns_maps: + if prefix: + self._out.write(' xmlns:%s="%s"' % (prefix, uri)) + else: + self._out.write(' xmlns="%s"' % uri) self._undeclared_ns_maps = [] for (name, value) in attrs.items(): - name = self._current_context[name[0]] + ":" + name[1] - self._write(' %s=%s' % (name, quoteattr(value))) + self._write(' %s=%s' % (self._qname(name), quoteattr(value))) self._write('>') def endElementNS(self, name, qname): - if name[0] is None: - name = name[1] - else: - name = self._current_context[name[0]] + ":" + name[1] - self._write('' % name) + self._write('' % self._qname(name)) def characters(self, content): self._write(escape(content)) Modified: stackless/branches/release25-maint/Mac/BuildScript/build-installer.py ============================================================================== --- stackless/branches/release25-maint/Mac/BuildScript/build-installer.py (original) +++ stackless/branches/release25-maint/Mac/BuildScript/build-installer.py Sat Apr 14 15:02:57 2007 @@ -33,7 +33,7 @@ def shellQuote(value): """ - Return the string value in a form that can savely be inserted into + Return the string value in a form that can safely be inserted into a shell command. """ return "'%s'"%(value.replace("'", "'\"'\"'")) @@ -56,10 +56,10 @@ raise RuntimeError, "Cannot find full version??" -# The directory we'll use to create the build, will be erased and recreated +# The directory we'll use to create the build (will be erased and recreated) WORKDIR="/tmp/_py" -# The directory we'll use to store third-party sources, set this to something +# The directory we'll use to store third-party sources. Set this to something # else if you don't want to re-fetch required libraries every time. DEPSRC=os.path.join(WORKDIR, 'third-party') DEPSRC=os.path.expanduser('~/Universal/other-sources') @@ -201,7 +201,7 @@ long_name="GUI Applications", source="/Applications/MacPython %(VER)s", readme="""\ - This package installs IDLE (an interactive Python IDLE), + This package installs IDLE (an interactive Python IDE), Python Launcher and Build Applet (create application bundles from python scripts). @@ -257,8 +257,7 @@ readme="""\ This package updates the system python installation on Mac OS X 10.3 to ensure that you can build new python extensions - using that copy of python after installing this version of - python. + using that copy of python after installing this version. """, postflight="../Tools/fixapplepython23.py", topdir="/Library/Frameworks/Python.framework", @@ -637,15 +636,15 @@ print "Running make" runCommand("make") - print "Runing make frameworkinstall" + print "Running make frameworkinstall" runCommand("make frameworkinstall DESTDIR=%s"%( shellQuote(rootDir))) - print "Runing make frameworkinstallextras" + print "Running make frameworkinstallextras" runCommand("make frameworkinstallextras DESTDIR=%s"%( shellQuote(rootDir))) - print "Copy required shared libraries" + print "Copying required shared libraries" if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')): runCommand("mv %s/* %s"%( shellQuote(os.path.join( @@ -735,8 +734,8 @@ def packageFromRecipe(targetDir, recipe): curdir = os.getcwd() try: - # The major version (such as 2.5) is included in the pacakge name - # because haveing two version of python installed at the same time is + # The major version (such as 2.5) is included in the package name + # because having two version of python installed at the same time is # common. pkgname = '%s-%s'%(recipe['name'], getVersion()) srcdir = recipe.get('source') @@ -910,7 +909,7 @@ def buildDMG(): """ - Create DMG containing the rootDir + Create DMG containing the rootDir. """ outdir = os.path.join(WORKDIR, 'diskimage') if os.path.exists(outdir): Modified: stackless/branches/release25-maint/Makefile.pre.in ============================================================================== --- stackless/branches/release25-maint/Makefile.pre.in (original) +++ stackless/branches/release25-maint/Makefile.pre.in Sat Apr 14 15:02:57 2007 @@ -472,7 +472,7 @@ $(SIGNAL_OBJS) \ $(MODOBJS) \ $(srcdir)/Modules/getbuildinfo.c - $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LANG=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c + $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LC_ALL=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ Modified: stackless/branches/release25-maint/Misc/ACKS ============================================================================== --- stackless/branches/release25-maint/Misc/ACKS (original) +++ stackless/branches/release25-maint/Misc/ACKS Sat Apr 14 15:02:57 2007 @@ -242,6 +242,7 @@ Michael Guravage Lars Gust?bel Barry Haddow +V?clav Haisman Paul ten Hagen Rasmus Hahn Peter Haight Modified: stackless/branches/release25-maint/Misc/NEWS ============================================================================== --- stackless/branches/release25-maint/Misc/NEWS (original) +++ stackless/branches/release25-maint/Misc/NEWS Sat Apr 14 15:02:57 2007 @@ -7,11 +7,95 @@ What's New in Python 2.5.1c1? ============================= -*Release date: XX-XXX-XXXX* +*Release date: 05-APR-2007* Core and builtins ----------------- +- Patch #1682205: a TypeError while unpacking an iterable is no longer + masked by a generic one with the message "unpack non-sequence". + +- Patch #1642547: Fix an error/crash when encountering syntax errors in + complex if statements. + +- Patch #1462488: Python no longer segfaults when ``object.__reduce_ex__()`` + is called with an object that is faking its type. + +- Patch #1680015: Don't modify __slots__ tuple if it contains an unicode + name. + +- Patch #922167: Python no longer segfaults when faced with infinitely + self-recursive reload() calls (as reported by bug #742342). + +- Patch #1675981: remove unreachable code from ``type.__new__()`` method. + +- Patch #1638879: don't accept strings with embedded NUL bytes in long(). + +- Bug #1674503: close the file opened by execfile() in an error condition. + +- Patch #1674228: when assigning a slice (old-style), check for the + sq_ass_slice instead of the sq_slice slot. + +- Bug #1669182: prevent crash when trying to print an unraisable error + from a string exception. + +- The peephole optimizer left None as a global in functions with a docstring + and an explicit return value. + +- Bug #1653736: Properly discard third argument to slot_nb_inplace_power. + +- SF #151204: enumerate() now raises an Overflow error at sys.maxint items. + +- Bug #1377858: Fix the segfaulting of the interpreter when an object created + a weakref on itself during a __del__ call for new-style classes (classic + classes still have the bug). + +- Bug #1648179: set.update() did not recognize an overridden __iter__ + method in subclasses of dict. + +- Bug #1579370: Make PyTraceBack_Here use the current thread, not the + frame's thread state. + +- patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py + +- Bug #1637022: Prefix AST symbols with _Py_. + +- Prevent seg fault on shutdown which could occur if an object + raised a warning. + +- Bug #1566280: Explicitly invoke threading._shutdown from Py_Main, + to avoid relying on atexit. + +- Bug #1590891: random.randrange don't return correct value for big number + +- Bug #1456209: In some obscure cases it was possible for a class with a + custom ``__eq__()`` method to confuse set internals when class instances + were used as a set's elements and the ``__eq__()`` method mutated the set. + +- The repr for self-referential sets and fronzensets now shows "..." instead + of falling into infinite recursion. + +- Eliminated unnecessary repeated calls to hash() by set.intersection() and + set.symmetric_difference_update(). + +- Bug #1591996: Correctly forward exception in instance_contains(). + +- Bug #1588287: fix invalid assertion for `1,2` in debug builds. + +- Bug #1576657: when setting a KeyError for a tuple key, make sure that + the tuple isn't used as the "exception arguments tuple". Applied to + both sets and dictionaries. + +- Bug #1565514, SystemError not raised on too many nested blocks. + +- Bug #1576174: WindowsError now displays the windows error code + again, no longer the posix error code. + +- Patch #1549049: Support long values in structmember. + +- Bug #1542016: make sys.callstats() match its docstring and return an + 11-tuple (only relevant when Python is compiled with -DCALL_PROFILE). + - Bug #1545497: when given an explicit base, int() did ignore NULs embedded in the string to convert. @@ -46,12 +130,66 @@ - Allow exception instances to be directly sliced again. -- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments - were transposed. Extension Modules ----------------- +- Bug #1563759: struct.unpack doens't support buffer protocol objects + +- Bug #1686475: Support stat'ing open files on Windows again. + +- Bug #1647541: Array module's buffer interface can now handle empty arrays. + +- Bug #1693079: The array module can now successfully pickle empty arrays. + +- Bug #1688393: Prevent crash in socket.recvfrom if length is negative. + +- Bug #1622896: fix a rare corner case where the bz2 module raised an + error in spite of a succesful compression. + +- Patch #1654417: make operator.{get,set,del}slice use the full range + of Py_ssize_t. + +- Patch #1646728: datetime.fromtimestamp fails with negative + fractional times. With unittest. + +- Patch #1494140: Add documentation for the new struct.Struct object. + +- Patch #1657276: Make NETLINK_DNRTMSG conditional. + +- Bug #1653736: Fix signature of time_isoformat. + +- operator.count() now raises an OverflowError when the count reaches sys.maxint. + +- Bug #1575169: operator.isSequenceType() now returns False for subclasses of dict. + +- collections.defaultdict() now verifies that the factory function is callable. + +- Bug #1486663: don't reject keyword arguments for subclasses of builtin + types. + +- The version number of the ctypes package was changed to "1.0.2". + +- Bug #1664966: Fix crash in exec if Unicode filename can't be decoded. + +- Patch #1544279: Improve thread-safety of the socket module by moving + the sock_addr_t storage out of the socket object. + +- Patch #1615868: make bz2.BZFile.seek() work for offsets >2GiB. + +- Bug #1563807: _ctypes built on AIX fails with ld ffi error. + +- Bug #1598620: A ctypes Structure cannot contain itself. + +- Bug #1588217: don't parse "= " as a soft line break in binascii's + a2b_qp() function, instead leave it in the string as quopri.decode() + does. + +- Patch #838546: Make terminal become controlling in pty.fork() + +- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that + ctypes isn't considered as requiring executable stacks. + - Bug #1567666: Emulate GetFileAttributesExA for Win95. - Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode @@ -72,9 +210,157 @@ - Make regex engine raise MemoryError if allocating memory fails. +- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments + were transposed. + +- Added support for linking the bsddb module against BerkeleyDB 4.5.x. + +- Modifying an empty deque during iteration now raises RuntimeError + instead of StopIteration. + +- Bug #1552726: fix polling at the interpreter prompt when certain + versions of the readline library are in use. + +- Bug #1633621: if curses.resizeterm() or curses.resize_term() is called, + update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS. + +- Fix an off-by-one bug in locale.strxfrm(). + Library ------- +- Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler. + +- Bug #978833: Revert r50844, as it broke _socketobject.dup. + +- Bug #1675967: re patterns pickled with Python 2.4 and earlier can + now be unpickled with Python 2.5. + +- Bug #1684254: webbrowser now uses shlex to split any command lines + given to get(). It also detects when you use '&' as the last argument + and creates a BackgroundBrowser then. + +- Patch #1681153: the wave module now closes a file object it opened if + initialization failed. + +- Bug #767111: fix long-standing bug in urllib which caused an + AttributeError instead of an IOError when the server's response didn't + contain a valid HTTP status line. + +- Bug #1629369: Correctly parse multiline comment in address field. + +- Bug #1582282: Fix email.header.decode_header() to properly treat encoded + words with no delimiting whitespace as a single word. + +- Patch #1449244: Support Unicode strings in + email.message.Message.{set_charset,get_content_charset}. + +- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to + pydoc's help keywords. + +- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap + the IndexError caused by passing in an invalid breakpoint number. + +- Bug #1531963: Make SocketServer.TCPServer's server_address always + be equal to calling getsockname() on the server's socket. Fixed by patch + #1545011. + +- Bug #1651235: When a tuple was passed to a ctypes function call, + Python would crash instead of raising an error. + +- Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0) + returned string up to the first NUL character. + +- Bug #1637850: make_table in difflib did not work with unicode + +- Bugs #1676321: the empty() function in sched.py returned the wrong result + +- unittest now verifies more of its assumptions. In particular, TestCase + and TestSuite subclasses (not instances) are no longer accepted in + TestSuite.addTest(). This should cause no incompatibility since it + never made sense with ordinary subclasses -- the failure just occurred + later, with a more cumbersome exception. + +- Patch #685268: Consider a package's __path__ in imputil. + +- Patch 1463026: Support default namespace in XMLGenerator. + +- Patch 1571379: Make trace's --ignore-dir facility work in the face of + relative directory names. + +- Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config, + on "linux" and "gnu" systems. + +- Bug #1124861: Automatically create pipes if GetStdHandle fails in + subprocess. + +- Patch #783050: the pty.fork() function now closes the slave fd + correctly. + +- Patch #1638243: the compiler package is now able to correctly compile + a with statement; previously, executing code containing a with statement + compiled by the compiler package crashed the interpreter. + +- Bug #1643943: Fix %U handling for time.strptime. + +- Bug #1598181: Avoid O(N**2) bottleneck in subprocess communicate(). + +- Patch #1627441: close sockets properly in urllib2. + +- Bug #1610795: ctypes.util.find_library works now on BSD systems. + +- Fix sort stability in heapq.nlargest() and nsmallest(). + +- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument. + +- Patch #1262036: Prevent TarFiles from being added to themselves under + certain conditions. + +- Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell() + work correctly together with readline(). + +- Bug #737202: Make CGIHTTPServer work for scripts in subdirectories. + Fix by Titus Brown. + +- Patch #827559: Make SimpleHTTPServer redirect when a directory URL + is missing the trailing slash, so that relative links work correctly. + Patch by Chris Gonnerman. + +- Patch #1608267: fix a race condition in os.makedirs() is the directory + to be created is already there. + +- Patch #1610437: fix a tarfile bug with long filename headers. + +- Patch #1472877: Fix Tix subwidget name resolution. + +- Patch #1594554: Always close a tkSimpleDialog on ok(), even + if an exception occurs. + +- Patch #1538878: Don't make tkSimpleDialog dialogs transient if + the parent window is withdrawn. + +- Patch #1360200: Use unmangled_version RPM spec field to deal with + file name mangling. + +- Patch #1359217: Process 2xx response in an ftplib transfer + that precedes an 1xx response. + +- Patch #1060577: Extract list of RPM files from spec file in + bdist_rpm + +- Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders. + +- Patch #1583880: fix tarfile's problems with long names and posix/ + GNU modes. + +- Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and + fix all codecs file wrappers to work correctly with the "with" + statement (bug #1586513). + +- ctypes callback functions only support 'fundamental' data types as + result type. Raise an error when something else is used. This is a + partial fix for Bug #1574584. + - Bug #813342: Start the IDLE subprocess with -Qnew if the parent is started with that option. @@ -93,6 +379,36 @@ - Bug #1565661: in webbrowser, split() the command for the default GNOME browser in case it is a command with args. +- Bug #1569790: mailbox.py: Maildir.get_folder() and MH.get_folder() + weren't passing the message factory on to newly created Maildir/MH + objects. + +- Bug #1575506: mailbox.py: Single-file mailboxes didn't re-lock + properly in their flush() method. + +- Patch #1514543: mailbox.py: In the Maildir class, report errors if there's + a filename clash instead of possibly losing a message. (Patch by David + Watson.) + +- Patch #1514544: mailbox.py: Try to ensure that messages/indexes have + been physically written to disk after calling .flush() or + .close(). (Patch by David Watson.) + +- mailbox.py: Change MH.pack() to not lock individual message files; this + wasn't consistent with existing implementations of message packing, and + was buggy on some platforms. + +- Bug #1633678: change old mailbox.UnixMailbox class to parse + 'From' lines less strictly. + +- Bug #1576241: fix functools.wraps() to work on built-in functions. + +- Patch #1574068: fix urllib/urllib2 to not insert line breaks when + HTTP authentication data was very long. + +- Patch #1617413: fix urllib's support for HTTP Basic authentication via HTTPS + (patch by Dug Song). + - Fix a bug in traceback.format_exception_only() that led to an error being raised when print_exc() was called without an exception set. In version 2.4, this printed "None", restored that behavior. @@ -101,12 +417,65 @@ the close_fds arg to subprocess.Popen is not supported). +Tools/Demos +----------- + +- Patch #1552024: add decorator support to unparse.py demo script. + +- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092). + + +Tests +----- + +- Cause test.test_socket_ssl:test_basic to raise + test.test_support.ResourceDenied when an HTTPS connection times out. + +- Remove passwd.adjunct.byname from list of maps + for test_nis. + + Build ----- +- Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS + returned by python-config if Python was built with --enable-shared + because that prevented the shared library from being used. + +- Patch #1569798: fix a bug in distutils when building Python from a + directory within sys.exec_prefix. + +- Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86. + +- Disable _XOPEN_SOURCE on NetBSD 1.x. + +- Bug #1578513: Cross compilation was broken by a change to configure. + Repair so that it's back to how it was in 2.4.3. + - Patch #1576954: Update VC6 build directory; remove redundant files in VC7. +- Fix build failure on kfreebsd and on the hurd. + +- Fix the build of the library reference in info format. + + +Windows +------- + +- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE + and _CRT_NONSTDC_NO_DEPRECATE. + + +Documentation +------------- + +- Patch #1489771: the syntax rules in Python Reference Manual were + updated to reflect the current Python syntax. + +- Patch #1686451: Fix return type for + PySequence_{Count,Index,Fast_GET_SIZE}. + What's New in Python 2.5 (final) ================================ @@ -178,6 +547,8 @@ Extension Modules ----------------- +- Bug #1599782: fix segfault on bsddb.db.DB().type(). + - Fix bugs in ctypes: - anonymous structure fields that have a bit-width specified did not work - cast function did not accept c_char_p or c_wchar_p instances as first arg @@ -199,6 +570,8 @@ Tests ----- +- Patch #1559413: Fix test_cmd_line if sys.executable contains a space. + - Fix bsddb test_basics.test06_Transactions to check the version number properly. @@ -206,6 +579,14 @@ Documentation ------------- +- Patch #1679379: add documentation for fnmatch.translate(). + +- Patch #1671450: add a section about subclassing builtin types to the + "extending and embedding" tutorial. + +- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next + docs. + - Bug #1565919: document set types in the Language Reference. - Bug #1546052: clarify that PyString_FromString(AndSize) copies the Modified: stackless/branches/release25-maint/Misc/RPM/python-2.5.spec ============================================================================== --- stackless/branches/release25-maint/Misc/RPM/python-2.5.spec (original) +++ stackless/branches/release25-maint/Misc/RPM/python-2.5.spec Sat Apr 14 15:02:57 2007 @@ -33,7 +33,7 @@ ################################# %define name python -%define version 2.5 +%define version 2.5.1 %define libvers 2.5 %define release 1pydotorg %define __prefix /usr Modified: stackless/branches/release25-maint/Misc/python-config.in ============================================================================== --- stackless/branches/release25-maint/Misc/python-config.in (original) +++ stackless/branches/release25-maint/Misc/python-config.in Sat Apr 14 15:02:57 2007 @@ -45,7 +45,9 @@ elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() libs.append('-lpython'+pyver) - if opt == '--ldflags': + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) print ' '.join(libs) Modified: stackless/branches/release25-maint/Modules/_bsddb.c ============================================================================== --- stackless/branches/release25-maint/Modules/_bsddb.c (original) +++ stackless/branches/release25-maint/Modules/_bsddb.c Sat Apr 14 15:02:57 2007 @@ -98,7 +98,7 @@ #error "eek! DBVER can't handle minor versions > 9" #endif -#define PY_BSDDB_VERSION "4.4.5.1" +#define PY_BSDDB_VERSION "4.4.5.2" static char *rcs_id = "$Id$"; @@ -1779,9 +1779,7 @@ return NULL; CHECK_DB_NOT_CLOSED(self); - MYDB_BEGIN_ALLOW_THREADS; type = _DB_get_type(self); - MYDB_END_ALLOW_THREADS; if (type == -1) return NULL; return PyInt_FromLong(type); @@ -4129,6 +4127,7 @@ } +#if (DBVER < 45) static PyObject* DBEnv_set_lk_max(DBEnvObject* self, PyObject* args) { @@ -4144,6 +4143,7 @@ RETURN_IF_ERR(); RETURN_NONE(); } +#endif #if (DBVER >= 32) @@ -5233,7 +5233,9 @@ {"set_lg_regionmax",(PyCFunction)DBEnv_set_lg_regionmax, METH_VARARGS}, #endif {"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS}, +#if (DBVER < 45) {"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS}, +#endif #if (DBVER >= 32) {"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS}, {"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS}, @@ -5835,7 +5837,9 @@ ADD_INT(d, DB_AFTER); ADD_INT(d, DB_APPEND); ADD_INT(d, DB_BEFORE); +#if (DBVER < 45) ADD_INT(d, DB_CACHED_COUNTS); +#endif #if (DBVER >= 41) _addIntToDict(d, "DB_CHECKPOINT", 0); #else @@ -5870,7 +5874,9 @@ ADD_INT(d, DB_POSITION); ADD_INT(d, DB_PREV); ADD_INT(d, DB_PREV_NODUP); +#if (DBVER < 45) ADD_INT(d, DB_RECORDCOUNT); +#endif ADD_INT(d, DB_SET); ADD_INT(d, DB_SET_RANGE); ADD_INT(d, DB_SET_RECNO); Modified: stackless/branches/release25-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/_ctypes.c (original) +++ stackless/branches/release25-maint/Modules/_ctypes/_ctypes.c Sat Apr 14 15:02:57 2007 @@ -339,24 +339,6 @@ ((PyTypeObject *)type)->tp_name, ob_name); return NULL; } -#if 1 -/* XXX Remove this section ??? */ - /* tuple returned by byref: */ - /* ('i', addr, obj) */ - if (PyTuple_Check(value)) { - PyObject *ob; - StgDictObject *dict; - - dict = PyType_stgdict(type); - ob = PyTuple_GetItem(value, 2); - if (dict && ob && - 0 == PyObject_IsInstance(value, dict->proto)) { - Py_INCREF(value); - return value; - } - } -/* ... and leave the rest */ -#endif as_parameter = PyObject_GetAttrString(value, "_as_parameter_"); if (as_parameter) { @@ -1020,6 +1002,12 @@ } itemsize = itemdict->size; + if (length * itemsize < 0) { + PyErr_SetString(PyExc_OverflowError, + "array too large"); + return NULL; + } + itemalign = itemdict->align; stgdict->size = itemsize * length; @@ -2194,21 +2182,32 @@ 0, /* tp_free */ }; -static void CData_MallocBuffer(CDataObject *obj, StgDictObject *dict) +static int CData_MallocBuffer(CDataObject *obj, StgDictObject *dict) { if ((size_t)dict->size <= sizeof(obj->b_value)) { /* No need to call malloc, can use the default buffer */ obj->b_ptr = (char *)&obj->b_value; + /* The b_needsfree flag does not mean that we actually did + call PyMem_Malloc to allocate the memory block; instead it + means we are the *owner* of the memory and are responsible + for freeing resources associated with the memory. This is + also the reason that b_needsfree is exposed to Python. + */ obj->b_needsfree = 1; } else { /* In python 2.4, and ctypes 0.9.6, the malloc call took about 33% of the creation time for c_int(). */ obj->b_ptr = (char *)PyMem_Malloc(dict->size); + if (obj->b_ptr == NULL) { + PyErr_NoMemory(); + return -1; + } obj->b_needsfree = 1; memset(obj->b_ptr, 0, dict->size); } obj->b_size = dict->size; + return 0; } PyObject * @@ -2240,7 +2239,10 @@ cmem->b_base = (CDataObject *)base; cmem->b_index = index; } else { /* copy contents of adr */ - CData_MallocBuffer(cmem, dict); + if (-1 == CData_MallocBuffer(cmem, dict)) { + return NULL; + Py_DECREF(cmem); + } memcpy(cmem->b_ptr, adr, dict->size); cmem->b_index = index; } @@ -2453,7 +2455,10 @@ obj->b_objects = NULL; obj->b_length = dict->length; - CData_MallocBuffer(obj, dict); + if (-1 == CData_MallocBuffer(obj, dict)) { + Py_DECREF(obj); + return NULL; + } return (PyObject *)obj; } /*****************************************************************/ @@ -4530,9 +4535,9 @@ #endif static PyObject * -string_at(const char *ptr, Py_ssize_t size) +string_at(const char *ptr, int size) { - if (size == 0) + if (size == -1) return PyString_FromString(ptr); return PyString_FromStringAndSize(ptr, size); } @@ -4617,7 +4622,7 @@ static PyObject * wstring_at(const wchar_t *ptr, int size) { - if (size == 0) + if (size == -1) size = wcslen(ptr); return PyUnicode_FromWideChar(ptr, size); } @@ -4744,7 +4749,7 @@ #endif PyModule_AddObject(m, "FUNCFLAG_CDECL", PyInt_FromLong(FUNCFLAG_CDECL)); PyModule_AddObject(m, "FUNCFLAG_PYTHONAPI", PyInt_FromLong(FUNCFLAG_PYTHONAPI)); - PyModule_AddStringConstant(m, "__version__", "1.0.1"); + PyModule_AddStringConstant(m, "__version__", "1.0.2"); PyModule_AddObject(m, "_memmove_addr", PyLong_FromVoidPtr(memmove)); PyModule_AddObject(m, "_memset_addr", PyLong_FromVoidPtr(memset)); Modified: stackless/branches/release25-maint/Modules/_ctypes/_ctypes_test.c ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/_ctypes_test.c (original) +++ stackless/branches/release25-maint/Modules/_ctypes/_ctypes_test.c Sat Apr 14 15:02:57 2007 @@ -58,22 +58,25 @@ EXPORT(int) _testfunc_i_bhilfd(signed char b, short h, int i, long l, float f, double d) { -// printf("_testfunc_i_bhilfd got %d %d %d %ld %f %f\n", -// b, h, i, l, f, d); +/* printf("_testfunc_i_bhilfd got %d %d %d %ld %f %f\n", + b, h, i, l, f, d); +*/ return (int)(b + h + i + l + f + d); } EXPORT(float) _testfunc_f_bhilfd(signed char b, short h, int i, long l, float f, double d) { -// printf("_testfunc_f_bhilfd got %d %d %d %ld %f %f\n", -// b, h, i, l, f, d); +/* printf("_testfunc_f_bhilfd got %d %d %d %ld %f %f\n", + b, h, i, l, f, d); +*/ return (float)(b + h + i + l + f + d); } EXPORT(double) _testfunc_d_bhilfd(signed char b, short h, int i, long l, float f, double d) { -// printf("_testfunc_d_bhilfd got %d %d %d %ld %f %f\n", -// b, h, i, l, f, d); +/* printf("_testfunc_d_bhilfd got %d %d %d %ld %f %f\n", + b, h, i, l, f, d); +*/ return (double)(b + h + i + l + f + d); } @@ -368,8 +371,9 @@ } PyMethodDef module_methods[] = { -// {"get_last_tf_arg_s", get_last_tf_arg_s, METH_NOARGS}, -// {"get_last_tf_arg_u", get_last_tf_arg_u, METH_NOARGS}, +/* {"get_last_tf_arg_s", get_last_tf_arg_s, METH_NOARGS}, + {"get_last_tf_arg_u", get_last_tf_arg_u, METH_NOARGS}, +*/ {"func_si", py_func_si, METH_VARARGS}, {"func", py_func, METH_NOARGS}, { NULL, NULL, 0, NULL}, Modified: stackless/branches/release25-maint/Modules/_ctypes/callbacks.c ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/callbacks.c (original) +++ stackless/branches/release25-maint/Modules/_ctypes/callbacks.c Sat Apr 14 15:02:57 2007 @@ -293,8 +293,11 @@ p->restype = &ffi_type_void; } else { StgDictObject *dict = PyType_stgdict(restype); - if (dict == NULL) - goto error; + if (dict == NULL || dict->setfunc == NULL) { + PyErr_SetString(PyExc_TypeError, + "invalid result type for callback function"); + goto error; + } p->setfunc = dict->setfunc; p->restype = &dict->ffi_type_pointer; } Modified: stackless/branches/release25-maint/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c (original) +++ stackless/branches/release25-maint/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c Sat Apr 14 15:02:57 2007 @@ -1,4 +1,4 @@ -#ifdef __ppc__ +#if !(defined(__APPLE__) && !defined(__ppc__)) /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998 Geoffrey Keating Modified: stackless/branches/release25-maint/Modules/_ctypes/libffi/src/x86/sysv.S ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/libffi/src/x86/sysv.S (original) +++ stackless/branches/release25-maint/Modules/_ctypes/libffi/src/x86/sysv.S Sat Apr 14 15:02:57 2007 @@ -376,3 +376,7 @@ #endif #endif /* ifndef __x86_64__ */ + +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif Modified: stackless/branches/release25-maint/Modules/_ctypes/stgdict.c ============================================================================== --- stackless/branches/release25-maint/Modules/_ctypes/stgdict.c (original) +++ stackless/branches/release25-maint/Modules/_ctypes/stgdict.c Sat Apr 14 15:02:57 2007 @@ -339,14 +339,14 @@ stgdict = PyType_stgdict(type); if (!stgdict) return -1; + /* If this structure/union is already marked final we cannot assign + _fields_ anymore. */ + if (stgdict->flags & DICTFLAG_FINAL) {/* is final ? */ PyErr_SetString(PyExc_AttributeError, "_fields_ is final"); return -1; } - /* XXX This should probably be moved to a point when all this - stuff is sucessfully finished. */ - stgdict->flags |= DICTFLAG_FINAL; /* set final */ if (stgdict->ffi_type_pointer.elements) PyMem_Free(stgdict->ffi_type_pointer.elements); @@ -480,5 +480,15 @@ stgdict->size = size; stgdict->align = total_align; stgdict->length = len; /* ADD ffi_ofs? */ + + /* We did check that this flag was NOT set above, it must not + have been set until now. */ + if (stgdict->flags & DICTFLAG_FINAL) { + PyErr_SetString(PyExc_AttributeError, + "Structure or union cannot contain itself"); + return -1; + } + stgdict->flags |= DICTFLAG_FINAL; + return MakeAnonFields(type); } Modified: stackless/branches/release25-maint/Modules/_cursesmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/_cursesmodule.c (original) +++ stackless/branches/release25-maint/Modules/_cursesmodule.c Sat Apr 14 15:02:57 2007 @@ -2196,19 +2196,72 @@ } } +/* Internal helper used for updating curses.LINES, curses.COLS, _curses.LINES + * and _curses.COLS */ +static int +update_lines_cols(void) +{ + PyObject *o; + PyObject *m = PyImport_ImportModule("curses"); + + if (!m) + return 0; + + o = PyInt_FromLong(LINES); + if (!o) { + Py_DECREF(m); + return 0; + } + if (PyObject_SetAttrString(m, "LINES", o)) { + Py_DECREF(m); + Py_DECREF(o); + return 0; + } + if (PyDict_SetItemString(ModDict, "LINES", o)) { + Py_DECREF(m); + Py_DECREF(o); + return 0; + } + Py_DECREF(o); + o = PyInt_FromLong(COLS); + if (!o) { + Py_DECREF(m); + return 0; + } + if (PyObject_SetAttrString(m, "COLS", o)) { + Py_DECREF(m); + Py_DECREF(o); + return 0; + } + if (PyDict_SetItemString(ModDict, "COLS", o)) { + Py_DECREF(m); + Py_DECREF(o); + return 0; + } + Py_DECREF(o); + Py_DECREF(m); + return 1; +} + #ifdef HAVE_CURSES_RESIZETERM static PyObject * PyCurses_ResizeTerm(PyObject *self, PyObject *args) { int lines; int columns; + PyObject *result; PyCursesInitialised if (!PyArg_ParseTuple(args,"ii:resizeterm", &lines, &columns)) return NULL; - return PyCursesCheckERR(resizeterm(lines, columns), "resizeterm"); + result = PyCursesCheckERR(resizeterm(lines, columns), "resizeterm"); + if (!result) + return NULL; + if (!update_lines_cols()) + return NULL; + return result; } #endif @@ -2220,12 +2273,19 @@ int lines; int columns; + PyObject *result; + PyCursesInitialised if (!PyArg_ParseTuple(args,"ii:resize_term", &lines, &columns)) return NULL; - return PyCursesCheckERR(resize_term(lines, columns), "resize_term"); + result = PyCursesCheckERR(resize_term(lines, columns), "resize_term"); + if (!result) + return NULL; + if (!update_lines_cols()) + return NULL; + return result; } #endif /* HAVE_CURSES_RESIZE_TERM */ Modified: stackless/branches/release25-maint/Modules/_localemodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/_localemodule.c (original) +++ stackless/branches/release25-maint/Modules/_localemodule.c Sat Apr 14 15:02:57 2007 @@ -360,7 +360,7 @@ buf = PyMem_Malloc(n1); if (!buf) return PyErr_NoMemory(); - n2 = strxfrm(buf, s, n1); + n2 = strxfrm(buf, s, n1) + 1; if (n2 > n1) { /* more space needed */ buf = PyMem_Realloc(buf, n2); Modified: stackless/branches/release25-maint/Modules/_randommodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/_randommodule.c (original) +++ stackless/branches/release25-maint/Modules/_randommodule.c Sat Apr 14 15:02:57 2007 @@ -481,7 +481,7 @@ RandomObject *self; PyObject *tmp; - if (!_PyArg_NoKeywords("Random()", kwds)) + if (type == &Random_Type && !_PyArg_NoKeywords("Random()", kwds)) return NULL; self = (RandomObject *)type->tp_alloc(type, 0); Modified: stackless/branches/release25-maint/Modules/_struct.c ============================================================================== --- stackless/branches/release25-maint/Modules/_struct.c (original) +++ stackless/branches/release25-maint/Modules/_struct.c Sat Apr 14 15:02:57 2007 @@ -1485,17 +1485,35 @@ static PyObject * s_unpack(PyObject *self, PyObject *inputstr) { + char *start; + Py_ssize_t len; + PyObject *args=NULL, *result; PyStructObject *soself = (PyStructObject *)self; assert(PyStruct_Check(self)); assert(soself->s_codes != NULL); - if (inputstr == NULL || !PyString_Check(inputstr) || - PyString_GET_SIZE(inputstr) != soself->s_size) { - PyErr_Format(StructError, - "unpack requires a string argument of length %zd", - soself->s_size); - return NULL; - } - return s_unpack_internal(soself, PyString_AS_STRING(inputstr)); + if (inputstr == NULL) + goto fail; + if (PyString_Check(inputstr) && + PyString_GET_SIZE(inputstr) == soself->s_size) { + return s_unpack_internal(soself, PyString_AS_STRING(inputstr)); + } + args = PyTuple_Pack(1, inputstr); + if (args == NULL) + return NULL; + if (!PyArg_ParseTuple(args, "s#:unpack", &start, &len)) + goto fail; + if (soself->s_size != len) + goto fail; + result = s_unpack_internal(soself, start); + Py_DECREF(args); + return result; + +fail: + Py_XDECREF(args); + PyErr_Format(StructError, + "unpack requires a string argument of length %zd", + soself->s_size); + return NULL; } PyDoc_STRVAR(s_unpack_from__doc__, Modified: stackless/branches/release25-maint/Modules/_testcapimodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/_testcapimodule.c (original) +++ stackless/branches/release25-maint/Modules/_testcapimodule.c Sat Apr 14 15:02:57 2007 @@ -6,6 +6,8 @@ */ #include "Python.h" +#include +#include "structmember.h" #ifdef WITH_THREAD #include "pythread.h" @@ -35,13 +37,13 @@ platforms have these hardcoded. Better safe than sorry. */ static PyObject* -sizeof_error(const char* fatname, const char* typename, +sizeof_error(const char* fatname, const char* typname, int expected, int got) { char buf[1024]; PyOS_snprintf(buf, sizeof(buf), "%.200s #define == %d but sizeof(%.200s) == %d", - fatname, expected, typename, got); + fatname, expected, typname, got); PyErr_SetString(TestError, buf); return (PyObject*)NULL; } @@ -615,7 +617,7 @@ { PyObject *rc; PyGILState_STATE s = PyGILState_Ensure(); - rc = PyObject_CallFunction(callable, ""); + rc = PyObject_CallFunction((PyObject *)callable, ""); Py_XDECREF(rc); PyGILState_Release(s); } @@ -665,6 +667,9 @@ PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ Py_END_ALLOW_THREADS + /* Release lock we acquired above. This is required on HP-UX. */ + PyThread_release_lock(thread_done); + PyThread_free_lock(thread_done); Py_RETURN_NONE; } @@ -756,6 +761,105 @@ #define AddSym(d, n, f, v) {PyObject *o = f(v); PyDict_SetItemString(d, n, o); Py_DECREF(o);} +typedef struct { + char byte_member; + unsigned char ubyte_member; + short short_member; + unsigned short ushort_member; + int int_member; + unsigned int uint_member; + long long_member; + unsigned long ulong_member; + float float_member; + double double_member; +} all_structmembers; + +typedef struct { + PyObject_HEAD + all_structmembers structmembers; +} test_structmembers; + +static struct PyMemberDef test_members[] = { + {"T_BYTE", T_BYTE, offsetof(test_structmembers, structmembers.byte_member), 0, NULL}, + {"T_UBYTE", T_UBYTE, offsetof(test_structmembers, structmembers.ubyte_member), 0, NULL}, + {"T_SHORT", T_SHORT, offsetof(test_structmembers, structmembers.short_member), 0, NULL}, + {"T_USHORT", T_USHORT, offsetof(test_structmembers, structmembers.ushort_member), 0, NULL}, + {"T_INT", T_INT, offsetof(test_structmembers, structmembers.int_member), 0, NULL}, + {"T_UINT", T_UINT, offsetof(test_structmembers, structmembers.uint_member), 0, NULL}, + {"T_LONG", T_LONG, offsetof(test_structmembers, structmembers.long_member), 0, NULL}, + {"T_ULONG", T_ULONG, offsetof(test_structmembers, structmembers.ulong_member), 0, NULL}, + {"T_FLOAT", T_FLOAT, offsetof(test_structmembers, structmembers.float_member), 0, NULL}, + {"T_DOUBLE", T_DOUBLE, offsetof(test_structmembers, structmembers.double_member), 0, NULL}, + {NULL} +}; + + +static PyObject *test_structmembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs){ + static char *keywords[]={"T_BYTE", "T_UBYTE", "T_SHORT", "T_USHORT", "T_INT", "T_UINT", + "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", NULL}; + test_structmembers *ob=PyObject_New(test_structmembers, type); + if (ob==NULL) + return NULL; + memset(&ob->structmembers, 0, sizeof(all_structmembers)); + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|bBhHiIlkfd", keywords, + &ob->structmembers.byte_member, &ob->structmembers.ubyte_member, + &ob->structmembers.short_member, &ob->structmembers.ushort_member, + &ob->structmembers.int_member, &ob->structmembers.uint_member, + &ob->structmembers.long_member, &ob->structmembers.ulong_member, + &ob->structmembers.float_member, &ob->structmembers.double_member)){ + Py_DECREF(ob); + return NULL; + } + return (PyObject *)ob; +} + +static void test_structmembers_free(PyObject *ob){ + PyObject_FREE(ob); +} + +static PyTypeObject test_structmembersType = { + PyObject_HEAD_INIT(NULL) + 0, + "test_structmembersType", + sizeof(test_structmembers), /* tp_basicsize */ + 0, /* tp_itemsize */ + test_structmembers_free, /* destructor tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, + PyObject_GenericSetAttr, + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + "Type containing all structmember types", + 0, /* traverseproc tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + test_members, /* tp_members */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + test_structmembers_new, /* tp_new */ +}; + + PyMODINIT_FUNC init_testcapi(void) { @@ -765,16 +869,28 @@ if (m == NULL) return; + test_structmembersType.ob_type=&PyType_Type; + Py_INCREF(&test_structmembersType); + PyModule_AddObject(m, "test_structmembersType", (PyObject *)&test_structmembersType); + + PyModule_AddObject(m, "CHAR_MAX", PyInt_FromLong(CHAR_MAX)); + PyModule_AddObject(m, "CHAR_MIN", PyInt_FromLong(CHAR_MIN)); PyModule_AddObject(m, "UCHAR_MAX", PyInt_FromLong(UCHAR_MAX)); + PyModule_AddObject(m, "SHRT_MAX", PyInt_FromLong(SHRT_MAX)); + PyModule_AddObject(m, "SHRT_MIN", PyInt_FromLong(SHRT_MIN)); PyModule_AddObject(m, "USHRT_MAX", PyInt_FromLong(USHRT_MAX)); + PyModule_AddObject(m, "INT_MAX", PyLong_FromLong(INT_MAX)); + PyModule_AddObject(m, "INT_MIN", PyLong_FromLong(INT_MIN)); PyModule_AddObject(m, "UINT_MAX", PyLong_FromUnsignedLong(UINT_MAX)); - PyModule_AddObject(m, "ULONG_MAX", PyLong_FromUnsignedLong(ULONG_MAX)); - PyModule_AddObject(m, "INT_MIN", PyInt_FromLong(INT_MIN)); - PyModule_AddObject(m, "LONG_MIN", PyInt_FromLong(LONG_MIN)); - PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN)); - PyModule_AddObject(m, "INT_MAX", PyInt_FromLong(INT_MAX)); PyModule_AddObject(m, "LONG_MAX", PyInt_FromLong(LONG_MAX)); + PyModule_AddObject(m, "LONG_MIN", PyInt_FromLong(LONG_MIN)); + PyModule_AddObject(m, "ULONG_MAX", PyLong_FromUnsignedLong(ULONG_MAX)); + PyModule_AddObject(m, "FLT_MAX", PyFloat_FromDouble(FLT_MAX)); + PyModule_AddObject(m, "FLT_MIN", PyFloat_FromDouble(FLT_MIN)); + PyModule_AddObject(m, "DBL_MAX", PyFloat_FromDouble(DBL_MAX)); + PyModule_AddObject(m, "DBL_MIN", PyFloat_FromDouble(DBL_MIN)); PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyInt_FromSsize_t(PY_SSIZE_T_MAX)); + PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN)); TestError = PyErr_NewException("_testcapi.error", NULL, NULL); Py_INCREF(TestError); Modified: stackless/branches/release25-maint/Modules/arraymodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/arraymodule.c (original) +++ stackless/branches/release25-maint/Modules/arraymodule.c Sat Apr 14 15:02:57 2007 @@ -1147,12 +1147,19 @@ dict = Py_None; Py_INCREF(dict); } - result = Py_BuildValue("O(cs#)O", - array->ob_type, - array->ob_descr->typecode, - array->ob_item, - array->ob_size * array->ob_descr->itemsize, - dict); + if (array->ob_size > 0) { + result = Py_BuildValue("O(cs#)O", + array->ob_type, + array->ob_descr->typecode, + array->ob_item, + array->ob_size * array->ob_descr->itemsize, + dict); + } else { + result = Py_BuildValue("O(c)O", + array->ob_type, + array->ob_descr->typecode, + dict); + } Py_DECREF(dict); return result; } @@ -1495,7 +1502,7 @@ copy_doc}, {"count", (PyCFunction)array_count, METH_O, count_doc}, - {"__deepcopy__",(PyCFunction)array_copy, METH_NOARGS, + {"__deepcopy__",(PyCFunction)array_copy, METH_O, copy_doc}, {"extend", (PyCFunction)array_extend, METH_O, extend_doc}, @@ -1738,6 +1745,8 @@ (objobjargproc)array_ass_subscr }; +static const void *emptybuf = ""; + static Py_ssize_t array_buffer_getreadbuf(arrayobject *self, Py_ssize_t index, const void **ptr) { @@ -1747,6 +1756,8 @@ return -1; } *ptr = (void *)self->ob_item; + if (*ptr == NULL) + *ptr = emptybuf; return self->ob_size*self->ob_descr->itemsize; } @@ -1759,6 +1770,8 @@ return -1; } *ptr = (void *)self->ob_item; + if (*ptr == NULL) + *ptr = emptybuf; return self->ob_size*self->ob_descr->itemsize; } @@ -1797,7 +1810,7 @@ PyObject *initial = NULL, *it = NULL; struct arraydescr *descr; - if (!_PyArg_NoKeywords("array.array()", kwds)) + if (type == &Arraytype && !_PyArg_NoKeywords("array.array()", kwds)) return NULL; if (!PyArg_ParseTuple(args, "c|O:array", &c, &initial)) Modified: stackless/branches/release25-maint/Modules/binascii.c ============================================================================== --- stackless/branches/release25-maint/Modules/binascii.c (original) +++ stackless/branches/release25-maint/Modules/binascii.c Sat Apr 14 15:02:57 2007 @@ -1057,8 +1057,7 @@ in++; if (in >= datalen) break; /* Soft line breaks */ - if ((data[in] == '\n') || (data[in] == '\r') || - (data[in] == ' ') || (data[in] == '\t')) { + if ((data[in] == '\n') || (data[in] == '\r')) { if (data[in] != '\n') { while (in < datalen && data[in] != '\n') in++; } Modified: stackless/branches/release25-maint/Modules/bz2module.c ============================================================================== --- stackless/branches/release25-maint/Modules/bz2module.c (original) +++ stackless/branches/release25-maint/Modules/bz2module.c Sat Apr 14 15:02:57 2007 @@ -996,7 +996,7 @@ char small_buffer[SMALLCHUNK]; char *buffer = small_buffer; size_t buffersize = SMALLCHUNK; - int bytesread = 0; + Py_off_t bytesread = 0; size_t readsize; int chunksize; int bzerror; @@ -1579,6 +1579,8 @@ Util_CatchBZ2Error(bzerror); goto error; } + if (bzs->avail_in == 0) + break; /* no more input data */ if (bzs->avail_out == 0) { bufsize = Util_NewBufferSize(bufsize); if (_PyString_Resize(&ret, bufsize) < 0) { @@ -1588,8 +1590,6 @@ bzs->next_out = BUF(ret) + (BZS_TOTAL_OUT(bzs) - totalout); bzs->avail_out = bufsize - (bzs->next_out - BUF(ret)); - } else if (bzs->avail_in == 0) { - break; } } @@ -1871,6 +1871,8 @@ Util_CatchBZ2Error(bzerror); goto error; } + if (bzs->avail_in == 0) + break; /* no more input data */ if (bzs->avail_out == 0) { bufsize = Util_NewBufferSize(bufsize); if (_PyString_Resize(&ret, bufsize) < 0) { @@ -1881,8 +1883,6 @@ bzs->next_out = BUF(ret) + (BZS_TOTAL_OUT(bzs) - totalout); bzs->avail_out = bufsize - (bzs->next_out - BUF(ret)); - } else if (bzs->avail_in == 0) { - break; } } @@ -2160,6 +2160,13 @@ Py_DECREF(ret); return NULL; } + if (bzs->avail_in == 0) { + BZ2_bzDecompressEnd(bzs); + PyErr_SetString(PyExc_ValueError, + "couldn't find end of stream"); + Py_DECREF(ret); + return NULL; + } if (bzs->avail_out == 0) { bufsize = Util_NewBufferSize(bufsize); if (_PyString_Resize(&ret, bufsize) < 0) { @@ -2169,12 +2176,6 @@ } bzs->next_out = BUF(ret) + BZS_TOTAL_OUT(bzs); bzs->avail_out = bufsize - (bzs->next_out - BUF(ret)); - } else if (bzs->avail_in == 0) { - BZ2_bzDecompressEnd(bzs); - PyErr_SetString(PyExc_ValueError, - "couldn't find end of stream"); - Py_DECREF(ret); - return NULL; } } Modified: stackless/branches/release25-maint/Modules/cStringIO.c ============================================================================== --- stackless/branches/release25-maint/Modules/cStringIO.c (original) +++ stackless/branches/release25-maint/Modules/cStringIO.c Sat Apr 14 15:02:57 2007 @@ -657,7 +657,7 @@ char *buf; Py_ssize_t size; - if (PyObject_AsCharBuffer(s, (const void **)&buf, &size) != 0) + if (PyObject_AsCharBuffer(s, (const char **)&buf, &size) != 0) return NULL; self = PyObject_New(Iobject, &Itype); Modified: stackless/branches/release25-maint/Modules/collectionsmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/collectionsmodule.c (original) +++ stackless/branches/release25-maint/Modules/collectionsmodule.c Sat Apr 14 15:02:57 2007 @@ -95,7 +95,7 @@ dequeobject *deque; block *b; - if (!_PyArg_NoKeywords("deque()", kwds)) + if (type == &deque_type && !_PyArg_NoKeywords("deque()", kwds)) return NULL; /* create dequeobject structure */ @@ -911,15 +911,14 @@ { PyObject *item; - if (it->counter == 0) - return NULL; - if (it->deque->state != it->state) { it->counter = 0; PyErr_SetString(PyExc_RuntimeError, "deque mutated during iteration"); return NULL; } + if (it->counter == 0) + return NULL; assert (!(it->b == it->deque->rightblock && it->index > it->deque->rightindex)); @@ -1076,7 +1075,7 @@ PyDoc_STRVAR(defdict_missing_doc, "__missing__(key) # Called by __getitem__ for missing key; pseudo-code:\n\ - if self.default_factory is None: raise KeyError(key)\n\ + if self.default_factory is None: raise KeyError((key,))\n\ self[key] = value = self.default_factory()\n\ return value\n\ "); @@ -1088,7 +1087,11 @@ PyObject *value; if (factory == NULL || factory == Py_None) { /* XXX Call dict.__missing__(key) */ - PyErr_SetObject(PyExc_KeyError, key); + PyObject *tup; + tup = PyTuple_Pack(1, key); + if (!tup) return NULL; + PyErr_SetObject(PyExc_KeyError, tup); + Py_DECREF(tup); return NULL; } value = PyEval_CallObject(factory, NULL); @@ -1253,8 +1256,14 @@ newargs = PyTuple_New(0); else { Py_ssize_t n = PyTuple_GET_SIZE(args); - if (n > 0) + if (n > 0) { newdefault = PyTuple_GET_ITEM(args, 0); + if (!PyCallable_Check(newdefault)) { + PyErr_SetString(PyExc_TypeError, + "first argument must be callable"); + return -1; + } + } newargs = PySequence_GetSlice(args, 1, n); } if (newargs == NULL) Modified: stackless/branches/release25-maint/Modules/datetimemodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/datetimemodule.c (original) +++ stackless/branches/release25-maint/Modules/datetimemodule.c Sat Apr 14 15:02:57 2007 @@ -3166,8 +3166,11 @@ return PyObject_CallMethod((PyObject *)self, "isoformat", "()"); } +/* Even though this silently ignores all arguments, it cannot + be fixed to reject them in release25-maint */ static PyObject * -time_isoformat(PyDateTime_Time *self) +time_isoformat(PyDateTime_Time *self, PyObject *unused_args, + PyObject *unused_keywords) { char buf[100]; PyObject *result; @@ -3683,6 +3686,12 @@ return NULL; fraction = timestamp - (double)timet; us = (int)round_to_long(fraction * 1e6); + if (us < 0) { + /* Truncation towards zero is not what we wanted + for negative numbers (Python's mod semantics) */ + timet -= 1; + us += 1000000; + } /* If timestamp is less than one microsecond smaller than a * full second, round up. Otherwise, ValueErrors are raised * for some floats. */ Modified: stackless/branches/release25-maint/Modules/itertoolsmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/itertoolsmodule.c (original) +++ stackless/branches/release25-maint/Modules/itertoolsmodule.c Sat Apr 14 15:02:57 2007 @@ -681,7 +681,7 @@ PyObject *saved; cycleobject *lz; - if (!_PyArg_NoKeywords("cycle()", kwds)) + if (type == &cycle_type && !_PyArg_NoKeywords("cycle()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "cycle", 1, 1, &iterable)) @@ -831,7 +831,7 @@ PyObject *it; dropwhileobject *lz; - if (!_PyArg_NoKeywords("dropwhile()", kwds)) + if (type == &dropwhile_type && !_PyArg_NoKeywords("dropwhile()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "dropwhile", 2, 2, &func, &seq)) @@ -975,7 +975,7 @@ PyObject *it; takewhileobject *lz; - if (!_PyArg_NoKeywords("takewhile()", kwds)) + if (type == &takewhile_type && !_PyArg_NoKeywords("takewhile()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "takewhile", 2, 2, &func, &seq)) @@ -1120,7 +1120,7 @@ Py_ssize_t numargs; isliceobject *lz; - if (!_PyArg_NoKeywords("islice()", kwds)) + if (type == &islice_type && !_PyArg_NoKeywords("islice()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "islice", 2, 4, &seq, &a1, &a2, &a3)) @@ -1311,7 +1311,7 @@ PyObject *it; starmapobject *lz; - if (!_PyArg_NoKeywords("starmap()", kwds)) + if (type == &starmap_type && !_PyArg_NoKeywords("starmap()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "starmap", 2, 2, &func, &seq)) @@ -1443,7 +1443,7 @@ imapobject *lz; Py_ssize_t numargs, i; - if (!_PyArg_NoKeywords("imap()", kwds)) + if (type == &imap_type && !_PyArg_NoKeywords("imap()", kwds)) return NULL; numargs = PyTuple_Size(args); @@ -1625,7 +1625,7 @@ Py_ssize_t i; PyObject *ittuple; - if (!_PyArg_NoKeywords("chain()", kwds)) + if (type == &chain_type && !_PyArg_NoKeywords("chain()", kwds)) return NULL; /* obtain iterators */ @@ -1768,7 +1768,7 @@ PyObject *it; ifilterobject *lz; - if (!_PyArg_NoKeywords("ifilter()", kwds)) + if (type == &ifilter_type && !_PyArg_NoKeywords("ifilter()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "ifilter", 2, 2, &func, &seq)) @@ -1912,7 +1912,8 @@ PyObject *it; ifilterfalseobject *lz; - if (!_PyArg_NoKeywords("ifilterfalse()", kwds)) + if (type == &ifilterfalse_type && + !_PyArg_NoKeywords("ifilterfalse()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "ifilterfalse", 2, 2, &func, &seq)) @@ -2054,7 +2055,7 @@ countobject *lz; Py_ssize_t cnt = 0; - if (!_PyArg_NoKeywords("count()", kwds)) + if (type == &count_type && !_PyArg_NoKeywords("count()", kwds)) return NULL; if (!PyArg_ParseTuple(args, "|n:count", &cnt)) @@ -2072,6 +2073,11 @@ static PyObject * count_next(countobject *lz) { + if (lz->cnt == LONG_MAX) { + PyErr_SetString(PyExc_OverflowError, + "cannot count beyond LONG_MAX"); + return NULL; + } return PyInt_FromSsize_t(lz->cnt++); } @@ -2153,7 +2159,7 @@ PyObject *result; Py_ssize_t tuplesize = PySequence_Length(args); - if (!_PyArg_NoKeywords("izip()", kwds)) + if (type == &izip_type && !_PyArg_NoKeywords("izip()", kwds)) return NULL; /* args must be a tuple */ @@ -2336,7 +2342,7 @@ PyObject *element; Py_ssize_t cnt = -1; - if (!_PyArg_NoKeywords("repeat()", kwds)) + if (type == &repeat_type && !_PyArg_NoKeywords("repeat()", kwds)) return NULL; if (!PyArg_ParseTuple(args, "O|n:repeat", &element, &cnt)) Modified: stackless/branches/release25-maint/Modules/main.c ============================================================================== --- stackless/branches/release25-maint/Modules/main.c (original) +++ stackless/branches/release25-maint/Modules/main.c Sat Apr 14 15:02:57 2007 @@ -176,6 +176,33 @@ return 0; } +/* Wait until threading._shutdown completes, provided + the threading module was imported in the first place. + The shutdown routine will wait until all non-daemon + "threading" threads have completed. */ +#include "abstract.h" +static void +WaitForThreadShutdown() +{ +#ifdef WITH_THREAD + PyObject *result; + PyThreadState *tstate = PyThreadState_GET(); + PyObject *threading = PyMapping_GetItemString(tstate->interp->modules, + "threading"); + if (threading == NULL) { + /* threading not imported */ + PyErr_Clear(); + return; + } + result = PyObject_CallMethod(threading, "_shutdown", ""); + if (result == NULL) + PyErr_WriteUnraisable(threading); + else + Py_DECREF(result); + Py_DECREF(threading); +#endif +} + /* Main program */ int @@ -513,6 +540,8 @@ /* XXX */ sts = PyRun_AnyFileFlags(stdin, "", &cf) != 0; + WaitForThreadShutdown(); + Py_Finalize(); #ifdef RISCOS if (Py_RISCOSWimpFlag) Modified: stackless/branches/release25-maint/Modules/operator.c ============================================================================== --- stackless/branches/release25-maint/Modules/operator.c (original) +++ stackless/branches/release25-maint/Modules/operator.c Sat Apr 14 15:02:57 2007 @@ -168,43 +168,41 @@ op_getslice(PyObject *s, PyObject *a) { PyObject *a1; - int a2,a3; + Py_ssize_t a2, a3; - if (!PyArg_ParseTuple(a,"Oii:getslice",&a1,&a2,&a3)) + if (!PyArg_ParseTuple(a, "Onn:getslice", &a1, &a2, &a3)) return NULL; - return PySequence_GetSlice(a1,a2,a3); + return PySequence_GetSlice(a1, a2, a3); } static PyObject* op_setslice(PyObject *s, PyObject *a) { PyObject *a1, *a4; - int a2,a3; + Py_ssize_t a2, a3; - if (!PyArg_ParseTuple(a,"OiiO:setslice",&a1,&a2,&a3,&a4)) + if (!PyArg_ParseTuple(a, "OnnO:setslice", &a1, &a2, &a3, &a4)) return NULL; - if (-1 == PySequence_SetSlice(a1,a2,a3,a4)) + if (-1 == PySequence_SetSlice(a1, a2, a3, a4)) return NULL; - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } static PyObject* op_delslice(PyObject *s, PyObject *a) { PyObject *a1; - int a2,a3; + Py_ssize_t a2, a3; - if(! PyArg_ParseTuple(a,"Oii:delslice",&a1,&a2,&a3)) + if (!PyArg_ParseTuple(a, "Onn:delslice", &a1, &a2, &a3)) return NULL; - if (-1 == PySequence_DelSlice(a1,a2,a3)) + if (-1 == PySequence_DelSlice(a1, a2, a3)) return NULL; - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } #undef spam1 Modified: stackless/branches/release25-maint/Modules/posixmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/posixmodule.c (original) +++ stackless/branches/release25-maint/Modules/posixmodule.c Sat Apr 14 15:02:57 2007 @@ -844,14 +844,48 @@ *(FARPROC*)&gfaxw = GetProcAddress(hKernel32, "GetFileAttributesExW"); } +static BOOL +attributes_from_dir(LPCSTR pszFile, LPWIN32_FILE_ATTRIBUTE_DATA pfad) +{ + HANDLE hFindFile; + WIN32_FIND_DATAA FileData; + hFindFile = FindFirstFileA(pszFile, &FileData); + if (hFindFile == INVALID_HANDLE_VALUE) + return FALSE; + FindClose(hFindFile); + pfad->dwFileAttributes = FileData.dwFileAttributes; + pfad->ftCreationTime = FileData.ftCreationTime; + pfad->ftLastAccessTime = FileData.ftLastAccessTime; + pfad->ftLastWriteTime = FileData.ftLastWriteTime; + pfad->nFileSizeHigh = FileData.nFileSizeHigh; + pfad->nFileSizeLow = FileData.nFileSizeLow; + return TRUE; +} + +static BOOL +attributes_from_dir_w(LPCWSTR pszFile, LPWIN32_FILE_ATTRIBUTE_DATA pfad) +{ + HANDLE hFindFile; + WIN32_FIND_DATAW FileData; + hFindFile = FindFirstFileW(pszFile, &FileData); + if (hFindFile == INVALID_HANDLE_VALUE) + return FALSE; + FindClose(hFindFile); + pfad->dwFileAttributes = FileData.dwFileAttributes; + pfad->ftCreationTime = FileData.ftCreationTime; + pfad->ftLastAccessTime = FileData.ftLastAccessTime; + pfad->ftLastWriteTime = FileData.ftLastWriteTime; + pfad->nFileSizeHigh = FileData.nFileSizeHigh; + pfad->nFileSizeLow = FileData.nFileSizeLow; + return TRUE; +} + static BOOL WINAPI Py_GetFileAttributesExA(LPCSTR pszFile, GET_FILEEX_INFO_LEVELS level, LPVOID pv) { BOOL result; - HANDLE hFindFile; - WIN32_FIND_DATAA FileData; LPWIN32_FILE_ATTRIBUTE_DATA pfad = pv; /* First try to use the system's implementation, if that is available and either succeeds to gives an error other than @@ -873,17 +907,7 @@ accept). */ if (GetFileAttributesA(pszFile) == 0xFFFFFFFF) return FALSE; - hFindFile = FindFirstFileA(pszFile, &FileData); - if (hFindFile == INVALID_HANDLE_VALUE) - return FALSE; - FindClose(hFindFile); - pfad->dwFileAttributes = FileData.dwFileAttributes; - pfad->ftCreationTime = FileData.ftCreationTime; - pfad->ftLastAccessTime = FileData.ftLastAccessTime; - pfad->ftLastWriteTime = FileData.ftLastWriteTime; - pfad->nFileSizeHigh = FileData.nFileSizeHigh; - pfad->nFileSizeLow = FileData.nFileSizeLow; - return TRUE; + return attributes_from_dir(pszFile, pfad); } static BOOL WINAPI @@ -892,8 +916,6 @@ LPVOID pv) { BOOL result; - HANDLE hFindFile; - WIN32_FIND_DATAW FileData; LPWIN32_FILE_ATTRIBUTE_DATA pfad = pv; /* First try to use the system's implementation, if that is available and either succeeds to gives an error other than @@ -915,17 +937,7 @@ accept). */ if (GetFileAttributesW(pszFile) == 0xFFFFFFFF) return FALSE; - hFindFile = FindFirstFileW(pszFile, &FileData); - if (hFindFile == INVALID_HANDLE_VALUE) - return FALSE; - FindClose(hFindFile); - pfad->dwFileAttributes = FileData.dwFileAttributes; - pfad->ftCreationTime = FileData.ftCreationTime; - pfad->ftLastAccessTime = FileData.ftLastAccessTime; - pfad->ftLastWriteTime = FileData.ftLastWriteTime; - pfad->nFileSizeHigh = FileData.nFileSizeHigh; - pfad->nFileSizeLow = FileData.nFileSizeLow; - return TRUE; + return attributes_from_dir_w(pszFile, pfad); } static int @@ -936,10 +948,20 @@ char *dot; /* XXX not supported on Win95 and NT 3.x */ if (!Py_GetFileAttributesExA(path, GetFileExInfoStandard, &info)) { - /* Protocol violation: we explicitly clear errno, instead of - setting it to a POSIX error. Callers should use GetLastError. */ - errno = 0; - return -1; + if (GetLastError() != ERROR_SHARING_VIOLATION) { + /* Protocol violation: we explicitly clear errno, instead of + setting it to a POSIX error. Callers should use GetLastError. */ + errno = 0; + return -1; + } else { + /* Could not get attributes on open file. Fall back to + reading the directory. */ + if (!attributes_from_dir(path, &info)) { + /* Very strange. This should not fail now */ + errno = 0; + return -1; + } + } } code = attribute_data_to_stat(&info, result); if (code != 0) @@ -964,10 +986,20 @@ WIN32_FILE_ATTRIBUTE_DATA info; /* XXX not supported on Win95 and NT 3.x */ if (!Py_GetFileAttributesExW(path, GetFileExInfoStandard, &info)) { - /* Protocol violation: we explicitly clear errno, instead of - setting it to a POSIX error. Callers should use GetLastError. */ - errno = 0; - return -1; + if (GetLastError() != ERROR_SHARING_VIOLATION) { + /* Protocol violation: we explicitly clear errno, instead of + setting it to a POSIX error. Callers should use GetLastError. */ + errno = 0; + return -1; + } else { + /* Could not get attributes on open file. Fall back to + reading the directory. */ + if (!attributes_from_dir_w(path, &info)) { + /* Very strange. This should not fail now */ + errno = 0; + return -1; + } + } } code = attribute_data_to_stat(&info, result); if (code < 0) @@ -1462,7 +1494,7 @@ /* POSIX methods */ PyDoc_STRVAR(posix_access__doc__, -"access(path, mode) -> 1 if granted, 0 otherwise\n\n\ +"access(path, mode) -> True if granted, False otherwise\n\n\ Use the real uid/gid to test for access to a path. Note that most\n\ operations will use the effective uid/gid, therefore this routine can\n\ be used in a suid/sgid environment to test if the invoking user has the\n\ Modified: stackless/branches/release25-maint/Modules/readline.c ============================================================================== --- stackless/branches/release25-maint/Modules/readline.c (original) +++ stackless/branches/release25-maint/Modules/readline.c Sat Apr 14 15:02:57 2007 @@ -768,10 +768,16 @@ while (!has_input) { struct timeval timeout = {0, 100000}; /* 0.1 seconds */ + + /* [Bug #1552726] Only limit the pause if an input hook has been + defined. */ + struct timeval *timeoutp = NULL; + if (PyOS_InputHook) + timeoutp = &timeout; FD_SET(fileno(rl_instream), &selectset); /* select resets selectset if no input was available */ has_input = select(fileno(rl_instream) + 1, &selectset, - NULL, NULL, &timeout); + NULL, NULL, timeoutp); if(PyOS_InputHook) PyOS_InputHook(); } Modified: stackless/branches/release25-maint/Modules/socketmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/socketmodule.c (original) +++ stackless/branches/release25-maint/Modules/socketmodule.c Sat Apr 14 15:02:57 2007 @@ -364,19 +364,16 @@ #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM #define sockaddr_l2 sockaddr_l2cap #define sockaddr_rc sockaddr_rfcomm -#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr) #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb) #define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb) #elif defined(__NetBSD__) #define sockaddr_l2 sockaddr_bt #define sockaddr_rc sockaddr_bt #define sockaddr_sco sockaddr_bt -#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr) #define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb) #define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb) #define _BT_SCO_MEMB(sa, memb) ((sa)->bt_##memb) #else -#define _BT_SOCKADDR_MEMB(s, proto) (&((s)->sock_addr).bt_##proto) #define _BT_L2_MEMB(sa, memb) ((sa)->l2_##memb) #define _BT_RC_MEMB(sa, memb) ((sa)->rc_##memb) #define _BT_SCO_MEMB(sa, memb) ((sa)->sco_##memb) @@ -388,6 +385,8 @@ #define SEGMENT_SIZE (32 * 1024 -1) #endif +#define SAS2SA(x) ((struct sockaddr *)(x)) + /* * Constants for getnameinfo() */ @@ -1174,7 +1173,7 @@ static int getsockaddrarg(PySocketSockObject *s, PyObject *args, - struct sockaddr **addr_ret, int *len_ret) + struct sockaddr *addr_ret, int *len_ret) { switch (s->sock_family) { @@ -1184,9 +1183,10 @@ struct sockaddr_un* addr; char *path; int len; - addr = (struct sockaddr_un*)&(s->sock_addr).un; if (!PyArg_Parse(args, "t#", &path, &len)) return 0; + + addr = (struct sockaddr_un*)addr_ret; #ifdef linux if (len > 0 && path[0] == 0) { /* Linux abstract namespace extension */ @@ -1209,7 +1209,6 @@ } addr->sun_family = s->sock_family; memcpy(addr->sun_path, path, len); - *addr_ret = (struct sockaddr *) addr; #if defined(PYOS_OS2) *len_ret = sizeof(*addr); #else @@ -1224,7 +1223,7 @@ { struct sockaddr_nl* addr; int pid, groups; - addr = (struct sockaddr_nl *)&(s->sock_addr).nl; + addr = (struct sockaddr_nl *)addr_ret; if (!PyTuple_Check(args)) { PyErr_Format( PyExc_TypeError, @@ -1238,7 +1237,6 @@ addr->nl_family = AF_NETLINK; addr->nl_pid = pid; addr->nl_groups = groups; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof(*addr); return 1; } @@ -1249,7 +1247,6 @@ struct sockaddr_in* addr; char *host; int port, result; - addr=(struct sockaddr_in*)&(s->sock_addr).in; if (!PyTuple_Check(args)) { PyErr_Format( PyExc_TypeError, @@ -1261,6 +1258,7 @@ if (!PyArg_ParseTuple(args, "eti:getsockaddrarg", "idna", &host, &port)) return 0; + addr=(struct sockaddr_in*)addr_ret; result = setipaddr(host, (struct sockaddr *)addr, sizeof(*addr), AF_INET); PyMem_Free(host); @@ -1268,7 +1266,6 @@ return 0; addr->sin_family = AF_INET; addr->sin_port = htons((short)port); - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } @@ -1279,7 +1276,6 @@ struct sockaddr_in6* addr; char *host; int port, flowinfo, scope_id, result; - addr = (struct sockaddr_in6*)&(s->sock_addr).in6; flowinfo = scope_id = 0; if (!PyTuple_Check(args)) { PyErr_Format( @@ -1294,6 +1290,7 @@ &scope_id)) { return 0; } + addr = (struct sockaddr_in6*)addr_ret; result = setipaddr(host, (struct sockaddr *)addr, sizeof(*addr), AF_INET6); PyMem_Free(host); @@ -1303,7 +1300,6 @@ addr->sin6_port = htons((short)port); addr->sin6_flowinfo = flowinfo; addr->sin6_scope_id = scope_id; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } @@ -1315,9 +1311,10 @@ switch (s->sock_proto) { case BTPROTO_L2CAP: { - struct sockaddr_l2 *addr = (struct sockaddr_l2 *) _BT_SOCKADDR_MEMB(s, l2); + struct sockaddr_l2 *addr; char *straddr; + addr = (struct sockaddr_l2 *)addr_ret; _BT_L2_MEMB(addr, family) = AF_BLUETOOTH; if (!PyArg_ParseTuple(args, "si", &straddr, &_BT_L2_MEMB(addr, psm))) { @@ -1328,15 +1325,15 @@ if (setbdaddr(straddr, &_BT_L2_MEMB(addr, bdaddr)) < 0) return 0; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } case BTPROTO_RFCOMM: { - struct sockaddr_rc *addr = (struct sockaddr_rc *) _BT_SOCKADDR_MEMB(s, rc); + struct sockaddr_rc *addr; char *straddr; + addr = (struct sockaddr_rc *)addr_ret; _BT_RC_MEMB(addr, family) = AF_BLUETOOTH; if (!PyArg_ParseTuple(args, "si", &straddr, &_BT_RC_MEMB(addr, channel))) { @@ -1347,16 +1344,16 @@ if (setbdaddr(straddr, &_BT_RC_MEMB(addr, bdaddr)) < 0) return 0; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } #if !defined(__FreeBSD__) case BTPROTO_SCO: { - struct sockaddr_sco *addr = (struct sockaddr_sco *) _BT_SOCKADDR_MEMB(s, sco); + struct sockaddr_sco *addr; char *straddr; + addr = (struct sockaddr_sco *)addr_ret; _BT_SCO_MEMB(addr, family) = AF_BLUETOOTH; straddr = PyString_AsString(args); if (straddr == NULL) { @@ -1367,7 +1364,6 @@ if (setbdaddr(straddr, &_BT_SCO_MEMB(addr, bdaddr)) < 0) return 0; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } @@ -1409,22 +1405,21 @@ s->errorhandler(); return 0; } - addr = &(s->sock_addr.ll); - addr->sll_family = AF_PACKET; - addr->sll_protocol = htons((short)protoNumber); - addr->sll_ifindex = ifr.ifr_ifindex; - addr->sll_pkttype = pkttype; - addr->sll_hatype = hatype; if (halen > 8) { PyErr_SetString(PyExc_ValueError, "Hardware address must be 8 bytes or less"); return 0; } + addr = (struct sockaddr_ll*)addr_ret; + addr->sll_family = AF_PACKET; + addr->sll_protocol = htons((short)protoNumber); + addr->sll_ifindex = ifr.ifr_ifindex; + addr->sll_pkttype = pkttype; + addr->sll_hatype = hatype; if (halen != 0) { memcpy(&addr->sll_addr, haddr, halen); } addr->sll_halen = halen; - *addr_ret = (struct sockaddr *) addr; *len_ret = sizeof *addr; return 1; } @@ -1551,8 +1546,7 @@ Py_BEGIN_ALLOW_THREADS timeout = internal_select(s, 0); if (!timeout) - newfd = accept(s->sock_fd, (struct sockaddr *) &addrbuf, - &addrlen); + newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen); Py_END_ALLOW_THREADS if (timeout == 1) { @@ -1578,7 +1572,7 @@ SOCKETCLOSE(newfd); goto finally; } - addr = makesockaddr(s->sock_fd, (struct sockaddr *) &addrbuf, + addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, s->sock_proto); if (addr == NULL) goto finally; @@ -1819,14 +1813,14 @@ static PyObject * sock_bind(PySocketSockObject *s, PyObject *addro) { - struct sockaddr *addr; + sock_addr_t addrbuf; int addrlen; int res; - if (!getsockaddrarg(s, addro, &addr, &addrlen)) + if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS - res = bind(s->sock_fd, addr, addrlen); + res = bind(s->sock_fd, SAS2SA(&addrbuf), addrlen); Py_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); @@ -1952,16 +1946,16 @@ static PyObject * sock_connect(PySocketSockObject *s, PyObject *addro) { - struct sockaddr *addr; + sock_addr_t addrbuf; int addrlen; int res; int timeout; - if (!getsockaddrarg(s, addro, &addr, &addrlen)) + if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS - res = internal_connect(s, addr, addrlen, &timeout); + res = internal_connect(s, SAS2SA(&addrbuf), addrlen, &timeout); Py_END_ALLOW_THREADS if (timeout == 1) { @@ -1986,16 +1980,16 @@ static PyObject * sock_connect_ex(PySocketSockObject *s, PyObject *addro) { - struct sockaddr *addr; + sock_addr_t addrbuf; int addrlen; int res; int timeout; - if (!getsockaddrarg(s, addro, &addr, &addrlen)) + if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen)) return NULL; Py_BEGIN_ALLOW_THREADS - res = internal_connect(s, addr, addrlen, &timeout); + res = internal_connect(s, SAS2SA(&addrbuf), addrlen, &timeout); Py_END_ALLOW_THREADS /* Signals are not errors (though they may raise exceptions). Adapted @@ -2075,11 +2069,11 @@ return NULL; memset(&addrbuf, 0, addrlen); Py_BEGIN_ALLOW_THREADS - res = getsockname(s->sock_fd, (struct sockaddr *) &addrbuf, &addrlen); + res = getsockname(s->sock_fd, SAS2SA(&addrbuf), &addrlen); Py_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); - return makesockaddr(s->sock_fd, (struct sockaddr *) &addrbuf, addrlen, + return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, s->sock_proto); } @@ -2104,11 +2098,11 @@ return NULL; memset(&addrbuf, 0, addrlen); Py_BEGIN_ALLOW_THREADS - res = getpeername(s->sock_fd, (struct sockaddr *) &addrbuf, &addrlen); + res = getpeername(s->sock_fd, SAS2SA(&addrbuf), &addrlen); Py_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); - return makesockaddr(s->sock_fd, (struct sockaddr *) &addrbuf, addrlen, + return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, s->sock_proto); } @@ -2362,14 +2356,14 @@ int buflen; /* Get the buffer's memory */ - if (!PyArg_ParseTupleAndKeywords(args, kwds, "w#|ii:recv", kwlist, + if (!PyArg_ParseTupleAndKeywords(args, kwds, "w#|ii:recv_into", kwlist, &buf, &buflen, &recvlen, &flags)) return NULL; assert(buf != 0 && buflen > 0); if (recvlen < 0) { PyErr_SetString(PyExc_ValueError, - "negative buffersize in recv"); + "negative buffersize in recv_into"); return NULL; } if (recvlen == 0) { @@ -2443,14 +2437,14 @@ #ifndef MS_WINDOWS #if defined(PYOS_OS2) && !defined(PYCC_GCC) n = recvfrom(s->sock_fd, cbuf, len, flags, - (struct sockaddr *) &addrbuf, &addrlen); + SAS2SA(&addrbuf), &addrlen); #else n = recvfrom(s->sock_fd, cbuf, len, flags, (void *) &addrbuf, &addrlen); #endif #else n = recvfrom(s->sock_fd, cbuf, len, flags, - (struct sockaddr *) &addrbuf, &addrlen); + SAS2SA(&addrbuf), &addrlen); #endif } Py_END_ALLOW_THREADS @@ -2464,7 +2458,7 @@ return -1; } - if (!(*addr = makesockaddr(s->sock_fd, (struct sockaddr *) &addrbuf, + if (!(*addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, s->sock_proto))) return -1; @@ -2485,6 +2479,12 @@ if (!PyArg_ParseTuple(args, "i|i:recvfrom", &recvlen, &flags)) return NULL; + if (recvlen < 0) { + PyErr_SetString(PyExc_ValueError, + "negative buffersize in recvfrom"); + return NULL; + } + buf = PyString_FromStringAndSize((char *) 0, recvlen); if (buf == NULL) return NULL; @@ -2531,14 +2531,15 @@ PyObject *addr = NULL; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "w#|ii:recvfrom", kwlist, - &buf, &buflen, &recvlen, &flags)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "w#|ii:recvfrom_into", + kwlist, &buf, &buflen, + &recvlen, &flags)) return NULL; assert(buf != 0 && buflen > 0); if (recvlen < 0) { PyErr_SetString(PyExc_ValueError, - "negative buffersize in recv"); + "negative buffersize in recvfrom_into"); return NULL; } if (recvlen == 0) { @@ -2664,7 +2665,7 @@ { PyObject *addro; char *buf; - struct sockaddr *addr; + sock_addr_t addrbuf; int addrlen, len, n = -1, flags, timeout; flags = 0; @@ -2675,16 +2676,16 @@ return NULL; } - if (!getsockaddrarg(s, addro, &addr, &addrlen)) - return NULL; - if (!IS_SELECTABLE(s)) return select_error(); + if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen)) + return NULL; + Py_BEGIN_ALLOW_THREADS timeout = internal_select(s, 1); if (!timeout) - n = sendto(s->sock_fd, buf, len, flags, addr, addrlen); + n = sendto(s->sock_fd, buf, len, flags, SAS2SA(&addrbuf), addrlen); Py_END_ALLOW_THREADS if (timeout == 1) { @@ -2973,10 +2974,9 @@ if (!PyArg_ParseTuple(args, "s:gethostbyname", &name)) return NULL; - if (setipaddr(name, (struct sockaddr *)&addrbuf, sizeof(addrbuf), AF_INET) < 0) + if (setipaddr(name, SAS2SA(&addrbuf), sizeof(addrbuf), AF_INET) < 0) return NULL; - return makeipaddr((struct sockaddr *)&addrbuf, - sizeof(struct sockaddr_in)); + return makeipaddr(SAS2SA(&addrbuf), sizeof(struct sockaddr_in)); } PyDoc_STRVAR(gethostbyname_doc, @@ -4370,7 +4370,9 @@ PyModule_AddIntConstant(m, "NETLINK_ROUTE6", NETLINK_ROUTE6); #endif PyModule_AddIntConstant(m, "NETLINK_IP6_FW", NETLINK_IP6_FW); +#ifdef NETLINK_DNRTMSG PyModule_AddIntConstant(m, "NETLINK_DNRTMSG", NETLINK_DNRTMSG); +#endif #ifdef NETLINK_TAPBASE PyModule_AddIntConstant(m, "NETLINK_TAPBASE", NETLINK_TAPBASE); #endif Modified: stackless/branches/release25-maint/Modules/socketmodule.h ============================================================================== --- stackless/branches/release25-maint/Modules/socketmodule.h (original) +++ stackless/branches/release25-maint/Modules/socketmodule.h Sat Apr 14 15:02:57 2007 @@ -114,7 +114,6 @@ int sock_family; /* Address family, e.g., AF_INET */ int sock_type; /* Socket type, e.g., SOCK_STREAM */ int sock_proto; /* Protocol type, usually 0 */ - sock_addr_t sock_addr; /* Socket address */ PyObject *(*errorhandler)(void); /* Error handler; checks errno, returns NULL and sets a Python exception */ Modified: stackless/branches/release25-maint/Modules/threadmodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/threadmodule.c (original) +++ stackless/branches/release25-maint/Modules/threadmodule.c Sat Apr 14 15:02:57 2007 @@ -25,6 +25,7 @@ static void lock_dealloc(lockobject *self) { + assert(self->lock_lock); /* Unlock the lock so it's safe to free it */ PyThread_acquire_lock(self->lock_lock, 0); PyThread_release_lock(self->lock_lock); Modified: stackless/branches/release25-maint/Modules/timemodule.c ============================================================================== --- stackless/branches/release25-maint/Modules/timemodule.c (original) +++ stackless/branches/release25-maint/Modules/timemodule.c Sat Apr 14 15:02:57 2007 @@ -175,7 +175,8 @@ if (!QueryPerformanceFrequency(&freq) || freq.QuadPart == 0) { /* Unlikely to happen - this works on all intel machines at least! Revert to clock() */ - return PyFloat_FromDouble(clock()); + return PyFloat_FromDouble(((double)clock()) / + CLOCKS_PER_SEC); } divisor = (double)freq.QuadPart; } Modified: stackless/branches/release25-maint/Modules/unicodedata.c ============================================================================== --- stackless/branches/release25-maint/Modules/unicodedata.c (original) +++ stackless/branches/release25-maint/Modules/unicodedata.c Sat Apr 14 15:02:57 2007 @@ -75,7 +75,7 @@ {NULL} }; -// forward declaration +/* forward declaration */ static PyTypeObject UCD_Type; static PyObject* Modified: stackless/branches/release25-maint/Objects/abstract.c ============================================================================== --- stackless/branches/release25-maint/Objects/abstract.c (original) +++ stackless/branches/release25-maint/Objects/abstract.c Sat Apr 14 15:02:57 2007 @@ -1158,6 +1158,8 @@ { if (s && PyInstance_Check(s)) return PyObject_HasAttrString(s, "__getitem__"); + if (PyObject_IsInstance(s, (PyObject *)&PyDict_Type)) + return 0; return s != NULL && s->ob_type->tp_as_sequence && s->ob_type->tp_as_sequence->sq_item != NULL; } Modified: stackless/branches/release25-maint/Objects/classobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/classobject.c (original) +++ stackless/branches/release25-maint/Objects/classobject.c Sat Apr 14 15:02:57 2007 @@ -1319,15 +1319,17 @@ /* Couldn't find __contains__. */ if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + Py_ssize_t rc; /* Assume the failure was simply due to that there is no * __contains__ attribute, and try iterating instead. */ PyErr_Clear(); - return _PySequence_IterSearch((PyObject *)inst, member, - PY_ITERSEARCH_CONTAINS) > 0; + rc = _PySequence_IterSearch((PyObject *)inst, member, + PY_ITERSEARCH_CONTAINS); + if (rc >= 0) + return rc > 0; } - else - return -1; + return -1; } static PySequenceMethods Modified: stackless/branches/release25-maint/Objects/complexobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/complexobject.c (original) +++ stackless/branches/release25-maint/Objects/complexobject.c Sat Apr 14 15:02:57 2007 @@ -481,7 +481,7 @@ } else if (errno == ERANGE) { PyErr_SetString(PyExc_OverflowError, - "complex exponentiaion"); + "complex exponentiation"); return NULL; } return PyComplex_FromCComplex(p); Modified: stackless/branches/release25-maint/Objects/dictobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/dictobject.c (original) +++ stackless/branches/release25-maint/Objects/dictobject.c Sat Apr 14 15:02:57 2007 @@ -12,6 +12,20 @@ typedef PyDictEntry dictentry; typedef PyDictObject dictobject; +/* Set a key error with the specified argument, wrapping it in a + * tuple automatically so that tuple keys are not unpacked as the + * exception arguments. */ +static void +set_key_error(PyObject *arg) +{ + PyObject *tup; + tup = PyTuple_Pack(1, arg); + if (!tup) + return; /* caller will expect error to be set anyway */ + PyErr_SetObject(PyExc_KeyError, tup); + Py_DECREF(tup); +} + /* Define this out if you don't want conversion statistics on exit. */ #undef SHOW_CONVERSION_COUNTS @@ -307,6 +321,8 @@ else if (ep->me_key == dummy && freeslot == NULL) freeslot = ep; } + assert(0); /* NOT REACHED */ + return 0; } /* @@ -366,6 +382,8 @@ if (ep->me_key == dummy && freeslot == NULL) freeslot = ep; } + assert(0); /* NOT REACHED */ + return 0; } /* @@ -661,7 +679,7 @@ if (ep == NULL) return -1; if (ep->me_value == NULL) { - PyErr_SetObject(PyExc_KeyError, key); + set_key_error(key); return -1; } old_key = ep->me_key; @@ -785,6 +803,34 @@ return 1; } +/* Internal version of PyDict_Next that returns a hash value in addition to the key and value.*/ +int +_PyDict_Next(PyObject *op, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue, long *phash) +{ + register Py_ssize_t i; + register Py_ssize_t mask; + register dictentry *ep; + + if (!PyDict_Check(op)) + return 0; + i = *ppos; + if (i < 0) + return 0; + ep = ((dictobject *)op)->ma_table; + mask = ((dictobject *)op)->ma_mask; + while (i <= mask && ep[i].me_value == NULL) + i++; + *ppos = i+1; + if (i > mask) + return 0; + *phash = (long)(ep[i].me_hash); + if (pkey) + *pkey = ep[i].me_key; + if (pvalue) + *pvalue = ep[i].me_value; + return 1; +} + /* Methods */ static void @@ -970,7 +1016,7 @@ return PyObject_CallFunctionObjArgs(missing, (PyObject *)mp, key, NULL); } - PyErr_SetObject(PyExc_KeyError, key); + set_key_error(key); return NULL; } else @@ -1129,6 +1175,24 @@ if (d == NULL) return NULL; + if (PyDict_CheckExact(d) && PyAnySet_CheckExact(seq)) { + dictobject *mp = (dictobject *)d; + Py_ssize_t pos = 0; + PyObject *key; + long hash; + + if (dictresize(mp, PySet_GET_SIZE(seq))) + return NULL; + + while (_PySet_NextEntry(seq, &pos, &key, &hash)) { + Py_INCREF(key); + Py_INCREF(value); + if (insertdict(mp, key, hash, value)) + return NULL; + } + return d; + } + it = PyObject_GetIter(seq); if (it == NULL){ Py_DECREF(d); @@ -1288,7 +1352,7 @@ return -1; } mp = (dictobject*)a; - if (PyDict_Check(b)) { + if (PyDict_CheckExact(b)) { other = (dictobject*)b; if (other == mp || other->ma_used == 0) /* a.update(a) or a.update({}); nothing to do */ @@ -1742,7 +1806,7 @@ Py_INCREF(deflt); return deflt; } - PyErr_SetObject(PyExc_KeyError, key); + set_key_error(key); return NULL; } old_key = ep->me_key; @@ -1969,6 +2033,17 @@ return ep == NULL ? -1 : (ep->me_value != NULL); } +/* Internal version of PyDict_Contains used when the hash value is already known */ +int +_PyDict_Contains(PyObject *op, PyObject *key, long hash) +{ + dictobject *mp = (dictobject *)op; + dictentry *ep; + + ep = (mp->ma_lookup)(mp, key, hash); + return ep == NULL ? -1 : (ep->me_value != NULL); +} + /* Hack to implement "key in dict" */ static PySequenceMethods dict_as_sequence = { 0, /* sq_length */ Modified: stackless/branches/release25-maint/Objects/enumobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/enumobject.c (original) +++ stackless/branches/release25-maint/Objects/enumobject.c Sat Apr 14 15:02:57 2007 @@ -62,6 +62,12 @@ PyObject *result = en->en_result; PyObject *it = en->en_sit; + if (en->en_index == LONG_MAX) { + PyErr_SetString(PyExc_OverflowError, + "enumerate() is limited to LONG_MAX items"); + return NULL; + } + next_item = (*it->ob_type->tp_iternext)(it); if (next_item == NULL) return NULL; Modified: stackless/branches/release25-maint/Objects/exceptions.c ============================================================================== --- stackless/branches/release25-maint/Objects/exceptions.c (original) +++ stackless/branches/release25-maint/Objects/exceptions.c Sat Apr 14 15:02:57 2007 @@ -836,9 +836,9 @@ return NULL; } - if (self->myerrno) { - Py_INCREF(self->myerrno); - PyTuple_SET_ITEM(tuple, 0, self->myerrno); + if (self->winerror) { + Py_INCREF(self->winerror); + PyTuple_SET_ITEM(tuple, 0, self->winerror); } else { Py_INCREF(Py_None); @@ -860,7 +860,7 @@ Py_DECREF(fmt); Py_DECREF(tuple); } - else if (self->myerrno && self->strerror) { + else if (self->winerror && self->strerror) { PyObject *fmt; PyObject *tuple; @@ -874,9 +874,9 @@ return NULL; } - if (self->myerrno) { - Py_INCREF(self->myerrno); - PyTuple_SET_ITEM(tuple, 0, self->myerrno); + if (self->winerror) { + Py_INCREF(self->winerror); + PyTuple_SET_ITEM(tuple, 0, self->winerror); } else { Py_INCREF(Py_None); Modified: stackless/branches/release25-maint/Objects/fileobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/fileobject.c (original) +++ stackless/branches/release25-maint/Objects/fileobject.c Sat Apr 14 15:02:57 2007 @@ -354,6 +354,8 @@ { PyFileObject *file = (PyFileObject*)f; PyObject *str = PyString_FromString(enc); + + assert(PyFile_Check(f)); if (!str) return 0; Py_DECREF(file->f_encoding); Modified: stackless/branches/release25-maint/Objects/listobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/listobject.c (original) +++ stackless/branches/release25-maint/Objects/listobject.c Sat Apr 14 15:02:57 2007 @@ -2606,6 +2606,11 @@ garbage = (PyObject**) PyMem_MALLOC(slicelength*sizeof(PyObject*)); + if (!garbage) { + Py_DECREF(seq); + PyErr_NoMemory(); + return -1; + } selfitems = self->ob_item; seqitems = PySequence_Fast_ITEMS(seq); Modified: stackless/branches/release25-maint/Objects/longobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/longobject.c (original) +++ stackless/branches/release25-maint/Objects/longobject.c Sat Apr 14 15:02:57 2007 @@ -3287,8 +3287,25 @@ return PyLong_FromLong(0L); if (base == -909) return PyNumber_Long(x); - else if (PyString_Check(x)) + else if (PyString_Check(x)) { + /* Since PyLong_FromString doesn't have a length parameter, + * check here for possible NULs in the string. */ + char *string = PyString_AS_STRING(x); + if (strlen(string) != PyString_Size(x)) { + /* create a repr() of the input string, + * just like PyLong_FromString does. */ + PyObject *srepr; + srepr = PyObject_Repr(x); + if (srepr == NULL) + return NULL; + PyErr_Format(PyExc_ValueError, + "invalid literal for long() with base %d: %s", + base, PyString_AS_STRING(srepr)); + Py_DECREF(srepr); + return NULL; + } return PyLong_FromString(PyString_AS_STRING(x), NULL, base); + } #ifdef Py_USING_UNICODE else if (PyUnicode_Check(x)) return PyLong_FromUnicode(PyUnicode_AS_UNICODE(x), Modified: stackless/branches/release25-maint/Objects/obmalloc.c ============================================================================== --- stackless/branches/release25-maint/Objects/obmalloc.c (original) +++ stackless/branches/release25-maint/Objects/obmalloc.c Sat Apr 14 15:02:57 2007 @@ -691,7 +691,8 @@ #undef Py_ADDRESS_IN_RANGE -#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) +#if defined(__GNUC__) && ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) || \ + (__GNUC__ >= 4)) #define Py_NO_INLINE __attribute__((__noinline__)) #else #define Py_NO_INLINE Modified: stackless/branches/release25-maint/Objects/setobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/setobject.c (original) +++ stackless/branches/release25-maint/Objects/setobject.c Sat Apr 14 15:02:57 2007 @@ -10,6 +10,20 @@ #include "Python.h" #include "structmember.h" +/* Set a key error with the specified argument, wrapping it in a + * tuple automatically so that tuple keys are not unpacked as the + * exception arguments. */ +static void +set_key_error(PyObject *arg) +{ + PyObject *tup; + tup = PyTuple_Pack(1, arg); + if (!tup) + return; /* caller will expect error to be set anyway */ + PyErr_SetObject(PyExc_KeyError, tup); + Py_DECREF(tup); +} + /* This must be >= 1. */ #define PERTURB_SHIFT 5 @@ -179,11 +193,13 @@ if (entry->key == dummy && freeslot == NULL) freeslot = entry; } + assert(0); /* NOT REACHED */ + return 0; } /* Internal routine to insert a new key into the table. -Used both by the internal resize routine and by the public insert routine. +Used by the public insert routine. Eats a reference to key. */ static int @@ -216,6 +232,35 @@ } /* +Internal routine used by set_table_resize() to insert an item which is +known to be absent from the set. This routine also assumes that +the set contains no deleted entries. Besides the performance benefit, +using set_insert_clean() in set_table_resize() is dangerous (SF bug #1456209). +Note that no refcounts are changed by this routine; if needed, the caller +is responsible for incref'ing `key`. +*/ +static void +set_insert_clean(register PySetObject *so, PyObject *key, long hash) +{ + register size_t i; + register size_t perturb; + register size_t mask = (size_t)so->mask; + setentry *table = so->table; + register setentry *entry; + + i = hash & mask; + entry = &table[i]; + for (perturb = hash; entry->key != NULL; perturb >>= PERTURB_SHIFT) { + i = (i << 2) + i + perturb + 1; + entry = &table[i & mask]; + } + so->fill++; + entry->key = key; + entry->hash = hash; + so->used++; +} + +/* Restructure the table by allocating a new table and reinserting all keys again. When entries have been deleted, the new table may actually be smaller than the old one. @@ -296,11 +341,7 @@ } else { /* ACTIVE */ --i; - if(set_insert_key(so, entry->key, entry->hash) == -1) { - if (is_oldtable_malloced) - PyMem_DEL(oldtable); - return -1; - } + set_insert_clean(so, entry->key, entry->hash); } } @@ -531,34 +572,54 @@ Py_ssize_t pos=0; char *emit = ""; /* No separator emitted on first pass */ char *separator = ", "; + int status = Py_ReprEnter((PyObject*)so); + + if (status != 0) { + if (status < 0) + return status; + fprintf(fp, "%s(...)", so->ob_type->tp_name); + return 0; + } fprintf(fp, "%s([", so->ob_type->tp_name); while (set_next(so, &pos, &entry)) { fputs(emit, fp); emit = separator; - if (PyObject_Print(entry->key, fp, 0) != 0) + if (PyObject_Print(entry->key, fp, 0) != 0) { + Py_ReprLeave((PyObject*)so); return -1; + } } fputs("])", fp); + Py_ReprLeave((PyObject*)so); return 0; } static PyObject * set_repr(PySetObject *so) { - PyObject *keys, *result, *listrepr; + PyObject *keys, *result=NULL, *listrepr; + int status = Py_ReprEnter((PyObject*)so); + + if (status != 0) { + if (status < 0) + return NULL; + return PyString_FromFormat("%s(...)", so->ob_type->tp_name); + } keys = PySequence_List((PyObject *)so); if (keys == NULL) - return NULL; + goto done; listrepr = PyObject_Repr(keys); Py_DECREF(keys); if (listrepr == NULL) - return NULL; + goto done; result = PyString_FromFormat("%s(%s)", so->ob_type->tp_name, PyString_AS_STRING(listrepr)); Py_DECREF(listrepr); +done: + Py_ReprLeave((PyObject*)so); return result; } @@ -855,14 +916,31 @@ { PyObject *key, *it; - if (PyAnySet_Check(other)) + if (PyAnySet_CheckExact(other)) return set_merge(so, other); - if (PyDict_Check(other)) { + if (PyDict_CheckExact(other)) { PyObject *value; Py_ssize_t pos = 0; - while (PyDict_Next(other, &pos, &key, &value)) { - if (set_add_key(so, key) == -1) + long hash; + Py_ssize_t dictsize = PyDict_Size(other); + + /* Do one big resize at the start, rather than + * incrementally resizing as we insert new keys. Expect + * that there will be no (or few) overlapping keys. + */ + if (dictsize == -1) + return -1; + if ((so->fill + dictsize)*3 >= (so->mask+1)*2) { + if (set_table_resize(so, (so->used + dictsize)*2) != 0) + return -1; + } + while (_PyDict_Next(other, &pos, &key, &value, &hash)) { + setentry an_entry; + + an_entry.hash = hash; + an_entry.key = key; + if (set_add_entry(so, &an_entry) == -1) return -1; } return 0; @@ -947,7 +1025,7 @@ { PyObject *iterable = NULL, *result; - if (!_PyArg_NoKeywords("frozenset()", kwds)) + if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable)) @@ -991,7 +1069,7 @@ static PyObject * set_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - if (!_PyArg_NoKeywords("set()", kwds)) + if (type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds)) return NULL; return make_new_set(type, NULL); @@ -1133,7 +1211,7 @@ if (result == NULL) return NULL; - if (PyAnySet_Check(other)) { + if (PyAnySet_CheckExact(other)) { Py_ssize_t pos = 0; setentry *entry; @@ -1166,7 +1244,19 @@ } while ((key = PyIter_Next(it)) != NULL) { - int rv = set_contains_key(so, key); + int rv; + setentry entry; + long hash = PyObject_Hash(key); + + if (hash == -1) { + Py_DECREF(it); + Py_DECREF(result); + Py_DECREF(key); + return NULL; + } + entry.hash = hash; + entry.key = key; + rv = set_contains_entry(so, &entry); if (rv == -1) { Py_DECREF(it); Py_DECREF(result); @@ -1174,7 +1264,7 @@ return NULL; } if (rv) { - if (set_add_key(result, key) == -1) { + if (set_add_entry(result, &entry) == -1) { Py_DECREF(it); Py_DECREF(result); Py_DECREF(key); @@ -1245,7 +1335,7 @@ if ((PyObject *)so == other) return set_clear_internal(so); - if (PyAnySet_Check(other)) { + if (PyAnySet_CheckExact(other)) { setentry *entry; Py_ssize_t pos = 0; @@ -1294,7 +1384,7 @@ setentry *entry; Py_ssize_t pos = 0; - if (!PyAnySet_Check(other) && !PyDict_Check(other)) { + if (!PyAnySet_CheckExact(other) && !PyDict_CheckExact(other)) { result = set_copy(so); if (result == NULL) return NULL; @@ -1308,12 +1398,12 @@ if (result == NULL) return NULL; - if (PyDict_Check(other)) { + if (PyDict_CheckExact(other)) { while (set_next(so, &pos, &entry)) { setentry entrycopy; entrycopy.hash = entry->hash; entrycopy.key = entry->key; - if (!PyDict_Contains(other, entry->key)) { + if (!_PyDict_Contains(other, entry->key, entry->hash)) { if (set_add_entry((PySetObject *)result, &entrycopy) == -1) { Py_DECREF(result); return NULL; @@ -1381,22 +1471,27 @@ if ((PyObject *)so == other) return set_clear(so); - if (PyDict_Check(other)) { + if (PyDict_CheckExact(other)) { PyObject *value; int rv; - while (PyDict_Next(other, &pos, &key, &value)) { - rv = set_discard_key(so, key); + long hash; + while (_PyDict_Next(other, &pos, &key, &value, &hash)) { + setentry an_entry; + + an_entry.hash = hash; + an_entry.key = key; + rv = set_discard_entry(so, &an_entry); if (rv == -1) return NULL; if (rv == DISCARD_NOTFOUND) { - if (set_add_key(so, key) == -1) + if (set_add_entry(so, &an_entry) == -1) return NULL; } } Py_RETURN_NONE; } - if (PyAnySet_Check(other)) { + if (PyAnySet_CheckExact(other)) { Py_INCREF(other); otherset = (PySetObject *)other; } else { @@ -1479,7 +1574,7 @@ setentry *entry; Py_ssize_t pos = 0; - if (!PyAnySet_Check(other)) { + if (!PyAnySet_CheckExact(other)) { PyObject *tmp, *result; tmp = make_new_set(&PySet_Type, other); if (tmp == NULL) @@ -1508,7 +1603,7 @@ { PyObject *tmp, *result; - if (!PyAnySet_Check(other)) { + if (!PyAnySet_CheckExact(other)) { tmp = make_new_set(&PySet_Type, other); if (tmp == NULL) return NULL; @@ -1642,7 +1737,7 @@ Py_DECREF(tmpkey); return result; } else if (rv == DISCARD_NOTFOUND) { - PyErr_SetObject(PyExc_KeyError, key); + set_key_error(key); return NULL; } Py_RETURN_NONE; @@ -2046,7 +2141,7 @@ } int -_PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **entry) +_PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key) { setentry *entry_ptr; @@ -2056,7 +2151,23 @@ } if (set_next((PySetObject *)set, pos, &entry_ptr) == 0) return 0; - *entry = entry_ptr->key; + *key = entry_ptr->key; + return 1; +} + +int +_PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash) +{ + setentry *entry; + + if (!PyAnySet_Check(set)) { + PyErr_BadInternalCall(); + return -1; + } + if (set_next((PySetObject *)set, pos, &entry) == 0) + return 0; + *key = entry->key; + *hash = entry->hash; return 1; } Modified: stackless/branches/release25-maint/Objects/stringobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/stringobject.c (original) +++ stackless/branches/release25-maint/Objects/stringobject.c Sat Apr 14 15:02:57 2007 @@ -4764,10 +4764,13 @@ reslen += rescnt; if (reslen < 0) { Py_DECREF(result); + Py_XDECREF(temp); return PyErr_NoMemory(); } - if (_PyString_Resize(&result, reslen) < 0) + if (_PyString_Resize(&result, reslen) < 0) { + Py_XDECREF(temp); return NULL; + } res = PyString_AS_STRING(result) + reslen - rescnt; } @@ -4818,6 +4821,7 @@ if (dict && (argidx < arglen) && c != '%') { PyErr_SetString(PyExc_TypeError, "not all arguments converted during string formatting"); + Py_XDECREF(temp); goto error; } Py_XDECREF(temp); Modified: stackless/branches/release25-maint/Objects/typeobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/typeobject.c (original) +++ stackless/branches/release25-maint/Objects/typeobject.c Sat Apr 14 15:02:57 2007 @@ -667,6 +667,17 @@ goto endlabel; /* resurrected */ else _PyObject_GC_UNTRACK(self); + /* New weakrefs could be created during the finalizer call. + If this occurs, clear them out without calling their + finalizers since they might rely on part of the object + being finalized that has already been destroyed. */ + if (type->tp_weaklistoffset && !base->tp_weaklistoffset) { + /* Modeled after GET_WEAKREFS_LISTPTR() */ + PyWeakReference **list = (PyWeakReference **) \ + PyObject_GET_WEAKREFS_LISTPTR(self); + while (*list) + _PyWeakref_ClearRef(*list); + } } /* Clear slots up to the nearest base with a different tp_dealloc */ @@ -1569,29 +1580,33 @@ static PyObject * _unicode_to_string(PyObject *slots, Py_ssize_t nslots) { - PyObject *tmp = slots; - PyObject *o, *o1; + PyObject *tmp = NULL; + PyObject *slot_name, *new_name; Py_ssize_t i; - ssizessizeargfunc copy = slots->ob_type->tp_as_sequence->sq_slice; + for (i = 0; i < nslots; i++) { - if (PyUnicode_Check(o = PyTuple_GET_ITEM(tmp, i))) { - if (tmp == slots) { - tmp = copy(slots, 0, PyTuple_GET_SIZE(slots)); + if (PyUnicode_Check(slot_name = PyTuple_GET_ITEM(slots, i))) { + if (tmp == NULL) { + tmp = PySequence_List(slots); if (tmp == NULL) return NULL; } - o1 = _PyUnicode_AsDefaultEncodedString - (o, NULL); - if (o1 == NULL) { + new_name = _PyUnicode_AsDefaultEncodedString(slot_name, + NULL); + if (new_name == NULL) { Py_DECREF(tmp); - return 0; + return NULL; } - Py_INCREF(o1); - Py_DECREF(o); - PyTuple_SET_ITEM(tmp, i, o1); + Py_INCREF(new_name); + PyList_SET_ITEM(tmp, i, new_name); + Py_DECREF(slot_name); } } - return tmp; + if (tmp != NULL) { + slots = PyList_AsTuple(tmp); + Py_DECREF(tmp); + } + return slots; } #endif @@ -1738,12 +1753,12 @@ #ifdef Py_USING_UNICODE tmp = _unicode_to_string(slots, nslots); + if (tmp == NULL) + goto bad_slots; if (tmp != slots) { Py_DECREF(slots); slots = tmp; } - if (!tmp) - return NULL; #endif /* Check for valid slot names and two special cases */ for (i = 0; i < nslots; i++) { @@ -1931,13 +1946,11 @@ PyTuple_GET_ITEM(slots, i)); mp->type = T_OBJECT_EX; mp->offset = slotoffset; - if (base->tp_weaklistoffset == 0 && - strcmp(mp->name, "__weakref__") == 0) { - add_weak++; - mp->type = T_OBJECT; - mp->flags = READONLY; - type->tp_weaklistoffset = slotoffset; - } + + /* __dict__ and __weakref__ are already filtered out */ + assert(strcmp(mp->name, "__dict__") != 0); + assert(strcmp(mp->name, "__weakref__") != 0); + slotoffset += sizeof(PyObject *); } } @@ -2724,11 +2737,54 @@ return res; } +/* + * There were two problems when object.__reduce__ and object.__reduce_ex__ + * were implemented in the same function: + * - trying to pickle an object with a custom __reduce__ method that + * fell back to object.__reduce__ in certain circumstances led to + * infinite recursion at Python level and eventual RuntimeError. + * - Pickling objects that lied about their type by overwriting the + * __class__ descriptor could lead to infinite recursion at C level + * and eventual segfault. + * + * Because of backwards compatibility, the two methods still have to + * behave in the same way, even if this is not required by the pickle + * protocol. This common functionality was moved to the _common_reduce + * function. + */ +static PyObject * +_common_reduce(PyObject *self, int proto) +{ + PyObject *copy_reg, *res; + + if (proto >= 2) + return reduce_2(self); + + copy_reg = import_copy_reg(); + if (!copy_reg) + return NULL; + + res = PyEval_CallMethod(copy_reg, "_reduce_ex", "(Oi)", self, proto); + Py_DECREF(copy_reg); + + return res; +} + +static PyObject * +object_reduce(PyObject *self, PyObject *args) +{ + int proto = 0; + + if (!PyArg_ParseTuple(args, "|i:__reduce__", &proto)) + return NULL; + + return _common_reduce(self, proto); +} + static PyObject * object_reduce_ex(PyObject *self, PyObject *args) { - /* Call copy_reg._reduce_ex(self, proto) */ - PyObject *reduce, *copy_reg, *res; + PyObject *reduce, *res; int proto = 0; if (!PyArg_ParseTuple(args, "|i:__reduce_ex__", &proto)) @@ -2764,23 +2820,13 @@ Py_DECREF(reduce); } - if (proto >= 2) - return reduce_2(self); - - copy_reg = import_copy_reg(); - if (!copy_reg) - return NULL; - - res = PyEval_CallMethod(copy_reg, "_reduce_ex", "(Oi)", self, proto); - Py_DECREF(copy_reg); - - return res; + return _common_reduce(self, proto); } static PyMethodDef object_methods[] = { {"__reduce_ex__", object_reduce_ex, METH_VARARGS, PyDoc_STR("helper for pickle")}, - {"__reduce__", object_reduce_ex, METH_VARARGS, + {"__reduce__", object_reduce, METH_VARARGS, PyDoc_STR("helper for pickle")}, {0} }; @@ -4475,7 +4521,13 @@ SLOT1(slot_nb_inplace_multiply, "__imul__", PyObject *, "O") SLOT1(slot_nb_inplace_divide, "__idiv__", PyObject *, "O") SLOT1(slot_nb_inplace_remainder, "__imod__", PyObject *, "O") -SLOT1(slot_nb_inplace_power, "__ipow__", PyObject *, "O") +/* Can't use SLOT1 here, because nb_inplace_power is ternary */ +static PyObject * +slot_nb_inplace_power(PyObject *self, PyObject * arg1, PyObject *arg2) +{ + static PyObject *cache_str; + return call_method(self, "__ipow__", &cache_str, "(" "O" ")", arg1); +} SLOT1(slot_nb_inplace_lshift, "__ilshift__", PyObject *, "O") SLOT1(slot_nb_inplace_rshift, "__irshift__", PyObject *, "O") SLOT1(slot_nb_inplace_and, "__iand__", PyObject *, "O") Modified: stackless/branches/release25-maint/Objects/weakrefobject.c ============================================================================== --- stackless/branches/release25-maint/Objects/weakrefobject.c (original) +++ stackless/branches/release25-maint/Objects/weakrefobject.c Sat Apr 14 15:02:57 2007 @@ -57,6 +57,9 @@ PyWeakref_GET_OBJECT(self)); if (*list == self) + /* If 'self' is the end of the list (and thus self->wr_next == NULL) + then the weakref list itself (and thus the value of *list) will + end up being set to NULL. */ *list = self->wr_next; self->wr_object = Py_None; if (self->wr_prev != NULL) Modified: stackless/branches/release25-maint/PC/VC6/_bsddb.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_bsddb.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/_bsddb.dsp Sat Apr 14 15:02:57 2007 @@ -44,7 +44,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\..\db-4.1.25\build_win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\..\db-4.4.20\build_win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\db-4.1.25\build_win32\Release_static\libdb41s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"./_bsddb.pyd" +# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\db-4.4.20\build_win32\Release\libdb44s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"./_bsddb.pyd" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_bsddb - Win32 Debug" @@ -72,7 +72,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\..\db-4.1.25\build_win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\..\db-4.4.20\build_win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -82,7 +82,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\db-4.1.25\build_win32\Release_static\libdb41s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd" /out:"./_bsddb_d.pyd" /pdbtype:sept +# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\db-4.4.20\build_win32\Release\libdb44s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd" /out:"./_bsddb_d.pyd" /pdbtype:sept # SUBTRACT LINK32 /pdb:none !ENDIF Modified: stackless/branches/release25-maint/PC/VC6/_ctypes.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_ctypes.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/_ctypes.dsp Sat Apr 14 15:02:57 2007 @@ -23,8 +23,8 @@ # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "_ctypes" +# PROP Scc_LocalPath ".." CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -38,23 +38,24 @@ # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-release\_ctypes" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_CTYPES_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I "..\..\PC" /I "..\..\Modules\_ctypes\libffi_msvc" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\Modules\_ctypes\libffi_msvc" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_ctypes.pyd" +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1d1a0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_ctypes.pyd" +# SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_ctypes - Win32 Debug" @@ -65,24 +66,24 @@ # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-debug\_ctypes" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_CTYPES_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I "..\..\PC" /I "..\..\Modules\_ctypes\libffi_msvc" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\Modules\_ctypes\libffi_msvc" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_ctypes_d.pyd" /pdbtype:sept -# SUBTRACT LINK32 /incremental:no +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1d1a0000" /subsystem:windows /dll /debug /machine:I386 /out:"./_ctypes_d.pyd" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none !ENDIF @@ -90,9 +91,6 @@ # Name "_ctypes - Win32 Release" # Name "_ctypes - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\Modules\_ctypes\_ctypes.c @@ -128,55 +126,6 @@ # Begin Source File SOURCE=..\..\Modules\_ctypes\libffi_msvc\win32.c - -!IF "$(CFG)" == "_ctypes - Win32 Release" - -# SUBTRACT CPP /I "..\..\Include" - -!ELSEIF "$(CFG)" == "_ctypes - Win32 Debug" - -# ADD CPP /I "..\Include" /I "..\PC" /I "..\Modules\_ctypes\libffi_msvc" -# SUBTRACT CPP /I "..\..\Include" - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\_ctypes_test.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\ctypes.h # End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\ctypes_dlfcn.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\libffi_msvc\ffi.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\libffi_msvc\ffi_common.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\libffi_msvc\fficonfig.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\libffi_msvc\ffitarget.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group # End Target # End Project Modified: stackless/branches/release25-maint/PC/VC6/_ctypes_test.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_ctypes_test.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/_ctypes_test.dsp Sat Apr 14 15:02:57 2007 @@ -23,8 +23,8 @@ # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "_ctypes_test" +# PROP Scc_LocalPath ".." CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -38,50 +38,52 @@ # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-release\_ctypes_test" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I "..\..\PC" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_ctypes_test.pyd" +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"./_ctypes_test.pyd" +# SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_ctypes_test - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "_ctypes_test___Win32_Debug" -# PROP BASE Intermediate_Dir "_ctypes_test___Win32_Debug" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-debug\_ctypes_test" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\Include" /I "..\..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_ctypes_test_d.pyd" /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"./_ctypes_test_d.pyd" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none !ENDIF @@ -89,25 +91,9 @@ # Name "_ctypes_test - Win32 Release" # Name "_ctypes_test - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\Modules\_ctypes\_ctypes_test.c # End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\Modules\_ctypes\_ctypes_test.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group # End Target # End Project Modified: stackless/branches/release25-maint/PC/VC6/_elementtree.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_elementtree.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/_elementtree.dsp Sat Apr 14 15:02:57 2007 @@ -23,8 +23,8 @@ # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "_elementtree" +# PROP Scc_LocalPath ".." CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -38,50 +38,52 @@ # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-release\_elementtree" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ELEMENTTREE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I "..\..\PC" /I "..\..\Modules\expat" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_NS" /D "XML_DTD" /D BYTEORDER=1234 /D XML_CONTEXT_BYTES=1024 /D "USE_PYEXPAT_CAPI" /D "XML_STATIC" /D "HAVE_MEMMOVE" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\Modules\expat" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_NS" /D "XML_DTD" /D "BYTEORDER=1234" /D "XML_CONTEXT_BYTES=1024" /D "USE_PYEXPAT_CAPI" /D "XML_STATIC" /D "HAVE_MEMMOVE" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_elementtree.pyd" +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1d100000" /subsystem:windows /dll /debug /machine:I386 /out:"./_elementtree.pyd" +# SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_elementtree - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "_elementtree___Win32_Debug" -# PROP BASE Intermediate_Dir "_elementtree___Win32_Debug" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" +# PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-debug\_elementtree" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ELEMENTTREE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I "..\..\PC" /I "..\..\Modules\expat" /D "_DEBUG" /D "HAVE_EXPAT_H" /D "WIN32" /D "_WINDOWS" /D "XML_NS" /D "XML_DTD" /D BYTEORDER=1234 /D XML_CONTEXT_BYTES=1024 /D "USE_PYEXPAT_CAPI" /D "XML_STATIC" /D "HAVE_MEMMOVE" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\Modules\expat" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_NS" /D "XML_DTD" /D "BYTEORDER=1234" /D "XML_CONTEXT_BYTES=1024" /D "USE_PYEXPAT_CAPI" /D "XML_STATIC" /D "HAVE_MEMMOVE" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"./_elementtree_d.pyd" /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1d100000" /subsystem:windows /dll /debug /machine:I386 /out:"./_elementtree_d.pyd" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none !ENDIF @@ -89,9 +91,6 @@ # Name "_elementtree - Win32 Release" # Name "_elementtree - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\Modules\_elementtree.c @@ -108,22 +107,5 @@ SOURCE=..\..\Modules\expat\xmltok.c # End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\Modules\expat\xmlrole.h -# End Source File -# Begin Source File - -SOURCE=..\..\Modules\expat\xmltok.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group # End Target # End Project Modified: stackless/branches/release25-maint/PC/VC6/_ssl.mak ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_ssl.mak (original) +++ stackless/branches/release25-maint/PC/VC6/_ssl.mak Sat Apr 14 15:02:57 2007 @@ -2,17 +2,17 @@ !IFDEF DEBUG MODULE=_ssl_d.pyd TEMP_DIR=x86-temp-debug/_ssl -CFLAGS=/Od /Zi /MDd /LDd /DDEBUG /D_DEBUG +CFLAGS=/Od /Zi /MDd /LDd /DDEBUG /D_DEBUG /DWIN32 SSL_LIB_DIR=$(SSL_DIR)/out32.dbg !ELSE MODULE=_ssl.pyd TEMP_DIR=x86-temp-release/_ssl -CFLAGS=/Ox /MD /LD +CFLAGS=/Ox /MD /LD /DWIN32 SSL_LIB_DIR=$(SSL_DIR)/out32 !ENDIF INCLUDES=-I ../../Include -I .. -I $(SSL_DIR)/inc32 -LIBS=gdi32.lib wsock32.lib /libpath:$(SSL_LIB_DIR) libeay32.lib ssleay32.lib +LIBS=gdi32.lib wsock32.lib user32.lib advapi32.lib /libpath:$(SSL_LIB_DIR) libeay32.lib ssleay32.lib SOURCE=../../Modules/_ssl.c $(SSL_LIB_DIR)/libeay32.lib $(SSL_LIB_DIR)/ssleay32.lib Modified: stackless/branches/release25-maint/PC/VC6/_tkinter.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/_tkinter.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/_tkinter.dsp Sat Apr 14 15:02:57 2007 @@ -17,8 +17,8 @@ !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "_tkinter - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "_tkinter - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "_tkinter - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project @@ -44,7 +44,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\tcl84\include" /I "..\..\Include" /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\tcltk\include" /I "..\..\Include" /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\..\tcl84\lib\tk84.lib ..\..\..\tcl84\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" +# ADD LINK32 ..\..\..\tcltk\lib\tk84.lib ..\..\..\tcltk\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "_tkinter - Win32 Release" @@ -72,7 +72,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\..\tcl84\include" /I "..\..\Include" /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\..\tcltk\include" /I "..\..\Include" /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -82,15 +82,15 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 ..\..\..\tcl84\lib\tk84.lib ..\..\..\tcl84\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" +# ADD LINK32 ..\..\..\tcltk\lib\tk84.lib ..\..\..\tcltk\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" # SUBTRACT LINK32 /pdb:none !ENDIF # Begin Target -# Name "_tkinter - Win32 Debug" # Name "_tkinter - Win32 Release" +# Name "_tkinter - Win32 Debug" # Begin Source File SOURCE=..\..\Modules\_tkinter.c Modified: stackless/branches/release25-maint/PC/VC6/bz2.dsp ============================================================================== --- stackless/branches/release25-maint/PC/VC6/bz2.dsp (original) +++ stackless/branches/release25-maint/PC/VC6/bz2.dsp Sat Apr 14 15:02:57 2007 @@ -44,7 +44,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\..\bzip2-1.0.2" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\..\bzip2-1.0.3" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -54,12 +54,8 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 ..\..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./bz2.pyd" +# ADD LINK32 ..\..\..\bzip2-1.0.3\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./bz2.pyd" # SUBTRACT LINK32 /pdb:none /nodefaultlib -# Begin Special Build Tool -SOURCE="$(InputPath)" -PreLink_Cmds=cd ..\..\..\bzip2-1.0.2 nmake /nologo /f makefile.msc -# End Special Build Tool !ELSEIF "$(CFG)" == "bz2 - Win32 Debug" @@ -76,7 +72,7 @@ # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\..\bzip2-1.0.2" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\..\bzip2-1.0.3" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -86,12 +82,8 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /nodefaultlib:"libc" /out:"./bz2_d.pyd" /pdbtype:sept +# ADD LINK32 ..\..\..\bzip2-1.0.3\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /nodefaultlib:"libc" /out:"./bz2_d.pyd" /pdbtype:sept # SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PreLink_Cmds=cd ..\..\..\bzip2-1.0.2 nmake /nologo /f makefile.msc -# End Special Build Tool !ENDIF Modified: stackless/branches/release25-maint/PC/VC6/pcbuild.dsw ============================================================================== --- stackless/branches/release25-maint/PC/VC6/pcbuild.dsw (original) +++ stackless/branches/release25-maint/PC/VC6/pcbuild.dsw Sat Apr 14 15:02:57 2007 @@ -69,6 +69,18 @@ ############################################################################### +Project: "_sqlite3"=".\_sqlite3.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "_ssl"=".\_ssl.dsp" - Package Owner=<4> Package=<5> @@ -261,21 +273,6 @@ ############################################################################### -Project: "zlib"=".\zlib.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name pythoncore - End Project Dependency -}}} - -############################################################################### - Global: Package=<5> Modified: stackless/branches/release25-maint/PC/VC6/readme.txt ============================================================================== --- stackless/branches/release25-maint/PC/VC6/readme.txt (original) +++ stackless/branches/release25-maint/PC/VC6/readme.txt Sat Apr 14 15:02:57 2007 @@ -62,40 +62,37 @@ _tkinter Python wrapper for the Tk windowing system. Requires building - Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.3: + Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.12. Get source ---------- - Go to - http://prdownloads.sourceforge.net/tcl/ - and download - tcl843-src.zip - tk843-src.zip - Unzip into - dist\tcl8.4.3\ - dist\tk8.4.3\ - respectively. + In the dist directory, run + svn export http://svn.python.org/projects/external/tcl8.4.12 + svn export http://svn.python.org/projects/external/tk8.4.12 + svn export http://svn.python.org/projects/external/tix-8.4.0 - Build Tcl first (done here w/ MSVC 6 on Win98SE) + Build Tcl first (done here w/ MSVC 6 on Win2K) --------------- - cd dist\tcl8.4.3\win - run vcvars32.bat [necessary even on Win2K] + cd dist\tcl8.4.12\win + run vcvars32.bat nmake -f makefile.vc - nmake -f makefile.vc INSTALLDIR=..\..\tcl84 install + nmake -f makefile.vc INSTALLDIR=..\..\tcltk install XXX Should we compile with OPTS=threads? - XXX Some tests failed in "nmake -f makefile.vc test". - XXX all.tcl: Total 10480 Passed 9743 Skipped 719 Failed 18 - XXX - XXX That was on Win98SE. On Win2K: - XXX all.tcl Total 10480 Passed 9781 Skipped 698 Failed 1 + Optional: run tests, via + nmake -f makefile.vc test + + all.tcl: Total 10835 Passed 10096 Skipped 732 Failed 7 + Sourced 129 Test Files. + Files with failing tests: exec.test expr.test io.test main.test string.test stri + ngObj.test Build Tk -------- - cd dist\tk8.4.3\win - nmake -f makefile.vc TCLDIR=..\..\tcl8.4.3 - nmake -f makefile.vc TCLDIR=..\..\tcl8.4.3 INSTALLDIR=..\..\tcl84 install + cd dist\tk8.4.12\win + nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 + nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install XXX Should we compile with OPTS=threads? @@ -103,96 +100,59 @@ XXX failed. It popped up tons of little windows, and did lots of XXX stuff, and nothing blew up. - XXX Our installer copies a lot of stuff out of the Tcl/Tk install - XXX directory. Is all of that really needed for Python use of Tcl/Tk? - - Make sure the installer matches - ------------------------------- - Ensure that the Wise compiler vrbl _TCLDIR_ is set to the name of - the common Tcl/Tk installation directory (tcl84 for the instructions - above). This is needed so the installer can copy various Tcl/Tk - files into the Python distribution. - - -zlib - Python wrapper for the zlib compression library. Get the source code - for version 1.1.4 from a convenient mirror at: - http://www.gzip.org/zlib/ - Unpack into dist\zlib-1.1.4. - A custom pre-link step in the zlib project settings should manage to - build zlib-1.1.4\zlib.lib by magic before zlib.pyd (or zlib_d.pyd) is - linked in PCbuild\. - However, the zlib project is not smart enough to remove anything under - zlib-1.1.4\ when you do a clean, so if you want to rebuild zlib.lib - you need to clean up zlib-1.1.4\ by hand. + Built Tix + --------- + cd dist\tix-8.4.0\win + nmake -f python.mak + nmake -f python.mak install bz2 Python wrapper for the libbz2 compression library. Homepage http://sources.redhat.com/bzip2/ - Download the source tarball, bzip2-1.0.2.tar.gz. - Unpack into dist\bzip2-1.0.2. WARNING: If you're using WinZip, you - must disable its "TAR file smart CR/LF conversion" feature (under - Options -> Configuration -> Miscellaneous -> Other) for the duration. - - A custom pre-link step in the bz2 project settings should manage to - build bzip2-1.0.2\libbz2.lib by magic before bz2.pyd (or bz2_d.pyd) is - linked in PCbuild\. - However, the bz2 project is not smart enough to remove anything under - bzip2-1.0.2\ when you do a clean, so if you want to rebuild bzip2.lib - you need to clean up bzip2-1.0.2\ by hand. - - The build step shouldn't yield any warnings or errors, and should end - by displaying 6 blocks each terminated with - FC: no differences encountered - If FC finds differences, see the warning abou WinZip above (when I - first tried it, sample3.ref failed due to CRLF conversion). + Download the source from the python.org copy into the dist + directory: + + svn export http://svn.python.org/projects/external/bzip2-1.0.3 + + And requires building bz2 first. - All of this managed to build bzip2-1.0.2\libbz2.lib, which the Python + cd dist\bzip2-1.0.3 + nmake -f makefile.msc + + All of this managed to build bzip2-1.0.3\libbz2.lib, which the Python project links in. _bsddb - Go to Sleepycat's download page: - http://www.sleepycat.com/download/ + To use the version of bsddb that Python is built with by default, invoke + (in the dist directory) + + svn export http://svn.python.org/projects/external/db-4.4.20 + + Then open db-4.4.20\build_win32\Berkeley_DB.dsw and build the "db_static" + project for "Release" mode. + + Alternatively, if you want to start with the original sources, + go to Sleepycat's download page: + http://www.sleepycat.com/downloads/releasehistorybdb.html + + and download version 4.4.20. - and download version 4.1.25. The file name is db-4.1.25.NC.zip. - XXX with or without strong cryptography? I picked "without". + With or without strong cryptography? You can choose either with or + without strong cryptography, as per the instructions below. By + default, Python is built and distributed WITHOUT strong crypto. - Unpack into - dist\db-4.1.25 + Unpack the sources; if you downloaded the non-crypto version, rename + the directory from db-4.4.20.NC to db-4.4.20. - [If using WinZip to unpack the db-4.1.25.NC distro, that requires - renaming the directory (to remove ".NC") after unpacking. - ] - - Open - dist\db-4.1.25\docs\index.html - - and follow the Windows instructions for building the Sleepycat - software. Note that Berkeley_DB.dsw is in the build_win32 subdirectory. - Build the Release version ("build_all -- Win32 Release"). - - XXX We're actually linking against Release_static\libdb41s.lib. - XXX This yields the following warnings: -""" -Compiling... -_bsddb.c -Linking... - Creating library ./_bsddb.lib and object ./_bsddb.exp -LINK : warning LNK4049: locally defined symbol "_malloc" imported -LINK : warning LNK4049: locally defined symbol "_free" imported -LINK : warning LNK4049: locally defined symbol "_fclose" imported -LINK : warning LNK4049: locally defined symbol "_fopen" imported -_bsddb.pyd - 0 error(s), 4 warning(s) -""" - XXX This isn't encouraging, but I don't know what to do about it. + Now apply any patches that apply to your version. To run extensive tests, pass "-u bsddb" to regrtest.py. test_bsddb3.py is then enabled. Running in verbose mode may be helpful. XXX The test_bsddb3 tests don't always pass, on Windows (according to - XXX me) or on Linux (according to Barry). I had much better luck - XXX on Win2K than on Win98SE. The common failure mode across platforms + XXX me) or on Linux (according to Barry). (I had much better luck + XXX on Win2K than on Win98SE.) The common failure mode across platforms XXX is XXX DBAgainError: (11, 'Resource temporarily unavailable -- unable XXX to join the environment') Deleted: /stackless/branches/release25-maint/PC/VC6/zlib.dsp ============================================================================== --- /stackless/branches/release25-maint/PC/VC6/zlib.dsp Sat Apr 14 15:02:57 2007 +++ (empty file) @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=zlib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "zlib - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "zlib" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "zlib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "." -# PROP Intermediate_Dir "x86-temp-release\zlib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -F90=df.exe -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\Include" /I ".." /I "..\..\..\zlib-1.1.4" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 ..\..\..\zlib-1.1.4\zlib.lib /nologo /base:"0x1e1B0000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./zlib.pyd" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PreLink_Desc=Checking static zlib has been built -PreLink_Cmds=cd ..\..\..\zlib-1.1.4 nmake -nologo -f msdos\makefile.w32 zlib.lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "zlib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "." -# PROP Intermediate_Dir "x86-temp-debug\zlib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -F90=df.exe -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I ".." /I "..\..\..\zlib-1.1.4" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\..\zlib-1.1.4\zlib.lib /nologo /base:"0x1e1B0000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./zlib_d.pyd" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PreLink_Desc=Checking static zlib has been built -PreLink_Cmds=cd ..\..\..\zlib-1.1.4 nmake -nologo -f msdos\makefile.w32 zlib.lib -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "zlib - Win32 Release" -# Name "zlib - Win32 Debug" -# Begin Source File - -SOURCE=..\..\Modules\zlibmodule.c -# End Source File -# End Target -# End Project Modified: stackless/branches/release25-maint/PC/pyconfig.h ============================================================================== --- stackless/branches/release25-maint/PC/pyconfig.h (original) +++ stackless/branches/release25-maint/PC/pyconfig.h Sat Apr 14 15:02:57 2007 @@ -39,8 +39,12 @@ would be ISO C conforming). Neither renaming is feasible, so we just silence the warnings. */ +#ifndef _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE 1 +#endif +#ifndef _CRT_NONSTDC_NO_DEPRECATE #define _CRT_NONSTDC_NO_DEPRECATE 1 +#endif /* Windows CE does not have these */ #ifndef MS_WINCE Modified: stackless/branches/release25-maint/PC/python_nt.rc ============================================================================== --- stackless/branches/release25-maint/PC/python_nt.rc (original) +++ stackless/branches/release25-maint/PC/python_nt.rc Sat Apr 14 15:02:57 2007 @@ -61,7 +61,7 @@ VALUE "FileDescription", "Python Core\0" VALUE "FileVersion", PYTHON_VERSION VALUE "InternalName", "Python DLL\0" - VALUE "LegalCopyright", "Copyright ? 2001-2006 Python Software Foundation. Copyright ? 2000 BeOpen.com. Copyright ? 1995-2001 CNRI. Copyright ? 1991-1995 SMC.\0" + VALUE "LegalCopyright", "Copyright ? 2001-2007 Python Software Foundation. Copyright ? 2000 BeOpen.com. Copyright ? 1995-2001 CNRI. Copyright ? 1991-1995 SMC.\0" VALUE "OriginalFilename", PYTHON_DLL_NAME "\0" VALUE "ProductName", "Python\0" VALUE "ProductVersion", PYTHON_VERSION Modified: stackless/branches/release25-maint/PCbuild/_bsddb.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_bsddb.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_bsddb.vcproj Sat Apr 14 15:02:57 2007 @@ -1,197 +1,305 @@ + ProjectGUID="{E1DBB220-D64B-423D-A545-539A55AA7FE2}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_bsddb.c" + > Modified: stackless/branches/release25-maint/PCbuild/_ctypes.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ctypes.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ctypes.vcproj Sat Apr 14 15:02:57 2007 @@ -1,273 +1,406 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_ctypes\_ctypes.c" + > + RelativePath="..\Modules\_ctypes\callbacks.c" + > + RelativePath="..\Modules\_ctypes\callproc.c" + > + RelativePath="..\Modules\_ctypes\cfield.c" + > + RelativePath="..\Modules\_ctypes\libffi_msvc\ffi.c" + > + RelativePath="..\Modules\_ctypes\malloc_closure.c" + > + RelativePath="..\Modules\_ctypes\libffi_msvc\prep_cif.c" + > + RelativePath="..\Modules\_ctypes\stgdict.c" + > + RelativePath="..\Modules\_ctypes\libffi_msvc\win32.c" + > Modified: stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj Sat Apr 14 15:02:57 2007 @@ -1,240 +1,365 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_ctypes\_ctypes_test.c" + > Modified: stackless/branches/release25-maint/PCbuild/_elementtree.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_elementtree.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_elementtree.vcproj Sat Apr 14 15:02:57 2007 @@ -1,193 +1,302 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_elementtree.c" + > + RelativePath="..\Modules\expat\xmlparse.c" + > + RelativePath="..\Modules\expat\xmlrole.c" + > + RelativePath="..\Modules\expat\xmltok.c" + > Modified: stackless/branches/release25-maint/PCbuild/_msi.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_msi.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_msi.vcproj Sat Apr 14 15:02:57 2007 @@ -1,24 +1,43 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> - + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> - + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\PC\_msi.c" + > Modified: stackless/branches/release25-maint/PCbuild/_socket.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_socket.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_socket.vcproj Sat Apr 14 15:02:57 2007 @@ -1,192 +1,302 @@ + ProjectGUID="{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\socketmodule.c" + > Modified: stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj Sat Apr 14 15:02:57 2007 @@ -1,281 +1,412 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_sqlite\cache.c" + > + RelativePath="..\Modules\_sqlite\connection.c" + > + RelativePath="..\Modules\_sqlite\cursor.c" + > + RelativePath="..\Modules\_sqlite\microprotocols.c" + > + RelativePath="..\Modules\_sqlite\module.c" + > + RelativePath="..\Modules\_sqlite\prepare_protocol.c" + > + RelativePath="..\Modules\_sqlite\row.c" + > + RelativePath="..\Modules\_sqlite\statement.c" + > + RelativePath="..\Modules\_sqlite\util.c" + > Modified: stackless/branches/release25-maint/PCbuild/_ssl.mak ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ssl.mak (original) +++ stackless/branches/release25-maint/PCbuild/_ssl.mak Sat Apr 14 15:02:57 2007 @@ -31,7 +31,7 @@ _hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../PC/*.h ../Include/*.h @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib" - cl /nologo /c $(HASH_SOURCE) $(CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) + cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) link /nologo @<< /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj << Modified: stackless/branches/release25-maint/PCbuild/_ssl.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ssl.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ssl.vcproj Sat Apr 14 15:02:57 2007 @@ -1,82 +1,123 @@ + Keyword="MakeFileProj" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + Output="_ssl.pyd" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + Output="_ssl_d.pyd" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + Output="_ssl.pyd" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + Output="_ssl.pyd" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + RelativePath="..\Modules\_hashopenssl.c" + > + RelativePath="..\Modules\_ssl.c" + > Modified: stackless/branches/release25-maint/PCbuild/_testcapi.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_testcapi.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_testcapi.vcproj Sat Apr 14 15:02:57 2007 @@ -1,76 +1,126 @@ + ProjectGUID="{59CBF474-9E06-4C50-9142-C44A118BB447}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_testcapimodule.c" + > Modified: stackless/branches/release25-maint/PCbuild/_tkinter.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_tkinter.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_tkinter.vcproj Sat Apr 14 15:02:57 2007 @@ -1,195 +1,305 @@ + ProjectGUID="{5B51DFF7-5DC0-41F8-8791-A4AB7114A151}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\_tkinter.c" + > + RelativePath="..\Modules\tkappinit.c" + > Modified: stackless/branches/release25-maint/PCbuild/build_ssl.py ============================================================================== --- stackless/branches/release25-maint/PCbuild/build_ssl.py (original) +++ stackless/branches/release25-maint/PCbuild/build_ssl.py Sat Apr 14 15:02:57 2007 @@ -169,6 +169,8 @@ defs = "SSL_DIR=\"%s\"" % (ssl_dir,) if debug: defs = defs + " " + "DEBUG=1" + if arch in ('amd64', 'ia64'): + defs = defs + " EXTRA_CFLAGS=/GS-" makeCommand = 'nmake /nologo -f _ssl.mak ' + defs + " " + make_flags print "Executing:", makeCommand sys.stdout.flush() Modified: stackless/branches/release25-maint/PCbuild/bz2.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/bz2.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/bz2.vcproj Sat Apr 14 15:02:57 2007 @@ -1,205 +1,309 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> - + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> - + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> - + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + /> + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> - + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\bz2module.c" + > Modified: stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj Sat Apr 14 15:02:57 2007 @@ -1,108 +1,172 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -111,9 +175,11 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath=".\make_buildinfo.c" + > Modified: stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj Sat Apr 14 15:02:57 2007 @@ -1,140 +1,202 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> - + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + CommandLine="$(TargetFileName) > ..\PC\python_nt.h" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> - + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + CommandLine="$(TargetFileName) > ..\PC\python_nt_d.h" + /> + RelativePath="..\PC\make_versioninfo.c" + > Modified: stackless/branches/release25-maint/PCbuild/pcbuild.sln ============================================================================== --- stackless/branches/release25-maint/PCbuild/pcbuild.sln (original) +++ stackless/branches/release25-maint/PCbuild/pcbuild.sln Sat Apr 14 15:02:57 2007 @@ -1,4 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{E1DBB220-D64B-423D-A545-539A55AA7FE2}" ProjectSection(ProjectDependencies) = postProject {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} @@ -32,8 +33,6 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" ProjectSection(ProjectDependencies) = postProject @@ -67,8 +66,6 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" ProjectSection(ProjectDependencies) = postProject @@ -81,8 +78,6 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" ProjectSection(ProjectDependencies) = postProject @@ -105,182 +100,177 @@ EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - ReleaseAMD64 = ReleaseAMD64 - ReleaseItanium = ReleaseItanium - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.ActiveCfg = Debug|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.Build.0 = Debug|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.ActiveCfg = Release|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.Build.0 = Release|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.ActiveCfg = Release|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.Build.0 = Release|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.ActiveCfg = Debug|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.ActiveCfg = Release|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.Build.0 = Release|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.ActiveCfg = Debug|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.ActiveCfg = Release|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.Build.0 = Release|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.ActiveCfg = Debug|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.ActiveCfg = Release|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.Build.0 = Release|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.ActiveCfg = Release|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.Build.0 = Release|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.ActiveCfg = Debug|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.Build.0 = Debug|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.ActiveCfg = Release|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.Build.0 = Release|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.ActiveCfg = Debug|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.Build.0 = Debug|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.ActiveCfg = Release|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.Build.0 = Release|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - EndGlobalSection - GlobalSection(SolutionItems) = postSolution - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + ReleaseAMD64|Win32 = ReleaseAMD64|Win32 + ReleaseItanium|Win32 = ReleaseItanium|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug|Win32.Build.0 = Debug|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release|Win32.ActiveCfg = Release|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release|Win32.Build.0 = Release|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug|Win32.ActiveCfg = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug|Win32.Build.0 = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release|Win32.ActiveCfg = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release|Win32.Build.0 = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug|Win32.Build.0 = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release|Win32.ActiveCfg = Release|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release|Win32.Build.0 = Release|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug|Win32.ActiveCfg = Debug|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug|Win32.Build.0 = Debug|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Release|Win32.ActiveCfg = Release|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Release|Win32.Build.0 = Release|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug|Win32.ActiveCfg = Debug|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug|Win32.Build.0 = Debug|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release|Win32.ActiveCfg = Release|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release|Win32.Build.0 = Release|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug|Win32.Build.0 = Debug|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release|Win32.ActiveCfg = Release|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release|Win32.Build.0 = Release|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium|Win32.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug|Win32.Build.0 = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release|Win32.ActiveCfg = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release|Win32.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug|Win32.ActiveCfg = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug|Win32.Build.0 = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release|Win32.ActiveCfg = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release|Win32.Build.0 = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug|Win32.Build.0 = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release|Win32.ActiveCfg = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release|Win32.Build.0 = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug|Win32.ActiveCfg = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug|Win32.Build.0 = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release|Win32.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release|Win32.Build.0 = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug|Win32.Build.0 = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release|Win32.ActiveCfg = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release|Win32.Build.0 = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium|Win32.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug|Win32.Build.0 = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release|Win32.ActiveCfg = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release|Win32.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug|Win32.ActiveCfg = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug|Win32.Build.0 = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release|Win32.ActiveCfg = Release|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release|Win32.Build.0 = Release|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug|Win32.Build.0 = Debug|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release|Win32.ActiveCfg = Release|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release|Win32.Build.0 = Release|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug|Win32.Build.0 = Debug|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release|Win32.ActiveCfg = Release|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release|Win32.Build.0 = Release|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal Modified: stackless/branches/release25-maint/PCbuild/pyexpat.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pyexpat.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pyexpat.vcproj Sat Apr 14 15:02:57 2007 @@ -1,261 +1,388 @@ + ProjectGUID="{7E551393-3C43-47F8-9F3F-5BC368A6C487}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\pyexpat.c" + > + RelativePath="..\Modules\expat\xmlparse.c" + > + RelativePath="..\Modules\expat\xmlrole.c" + > + RelativePath="..\Modules\expat\xmltok.c" + > Modified: stackless/branches/release25-maint/PCbuild/python.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/python.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/python.vcproj Sat Apr 14 15:02:57 2007 @@ -1,204 +1,314 @@ + ProjectGUID="{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> - - + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + + Name="VCPreLinkEventTool" + /> - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + + Name="VCPreLinkEventTool" + /> - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + + Name="VCPreLinkEventTool" + /> - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\PC\pycon.ico" + > + RelativePath="..\Modules\python.c" + > + RelativePath="..\PC\python_exe.rc" + > Modified: stackless/branches/release25-maint/PCbuild/python20.wse ============================================================================== --- stackless/branches/release25-maint/PCbuild/python20.wse (original) +++ stackless/branches/release25-maint/PCbuild/python20.wse Sat Apr 14 15:02:57 2007 @@ -24,8 +24,8 @@ Dialogs Version=8 Version File=2.4a1 Version Description=Python Programming Language - Version Copyright=?2001-2006 Python Software Foundation - Version Company=PythonLabs at Zope Corporation + Version Copyright=?2001-2007 Python Software Foundation + Version Company=Python Software Foundation Crystal Format=10111100101100000010001001001001 Step View=&All Variable Name1=_WISE_ Modified: stackless/branches/release25-maint/PCbuild/pythoncore.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pythoncore.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pythoncore.vcproj Sat Apr 14 15:02:57 2007 @@ -1,24 +1,43 @@ + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -275,639 +397,843 @@ + > + RelativePath="..\Modules\zlib\adler32.c" + > + RelativePath="..\Modules\zlib\compress.c" + > + RelativePath="..\Modules\zlib\crc32.c" + > + RelativePath="..\Modules\zlib\deflate.c" + > + RelativePath="..\Modules\zlib\gzio.c" + > + RelativePath="..\Modules\zlib\infback.c" + > + RelativePath="..\Modules\zlib\inffast.c" + > + RelativePath="..\Modules\zlib\inflate.c" + > + RelativePath="..\Modules\zlib\inftrees.c" + > + RelativePath="..\Modules\zlib\trees.c" + > + RelativePath="..\Modules\zlib\uncompr.c" + > + RelativePath="..\Modules\zlibmodule.c" + > + Name="Release|Win32" + > + AdditionalIncludeDirectories="..\Modules\zlib" + /> + Name="Debug|Win32" + > + AdditionalIncludeDirectories="..\Modules\zlib" + /> + Name="ReleaseItanium|Win32" + > + AdditionalIncludeDirectories="..\Modules\zlib" + /> + Name="ReleaseAMD64|Win32" + > + AdditionalIncludeDirectories="..\Modules\zlib" + /> + RelativePath="..\Modules\zlib\zutil.c" + > + > + RelativePath="..\Stackless\readme.txt" + > + RelativePath="..\Stackless\stackless.h" + > + RelativePath="..\Stackless\stackless_api.h" + > + RelativePath="..\Stackless\stackless_version.h" + > + > + RelativePath="..\Stackless\core\backwardcompat.h" + > + RelativePath="..\Stackless\module\channelobject.c" + > + RelativePath="..\Stackless\module\channelobject.h" + > + RelativePath="..\Stackless\module\flextype.c" + > + RelativePath="..\Stackless\module\flextype.h" + > + RelativePath="..\Stackless\module\scheduling.c" + > + RelativePath="..\Stackless\module\stacklessmodule.c" + > + RelativePath="..\Stackless\module\taskletobject.c" + > + RelativePath="..\Stackless\module\taskletobject.h" + > + > + RelativePath="..\Stackless\core\cframeobject.c" + > + RelativePath="..\Stackless\core\slp_transfer.c" + > + RelativePath="..\Stackless\core\stackless_impl.h" + > + RelativePath="..\Stackless\core\stackless_methods.h" + > + RelativePath="..\Stackless\core\stackless_structs.h" + > + RelativePath="..\Stackless\core\stackless_tstate.h" + > + RelativePath="..\Stackless\core\stackless_util.c" + > + RelativePath="..\Stackless\core\stacklesseval.c" + > + > + RelativePath="..\Stackless\platf\slp_platformselect.h" + > + RelativePath="..\Stackless\platf\switch_ppc_macosx.h" + > + RelativePath="..\Stackless\platf\switch_ppc_unix.h" + > + RelativePath="..\Stackless\platf\switch_s390_unix.h" + > + RelativePath="..\Stackless\platf\switch_sparc_sun_gcc.h" + > + RelativePath="..\Stackless\platf\switch_x64_msvc.h" + > + RelativePath="..\Stackless\platf\switch_x86_msvc.h" + > + RelativePath="..\Stackless\platf\switch_x86_unix.h" + > + > + RelativePath="..\Stackless\pickling\prickelpit.c" + > + RelativePath="..\Stackless\pickling\prickelpit.h" + > + RelativePath="..\Stackless\pickling\safe_pickle.c" + > + RelativePath="..\Modules\_bisectmodule.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_cn.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_hk.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_iso2022.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_jp.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_kr.c" + > + RelativePath="..\Modules\cjkcodecs\_codecs_tw.c" + > + RelativePath="..\Modules\_codecsmodule.c" + > + RelativePath="..\Modules\_csv.c" + > + RelativePath="..\Modules\_functoolsmodule.c" + > + RelativePath="..\Modules\_heapqmodule.c" + > + RelativePath="..\Modules\_hotshot.c" + > + RelativePath="..\Modules\_localemodule.c" + > + RelativePath="..\Modules\_lsprof.c" + > + RelativePath="..\Modules\_randommodule.c" + > + RelativePath="..\Modules\_sre.c" + > + RelativePath="..\Modules\_struct.c" + > + RelativePath="..\Pc\_subprocess.c" + > + RelativePath="..\Modules\_typesmodule.c" + > + RelativePath="..\Modules\_weakref.c" + > + RelativePath="..\Pc\_winreg.c" + > + RelativePath="..\Objects\abstract.c" + > + RelativePath="..\Parser\acceler.c" + > + RelativePath="..\Modules\arraymodule.c" + > + RelativePath="..\Python\asdl.c" + > + RelativePath="..\Python\ast.c" + > + RelativePath="..\Modules\audioop.c" + > + RelativePath="..\Modules\binascii.c" + > + RelativePath="..\Parser\bitset.c" + > + RelativePath="..\Python\bltinmodule.c" + > + RelativePath="..\Objects\boolobject.c" + > + RelativePath="..\Objects\bufferobject.c" + > + RelativePath="..\Objects\cellobject.c" + > + RelativePath="..\Python\ceval.c" + > + RelativePath="..\Objects\classobject.c" + > + RelativePath="..\Modules\cmathmodule.c" + > + RelativePath="..\Objects\cobject.c" + > + RelativePath="..\Python\codecs.c" + > + RelativePath="..\Objects\codeobject.c" + > + RelativePath="..\Modules\collectionsmodule.c" + > + RelativePath="..\Python\compile.c" + > + RelativePath="..\Objects\complexobject.c" + > + RelativePath="..\PC\config.c" + > + RelativePath="..\Modules\cPickle.c" + > + RelativePath="..\Modules\cStringIO.c" + > + RelativePath="..\Modules\datetimemodule.c" + > + RelativePath="..\Objects\descrobject.c" + > + RelativePath="..\Objects\dictobject.c" + > + RelativePath="..\PC\dl_nt.c" + > + RelativePath="..\Python\dynload_win.c" + > + RelativePath="..\Objects\enumobject.c" + > + RelativePath="..\Modules\errnomodule.c" + > + RelativePath="..\Python\errors.c" + > + RelativePath="..\Objects\exceptions.c" + > + RelativePath="..\Objects\fileobject.c" + > + RelativePath="..\Parser\firstsets.c" + > + RelativePath="..\Objects\floatobject.c" + > + RelativePath="..\Objects\frameobject.c" + > + RelativePath="..\Python\frozen.c" + > + RelativePath="..\Objects\funcobject.c" + > + RelativePath="..\Python\future.c" + > + RelativePath="..\Modules\gcmodule.c" + > + RelativePath="..\Objects\genobject.c" + > + RelativePath="..\Python\getargs.c" + > + RelativePath="..\Python\getcompiler.c" + > + RelativePath="..\Python\getcopyright.c" + > + RelativePath="..\Python\getmtime.c" + > + RelativePath="..\Python\getopt.c" + > + RelativePath="..\PC\getpathp.c" + > + RelativePath="..\Python\getplatform.c" + > + RelativePath="..\Python\getversion.c" + > + RelativePath="..\Python\graminit.c" + > + RelativePath="..\Parser\grammar.c" + > + RelativePath="..\Parser\grammar1.c" + > + RelativePath="..\Modules\imageop.c" + > + RelativePath="..\Python\import.c" + > + RelativePath="..\PC\import_nt.c" + > + Name="Release|Win32" + > + AdditionalIncludeDirectories="..\Python" + /> + Name="Debug|Win32" + > + AdditionalIncludeDirectories="..\Python" + /> + Name="ReleaseItanium|Win32" + > + AdditionalIncludeDirectories="..\Python" + /> + Name="ReleaseAMD64|Win32" + > + AdditionalIncludeDirectories="..\Python" + /> + RelativePath="..\Python\importdl.c" + > + RelativePath="..\Objects\intobject.c" + > + RelativePath="..\Objects\iterobject.c" + > + RelativePath="..\Modules\itertoolsmodule.c" + > + RelativePath="..\Parser\listnode.c" + > + RelativePath="..\Objects\listobject.c" + > + RelativePath="..\Objects\longobject.c" + > + RelativePath="..\Modules\main.c" + > + RelativePath="..\Python\marshal.c" + > + RelativePath="..\Modules\mathmodule.c" + > + RelativePath="..\Modules\md5.c" + > + RelativePath="..\Modules\md5module.c" + > + RelativePath="..\Parser\metagrammar.c" + > + RelativePath="..\Objects\methodobject.c" + > + RelativePath="..\Modules\mmapmodule.c" + > + RelativePath="..\Python\modsupport.c" + > + RelativePath="..\Objects\moduleobject.c" + > + RelativePath="..\PC\msvcrtmodule.c" + > + RelativePath="..\Modules\cjkcodecs\multibytecodec.c" + > + RelativePath="..\Parser\myreadline.c" + > + RelativePath="..\Python\mysnprintf.c" + > + RelativePath="..\Python\mystrtoul.c" + > + RelativePath="..\Parser\node.c" + > + RelativePath="..\Objects\object.c" + > + RelativePath="..\Objects\obmalloc.c" + > + RelativePath="..\Modules\operator.c" + > + RelativePath="..\Parser\parser.c" + > + RelativePath="..\Modules\parsermodule.c" + > + RelativePath="..\Parser\parsetok.c" + > + RelativePath="..\Modules\posixmodule.c" + > + RelativePath="..\Python\pyarena.c" + > + RelativePath="..\Python\pyfpe.c" + > + RelativePath="..\Python\pystate.c" + > + RelativePath="..\Python\pystrtod.c" + > + RelativePath="..\Python\Python-ast.c" + > + RelativePath="..\PC\python_nt.rc" + > + RelativePath="..\Python\pythonrun.c" + > + RelativePath="..\Objects\rangeobject.c" + > + RelativePath="..\Modules\rgbimgmodule.c" + > + RelativePath="..\Modules\rotatingtree.c" + > + RelativePath="..\Objects\setobject.c" + > + RelativePath="..\Modules\sha256module.c" + > + RelativePath="..\Modules\sha512module.c" + > + RelativePath="..\Modules\shamodule.c" + > + RelativePath="..\Modules\signalmodule.c" + > + RelativePath="..\Objects\sliceobject.c" + > + RelativePath="..\Objects\stringobject.c" + > + RelativePath="..\Modules\stropmodule.c" + > + RelativePath="..\Python\structmember.c" + > + RelativePath="..\Objects\structseq.c" + > + RelativePath="..\Python\symtable.c" + > + RelativePath="..\Modules\symtablemodule.c" + > + RelativePath="..\Python\sysmodule.c" + > + RelativePath="..\Python\thread.c" + > + RelativePath="..\Modules\threadmodule.c" + > + RelativePath="..\Modules\timemodule.c" + > + RelativePath="..\Parser\tokenizer.c" + > + RelativePath="..\Python\traceback.c" + > + RelativePath="..\Objects\tupleobject.c" + > + RelativePath="..\Objects\typeobject.c" + > + RelativePath="..\Objects\unicodectype.c" + > + RelativePath="..\Objects\unicodeobject.c" + > + RelativePath="..\Objects\weakrefobject.c" + > + RelativePath="..\Modules\xxsubtype.c" + > + RelativePath="..\Modules\yuvconvert.c" + > + RelativePath="..\Modules\zipimport.c" + > Modified: stackless/branches/release25-maint/PCbuild/pythonw.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pythonw.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pythonw.vcproj Sat Apr 14 15:02:57 2007 @@ -1,195 +1,305 @@ + ProjectGUID="{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> - + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\PC\python_exe.rc" + > + RelativePath="..\PC\WinMain.c" + > Modified: stackless/branches/release25-maint/PCbuild/select.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/select.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/select.vcproj Sat Apr 14 15:02:57 2007 @@ -1,195 +1,305 @@ + ProjectGUID="{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\selectmodule.c" + > Modified: stackless/branches/release25-maint/PCbuild/unicodedata.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/unicodedata.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/unicodedata.vcproj Sat Apr 14 15:02:57 2007 @@ -1,76 +1,126 @@ + ProjectGUID="{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\Modules\unicodedata.c" + > Modified: stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj Sat Apr 14 15:02:57 2007 @@ -1,119 +1,183 @@ + ProjectGUID="{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\PC\w9xpopen.c" + > Modified: stackless/branches/release25-maint/PCbuild/winsound.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/winsound.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/winsound.vcproj Sat Apr 14 15:02:57 2007 @@ -1,23 +1,43 @@ + ProjectGUID="{51F35FAE-FB92-4B2C-9187-1542C065AD77}" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="0" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\PC\winsound.c" + > Modified: stackless/branches/release25-maint/PCbuild8/python20.wse ============================================================================== --- stackless/branches/release25-maint/PCbuild8/python20.wse (original) +++ stackless/branches/release25-maint/PCbuild8/python20.wse Sat Apr 14 15:02:57 2007 @@ -24,8 +24,8 @@ Dialogs Version=8 Version File=2.4a1 Version Description=Python Programming Language - Version Copyright=?2001-2006 Python Software Foundation - Version Company=PythonLabs at Zope Corporation + Version Copyright=?2001-2007 Python Software Foundation + Version Company=Python Software Foundation Crystal Format=10111100101100000010001001001001 Step View=&All Variable Name1=_WISE_ Modified: stackless/branches/release25-maint/Parser/asdl_c.py ============================================================================== --- stackless/branches/release25-maint/Parser/asdl_c.py (original) +++ stackless/branches/release25-maint/Parser/asdl_c.py Sat Apr 14 15:02:57 2007 @@ -260,7 +260,12 @@ argstr += ", PyArena *arena" else: argstr = "PyArena *arena" - self.emit("%s %s(%s);" % (ctype, name, argstr), 0) + margs = "a0" + for i in range(1, len(args)+1): + margs += ", a%d" % i + self.emit("#define %s(%s) _Py_%s(%s)" % (name, margs, name, margs), 0, + reflow = 0) + self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), 0) def visitProduct(self, prod, name): self.emit_function(name, get_c_type(name), Modified: stackless/branches/release25-maint/Python/ast.c ============================================================================== --- stackless/branches/release25-maint/Python/ast.c (original) +++ stackless/branches/release25-maint/Python/ast.c Sat Apr 14 15:02:57 2007 @@ -538,6 +538,7 @@ || TYPE(n) == listmaker || TYPE(n) == testlist_gexp || TYPE(n) == testlist_safe + || TYPE(n) == testlist1 ); seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); @@ -1032,6 +1033,7 @@ if (NCH(ch) == 5) { int j, n_ifs; asdl_seq *ifs; + expr_ty list_for_expr; ch = CHILD(ch, 4); n_ifs = count_list_ifs(ch); @@ -1046,8 +1048,12 @@ REQ(ch, list_iter); ch = CHILD(ch, 0); REQ(ch, list_if); + + list_for_expr = ast_for_expr(c, CHILD(ch, 1)); + if (!list_for_expr) + return NULL; - asdl_seq_SET(ifs, j, ast_for_expr(c, CHILD(ch, 1))); + asdl_seq_SET(ifs, j, list_for_expr); if (NCH(ch) == 3) ch = CHILD(ch, 2); } @@ -1991,7 +1997,8 @@ "assignment"); return NULL; } - set_context(expr1, Store, ch); + if (!set_context(expr1, Store, ch)) + return NULL; ch = CHILD(n, 2); if (TYPE(ch) == testlist) @@ -2592,6 +2599,8 @@ } else if (s[2] == 'i') { int i, n_elif, has_else = 0; + expr_ty expression; + asdl_seq *suite_seq; asdl_seq *orelse = NULL; n_elif = NCH(n) - 4; /* must reference the child n_elif+1 since 'else' token is third, @@ -2604,8 +2613,7 @@ n_elif /= 4; if (has_else) { - expr_ty expression; - asdl_seq *seq1, *seq2; + asdl_seq *suite_seq2; orelse = asdl_seq_new(1, c->c_arena); if (!orelse) @@ -2613,14 +2621,14 @@ expression = ast_for_expr(c, CHILD(n, NCH(n) - 6)); if (!expression) return NULL; - seq1 = ast_for_suite(c, CHILD(n, NCH(n) - 4)); - if (!seq1) + suite_seq = ast_for_suite(c, CHILD(n, NCH(n) - 4)); + if (!suite_seq) return NULL; - seq2 = ast_for_suite(c, CHILD(n, NCH(n) - 1)); - if (!seq2) + suite_seq2 = ast_for_suite(c, CHILD(n, NCH(n) - 1)); + if (!suite_seq2) return NULL; - asdl_seq_SET(orelse, 0, If(expression, seq1, seq2, + asdl_seq_SET(orelse, 0, If(expression, suite_seq, suite_seq2, LINENO(CHILD(n, NCH(n) - 6)), CHILD(n, NCH(n) - 6)->n_col_offset, c->c_arena)); /* the just-created orelse handled the last elif */ @@ -2629,8 +2637,6 @@ for (i = 0; i < n_elif; i++) { int off = 5 + (n_elif - i - 1) * 4; - expr_ty expression; - asdl_seq *suite_seq; asdl_seq *newobj = asdl_seq_new(1, c->c_arena); if (!newobj) return NULL; @@ -2646,9 +2652,14 @@ LINENO(CHILD(n, off)), CHILD(n, off)->n_col_offset, c->c_arena)); orelse = newobj; } - return If(ast_for_expr(c, CHILD(n, 1)), - ast_for_suite(c, CHILD(n, 3)), - orelse, LINENO(n), n->n_col_offset, c->c_arena); + expression = ast_for_expr(c, CHILD(n, 1)); + if (!expression) + return NULL; + suite_seq = ast_for_suite(c, CHILD(n, 3)); + if (!suite_seq) + return NULL; + return If(expression, suite_seq, orelse, + LINENO(n), n->n_col_offset, c->c_arena); } PyErr_Format(PyExc_SystemError, @@ -2888,6 +2899,8 @@ assert(TYPE(n) == with_stmt); context_expr = ast_for_expr(c, CHILD(n, 1)); + if (!context_expr) + return NULL; if (TYPE(CHILD(n, 2)) == with_var) { optional_vars = ast_for_with_var(c, CHILD(n, 2)); Modified: stackless/branches/release25-maint/Python/ceval.c ============================================================================== --- stackless/branches/release25-maint/Python/ceval.c (original) +++ stackless/branches/release25-maint/Python/ceval.c Sat Apr 14 15:02:57 2007 @@ -188,10 +188,10 @@ PyObject * PyEval_GetCallStats(PyObject *self) { - return Py_BuildValue("iiiiiiiiii", + return Py_BuildValue("iiiiiiiiiii", pcall[0], pcall[1], pcall[2], pcall[3], pcall[4], pcall[5], pcall[6], pcall[7], - pcall[8], pcall[9]); + pcall[8], pcall[9], pcall[10]); } #else #define PCALL(O) @@ -1963,12 +1963,10 @@ PUSH(w); } } else if (unpack_iterable(v, oparg, - stack_pointer + oparg)) + stack_pointer + oparg)) { stack_pointer += oparg; - else { - if (PyErr_ExceptionMatches(PyExc_TypeError)) - PyErr_SetString(PyExc_TypeError, - "unpack non-sequence"); + } else { + /* unpack_iterable() raised an exception */ why = WHY_EXCEPTION; } Py_DECREF(v); @@ -4262,7 +4260,7 @@ PyTypeObject *tp = u->ob_type; PySequenceMethods *sq = tp->tp_as_sequence; - if (sq && sq->sq_slice && ISINDEX(v) && ISINDEX(w)) { + if (sq && sq->sq_ass_slice && ISINDEX(v) && ISINDEX(w)) { Py_ssize_t ilow = 0, ihigh = PY_SSIZE_T_MAX; if (!_PyEval_SliceIndex(v, &ilow)) return -1; @@ -4382,8 +4380,10 @@ value = PyObject_GetAttr(v, name); if (value == NULL) err = -1; - else + else if (PyDict_CheckExact(locals)) err = PyDict_SetItem(locals, name, value); + else + err = PyObject_SetItem(locals, name, value); Py_DECREF(name); Py_XDECREF(value); if (err != 0) @@ -4507,6 +4507,8 @@ FILE *fp = PyFile_AsFile(prog); char *name = PyString_AsString(PyFile_Name(prog)); PyCompilerFlags cf; + if (name == NULL) + return -1; cf.cf_flags = 0; if (PyEval_MergeCompilerFlags(&cf)) v = PyRun_FileFlags(fp, name, Py_file_input, globals, Modified: stackless/branches/release25-maint/Python/compile.c ============================================================================== --- stackless/branches/release25-maint/Python/compile.c (original) +++ stackless/branches/release25-maint/Python/compile.c Sat Apr 14 15:02:57 2007 @@ -773,13 +773,17 @@ if (name == NULL || strcmp(name, "None") != 0) continue; for (j=0 ; j < PyList_GET_SIZE(consts) ; j++) { - if (PyList_GET_ITEM(consts, j) == Py_None) { - codestr[i] = LOAD_CONST; - SETARG(codestr, i, j); - cumlc = lastlc + 1; + if (PyList_GET_ITEM(consts, j) == Py_None) break; - } } + if (j == PyList_GET_SIZE(consts)) { + if (PyList_Append(consts, Py_None) == -1) + goto exitUnchanged; + } + assert(PyList_GET_ITEM(consts, j) == Py_None); + codestr[i] = LOAD_CONST; + SETARG(codestr, i, j); + cumlc = lastlc + 1; break; /* Skip over LOAD_CONST trueconst @@ -3738,8 +3742,11 @@ compiler_push_fblock(struct compiler *c, enum fblocktype t, basicblock *b) { struct fblockinfo *f; - if (c->u->u_nfblocks >= CO_MAXBLOCKS) + if (c->u->u_nfblocks >= CO_MAXBLOCKS) { + PyErr_SetString(PyExc_SystemError, + "too many statically nested blocks"); return 0; + } f = &c->u->u_fblock[c->u->u_nfblocks++]; f->fb_type = t; f->fb_block = b; Modified: stackless/branches/release25-maint/Python/errors.c ============================================================================== --- stackless/branches/release25-maint/Python/errors.c (original) +++ stackless/branches/release25-maint/Python/errors.c Sat Apr 14 15:02:57 2007 @@ -590,7 +590,11 @@ PyFile_WriteString("Exception ", f); if (t) { PyObject* moduleName; - char* className = PyExceptionClass_Name(t); + char* className = NULL; + if (PyExceptionClass_Check(t)) + className = PyExceptionClass_Name(t); + else if (PyString_Check(t)) + className = PyString_AS_STRING(t); if (className != NULL) { char *dot = strrchr(className, '.'); @@ -640,7 +644,8 @@ if (warnings_module != NULL) { dict = PyModule_GetDict(warnings_module); - func = PyDict_GetItemString(dict, "warn"); + if (dict != NULL) + func = PyDict_GetItemString(dict, "warn"); } if (func == NULL) { PySys_WriteStderr("warning: %s\n", message); Modified: stackless/branches/release25-maint/Python/getcopyright.c ============================================================================== --- stackless/branches/release25-maint/Python/getcopyright.c (original) +++ stackless/branches/release25-maint/Python/getcopyright.c Sat Apr 14 15:02:57 2007 @@ -4,7 +4,7 @@ static char cprt[] = "\ -Copyright (c) 2001-2006 Python Software Foundation.\n\ +Copyright (c) 2001-2007 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ Modified: stackless/branches/release25-maint/Python/import.c ============================================================================== --- stackless/branches/release25-maint/Python/import.c (original) +++ stackless/branches/release25-maint/Python/import.c Sat Apr 14 15:02:57 2007 @@ -339,6 +339,16 @@ return Py_None; } +static void +imp_modules_reloading_clear (void) +{ + PyInterpreterState *interp = PyThreadState_Get()->interp; + if (interp->modules_reloading == NULL) + return; + PyDict_Clear(interp->modules_reloading); + return; +} + /* Helper for sys */ PyObject * @@ -498,6 +508,7 @@ PyDict_Clear(modules); interp->modules = NULL; Py_DECREF(modules); + Py_CLEAR(interp->modules_reloading); } @@ -2400,13 +2411,21 @@ PyObject * PyImport_ReloadModule(PyObject *m) { + PyInterpreterState *interp = PyThreadState_Get()->interp; + PyObject *modules_reloading = interp->modules_reloading; PyObject *modules = PyImport_GetModuleDict(); - PyObject *path = NULL, *loader = NULL; + PyObject *path = NULL, *loader = NULL, *existing_m = NULL; char *name, *subname; char buf[MAXPATHLEN+1]; struct filedescr *fdp; FILE *fp = NULL; PyObject *newm; + + if (modules_reloading == NULL) { + Py_FatalError("PyImport_ReloadModule: " + "no modules_reloading dictionary!"); + return NULL; + } if (m == NULL || !PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, @@ -2422,20 +2441,30 @@ name); return NULL; } + if ((existing_m = PyDict_GetItemString(modules_reloading, name)) != NULL) { + /* Due to a recursive reload, this module is already being reloaded. */ + Py_INCREF(existing_m); + return existing_m; + } + PyDict_SetItemString(modules_reloading, name, m); + subname = strrchr(name, '.'); if (subname == NULL) subname = name; else { PyObject *parentname, *parent; parentname = PyString_FromStringAndSize(name, (subname-name)); - if (parentname == NULL) + if (parentname == NULL) { + imp_modules_reloading_clear(); return NULL; + } parent = PyDict_GetItem(modules, parentname); if (parent == NULL) { PyErr_Format(PyExc_ImportError, "reload(): parent %.200s not in sys.modules", PyString_AS_STRING(parentname)); Py_DECREF(parentname); + imp_modules_reloading_clear(); return NULL; } Py_DECREF(parentname); @@ -2450,6 +2479,7 @@ if (fdp == NULL) { Py_XDECREF(loader); + imp_modules_reloading_clear(); return NULL; } @@ -2466,6 +2496,7 @@ */ PyDict_SetItemString(modules, name, m); } + imp_modules_reloading_clear(); return newm; } Modified: stackless/branches/release25-maint/Python/pystate.c ============================================================================== --- stackless/branches/release25-maint/Python/pystate.c (original) +++ stackless/branches/release25-maint/Python/pystate.c Sat Apr 14 15:02:57 2007 @@ -73,6 +73,7 @@ Py_FatalError("Can't initialize threads for interpreter"); #endif interp->modules = NULL; + interp->modules_reloading = NULL; interp->sysdict = NULL; interp->builtins = NULL; interp->tstate_head = NULL; @@ -112,6 +113,7 @@ Py_CLEAR(interp->codec_search_cache); Py_CLEAR(interp->codec_error_registry); Py_CLEAR(interp->modules); + Py_CLEAR(interp->modules_reloading); Py_CLEAR(interp->sysdict); Py_CLEAR(interp->builtins); } Modified: stackless/branches/release25-maint/Python/pythonrun.c ============================================================================== --- stackless/branches/release25-maint/Python/pythonrun.c (original) +++ stackless/branches/release25-maint/Python/pythonrun.c Sat Apr 14 15:02:57 2007 @@ -201,6 +201,9 @@ interp->modules = PyDict_New(); if (interp->modules == NULL) Py_FatalError("Py_Initialize: can't make modules dictionary"); + interp->modules_reloading = PyDict_New(); + if (interp->modules_reloading == NULL) + Py_FatalError("Py_Initialize: can't make modules_reloading dictionary"); #ifdef Py_USING_UNICODE /* Init Unicode implementation; relies on the codec registry */ @@ -286,7 +289,8 @@ sys_isatty = PyObject_CallMethod(sys_stream, "isatty", ""); if (!sys_isatty) PyErr_Clear(); - if(sys_isatty && PyObject_IsTrue(sys_isatty)) { + if(sys_isatty && PyObject_IsTrue(sys_isatty) && + PyFile_Check(sys_stream)) { if (!PyFile_SetEncoding(sys_stream, codeset)) Py_FatalError("Cannot set codeset of stdin"); } @@ -296,7 +300,8 @@ sys_isatty = PyObject_CallMethod(sys_stream, "isatty", ""); if (!sys_isatty) PyErr_Clear(); - if(sys_isatty && PyObject_IsTrue(sys_isatty)) { + if(sys_isatty && PyObject_IsTrue(sys_isatty) && + PyFile_Check(sys_stream)) { if (!PyFile_SetEncoding(sys_stream, codeset)) Py_FatalError("Cannot set codeset of stdout"); } @@ -306,7 +311,8 @@ sys_isatty = PyObject_CallMethod(sys_stream, "isatty", ""); if (!sys_isatty) PyErr_Clear(); - if(sys_isatty && PyObject_IsTrue(sys_isatty)) { + if(sys_isatty && PyObject_IsTrue(sys_isatty) && + PyFile_Check(sys_stream)) { if (!PyFile_SetEncoding(sys_stream, codeset)) Py_FatalError("Cannot set codeset of stderr"); } @@ -544,6 +550,7 @@ /* XXX The following is lax in error checking */ interp->modules = PyDict_New(); + interp->modules_reloading = PyDict_New(); bimod = _PyImport_FindExtension("__builtin__", "__builtin__"); if (bimod != NULL) { @@ -1269,12 +1276,12 @@ mod = PyParser_ASTFromFile(fp, filename, start, 0, 0, flags, NULL, arena); + if (closeit) + fclose(fp); if (mod == NULL) { PyArena_Free(arena); return NULL; } - if (closeit) - fclose(fp); STACKLESS_PROMOTE_ALL(); ret = run_mod(mod, filename, globals, locals, flags, arena); PyArena_Free(arena); Modified: stackless/branches/release25-maint/Python/structmember.c ============================================================================== --- stackless/branches/release25-maint/Python/structmember.c (original) +++ stackless/branches/release25-maint/Python/structmember.c Sat Apr 14 15:02:57 2007 @@ -62,29 +62,28 @@ addr += l->offset; switch (l->type) { case T_BYTE: - v = PyInt_FromLong( - (long) (((*(char*)addr & 0xff) ^ 0x80) - 0x80)); + v = PyInt_FromLong(*(char*)addr); break; case T_UBYTE: - v = PyInt_FromLong((long) *(char*)addr & 0xff); + v = PyLong_FromUnsignedLong(*(unsigned char*)addr); break; case T_SHORT: - v = PyInt_FromLong((long) *(short*)addr); + v = PyInt_FromLong(*(short*)addr); break; case T_USHORT: - v = PyInt_FromLong((long) *(unsigned short*)addr); + v = PyLong_FromUnsignedLong(*(unsigned short*)addr); break; case T_INT: - v = PyInt_FromLong((long) *(int*)addr); + v = PyInt_FromLong(*(int*)addr); break; case T_UINT: - v = PyInt_FromLong((long) *(unsigned int*)addr); + v = PyLong_FromUnsignedLong(*(unsigned int*)addr); break; case T_LONG: v = PyInt_FromLong(*(long*)addr); break; case T_ULONG: - v = PyLong_FromDouble((double) *(unsigned long*)addr); + v = PyLong_FromUnsignedLong(*(unsigned long*)addr); break; case T_FLOAT: v = PyFloat_FromDouble((double)*(float*)addr); @@ -175,68 +174,91 @@ } addr += l->offset; switch (l->type) { - case T_BYTE: - case T_UBYTE: - if (!PyInt_Check(v)) { - PyErr_BadArgument(); + case T_BYTE:{ + long long_val; + long_val = PyInt_AsLong(v); + if ((long_val == -1) && PyErr_Occurred()) return -1; - } - *(char*)addr = (char) PyInt_AsLong(v); + *(char*)addr = (char)long_val; break; - case T_SHORT: - case T_USHORT: - if (!PyInt_Check(v)) { - PyErr_BadArgument(); - return -1; } - *(short*)addr = (short) PyInt_AsLong(v); + case T_UBYTE:{ + long long_val; + long_val = PyInt_AsLong(v); + if ((long_val == -1) && PyErr_Occurred()) + return -1; + *(unsigned char*)addr = (unsigned char)long_val; break; - case T_UINT: - case T_INT: - if (!PyInt_Check(v)) { - PyErr_BadArgument(); + } + case T_SHORT:{ + long long_val; + long_val = PyInt_AsLong(v); + if ((long_val == -1) && PyErr_Occurred()) return -1; + *(short*)addr = (short)long_val; + break; } - *(int*)addr = (int) PyInt_AsLong(v); + case T_USHORT:{ + long long_val; + long_val = PyInt_AsLong(v); + if ((long_val == -1) && PyErr_Occurred()) + return -1; + *(unsigned short*)addr = (unsigned short)long_val; break; - case T_LONG: - if (!PyInt_Check(v)) { - PyErr_BadArgument(); + } + case T_INT:{ + long long_val; + long_val = PyInt_AsLong(v); + if ((long_val == -1) && PyErr_Occurred()) return -1; + *(int *)addr = (int)long_val; + break; + } + case T_UINT:{ + unsigned long ulong_val; + ulong_val = PyLong_AsUnsignedLong(v); + if ((ulong_val == (unsigned int)-1) && PyErr_Occurred()) { + /* XXX: For compatibility, accept negative int values + as well. */ + PyErr_Clear(); + ulong_val = PyLong_AsLong(v); + if ((ulong_val == (unsigned int)-1) && PyErr_Occurred()) + return -1; } - *(long*)addr = PyInt_AsLong(v); + *(unsigned int *)addr = (unsigned int)ulong_val; break; - case T_ULONG: - if (PyInt_Check(v)) - *(long*)addr = PyInt_AsLong(v); - else if (PyLong_Check(v)) - *(long*)addr = PyLong_AsLong(v); - else { - PyErr_BadArgument(); + } + case T_LONG:{ + *(long*)addr = PyLong_AsLong(v); + if ((*(long*)addr == -1) && PyErr_Occurred()) return -1; + break; + } + case T_ULONG:{ + *(unsigned long*)addr = PyLong_AsUnsignedLong(v); + if ((*(unsigned long*)addr == (unsigned long)-1) + && PyErr_Occurred()) { + /* XXX: For compatibility, accept negative int values + as well. */ + PyErr_Clear(); + *(unsigned long*)addr = PyLong_AsLong(v); + if ((*(unsigned long*)addr == (unsigned int)-1) && PyErr_Occurred()) + return -1; } break; - case T_FLOAT: - if (PyInt_Check(v)) - *(float*)addr = - (float) PyInt_AsLong(v); - else if (PyFloat_Check(v)) - *(float*)addr = - (float) PyFloat_AsDouble(v); - else { - PyErr_BadArgument(); - return -1; } + case T_FLOAT:{ + double double_val; + double_val = PyFloat_AsDouble(v); + if ((double_val == -1) && PyErr_Occurred()) + return -1; + *(float*)addr = (float)double_val; break; + } case T_DOUBLE: - if (PyInt_Check(v)) - *(double*)addr = (double) PyInt_AsLong(v); - else if (PyFloat_Check(v)) - *(double*)addr = PyFloat_AsDouble(v); - else { - PyErr_BadArgument(); + *(double*)addr = PyFloat_AsDouble(v); + if ((*(double*)addr == -1) && PyErr_Occurred()) return -1; - } break; case T_OBJECT: case T_OBJECT_EX: Modified: stackless/branches/release25-maint/Python/sysmodule.c ============================================================================== --- stackless/branches/release25-maint/Python/sysmodule.c (original) +++ stackless/branches/release25-maint/Python/sysmodule.c Sat Apr 14 15:02:57 2007 @@ -991,6 +991,8 @@ br_start = python + 11; br_end = strchr(br_start, '/'); + assert(br_end); + /* Works even for trunk, as we are in trunk/Python/sysmodule.c */ br_end2 = strchr(br_end+1, '/'); @@ -1003,6 +1005,8 @@ } else if (istag || strncmp(br_start, "branches", 8) == 0) { len = br_end2 - br_start; + assert(len >= 13); + assert(len < (sizeof(patchlevel_revision) - 13)); strncpy(branch, br_start, len); branch[len] = '\0'; @@ -1091,17 +1095,17 @@ if (PyErr_Occurred()) return NULL; #ifdef MS_WINDOWS - if(isatty(_fileno(stdin))){ + if(isatty(_fileno(stdin)) && PyFile_Check(sysin)) { sprintf(buf, "cp%d", GetConsoleCP()); if (!PyFile_SetEncoding(sysin, buf)) return NULL; } - if(isatty(_fileno(stdout))) { + if(isatty(_fileno(stdout)) && PyFile_Check(sysout)) { sprintf(buf, "cp%d", GetConsoleOutputCP()); if (!PyFile_SetEncoding(sysout, buf)) return NULL; } - if(isatty(_fileno(stderr))) { + if(isatty(_fileno(stderr)) && PyFile_Check(syserr)) { sprintf(buf, "cp%d", GetConsoleOutputCP()); if (!PyFile_SetEncoding(syserr, buf)) return NULL; Modified: stackless/branches/release25-maint/Python/traceback.c ============================================================================== --- stackless/branches/release25-maint/Python/traceback.c (original) +++ stackless/branches/release25-maint/Python/traceback.c Sat Apr 14 15:02:57 2007 @@ -113,7 +113,7 @@ int PyTraceBack_Here(PyFrameObject *frame) { - PyThreadState *tstate = frame->f_tstate; + PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback; PyTracebackObject *tb = newtracebackobject(oldtb, frame); if (tb == NULL) Modified: stackless/branches/release25-maint/README ============================================================================== --- stackless/branches/release25-maint/README (original) +++ stackless/branches/release25-maint/README Sat Apr 14 15:02:57 2007 @@ -1,7 +1,8 @@ -This is Python version 2.5 -========================== +This is Python version 2.5.1 +============================ -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation. +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software +Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. @@ -223,6 +224,11 @@ available for all modern systems, either in the form of updated compilers from the vendor, or one of the free compilers (gcc). +If "make install" fails mysteriously during the "compiling the library" +step, make sure that you don't have any of the PYTHONPATH or PYTHONHOME +environment variables set, as they may interfere with the newly built +executable which is compiling the library. + Unsupported systems ------------------- @@ -577,9 +583,9 @@ MacOSX: The tests will crash on both 10.1 and 10.2 with SEGV in test_re and test_sre due to the small default stack size. If you set the stack size to 2048 before doing a "make test" the - failure can be avoided. If you're using the tcsh (the default - on OSX), or csh shells use "limit stacksize 2048" and for the - bash shell, use "ulimit -s 2048". + failure can be avoided. If you're using the tcsh or csh shells, + use "limit stacksize 2048" and for the bash shell (the default + as of OSX 10.3), use "ulimit -s 2048". On naked Darwin you may want to add the configure option "--disable-toolbox-glue" to disable the glue code for the Carbon Modified: stackless/branches/release25-maint/Tools/msi/uuids.py ============================================================================== --- stackless/branches/release25-maint/Tools/msi/uuids.py (original) +++ stackless/branches/release25-maint/Tools/msi/uuids.py Sat Apr 14 15:02:57 2007 @@ -31,4 +31,8 @@ '2.5.121': '{8e9321bc-6b24-48a3-8fd4-c95f8e531e5f}', # 2.5c1 '2.5.122': '{a6cd508d-9599-45da-a441-cbffa9f7e070}', # 2.5c2 '2.5.150': '{0a2c5854-557e-48c8-835a-3b9f074bdcaa}', # 2.5.0 + '2.5.1121':'{0378b43e-6184-4c2f-be1a-4a367781cd54}', # 2.5.1c1 + '2.5.1150':'{31800004-6386-4999-a519-518f2d78d8f0}', # 2.5.1 + '2.5.2150':'{6304a7da-1132-4e91-a343-a296269eab8a}', # 2.5.2c1 + '2.5.2150':'{6b976adf-8ae8-434e-b282-a06c7f624d2f}', # 2.5.2 } Modified: stackless/branches/release25-maint/configure ============================================================================== --- stackless/branches/release25-maint/configure (original) +++ stackless/branches/release25-maint/configure Sat Apr 14 15:02:57 2007 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 52087 . +# From configure.in Revision: 52844 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for python 2.5. # @@ -1575,6 +1575,11 @@ # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0]) define_xopen_source=no;; + # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of + # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by + # Marc Recht + NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S) + define_xopen_source=no;; # On Solaris 2.6, sys/wait.h is inconsistent in the usage # of union __?sigval. Reported by Stuart Bishop. SunOS/5.6) @@ -11039,9 +11044,11 @@ then case $ac_sys_system/$ac_sys_release in SunOS*) if test "$GCC" = yes; - then CCSHARED="-fPIC"; - else CCSHARED="-xcode=pic32"; - fi;; + then CCSHARED="-fPIC"; + elif test `uname -p` = sparc; + then CCSHARED="-xcode=pic32"; + else CCSHARED="-Kpic"; + fi;; hp*|HP*) if test "$GCC" = yes; then CCSHARED="-fPIC"; else CCSHARED="+z"; @@ -21929,55 +21936,38 @@ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6 -if test "${ac_cv_file__dev_ptmx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/dev/ptmx"; then - ac_cv_file__dev_ptmx=yes -else - ac_cv_file__dev_ptmx=no -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptmx" >&5 -echo "${ECHO_T}$ac_cv_file__dev_ptmx" >&6 -if test $ac_cv_file__dev_ptmx = yes; then + +if test -r /dev/ptmx +then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTMX 1 _ACEOF +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking for /dev/ptc" >&5 echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6 -if test "${ac_cv_file__dev_ptc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/dev/ptc"; then - ac_cv_file__dev_ptc=yes -else - ac_cv_file__dev_ptc=no -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptc" >&5 -echo "${ECHO_T}$ac_cv_file__dev_ptc" >&6 -if test $ac_cv_file__dev_ptc = yes; then + +if test -r /dev/ptc +then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTC 1 _ACEOF +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6 if test "$cross_compiling" = yes; then Modified: stackless/branches/release25-maint/configure.in ============================================================================== --- stackless/branches/release25-maint/configure.in (original) +++ stackless/branches/release25-maint/configure.in Sat Apr 14 15:02:57 2007 @@ -219,6 +219,11 @@ # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0@:>@) define_xopen_source=no;; + # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of + # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by + # Marc Recht + NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S]) + define_xopen_source=no;; # On Solaris 2.6, sys/wait.h is inconsistent in the usage # of union __?sigval. Reported by Stuart Bishop. SunOS/5.6) @@ -1556,9 +1561,11 @@ then case $ac_sys_system/$ac_sys_release in SunOS*) if test "$GCC" = yes; - then CCSHARED="-fPIC"; - else CCSHARED="-xcode=pic32"; - fi;; + then CCSHARED="-fPIC"; + elif test `uname -p` = sparc; + then CCSHARED="-xcode=pic32"; + else CCSHARED="-Kpic"; + fi;; hp*|HP*) if test "$GCC" = yes; then CCSHARED="-fPIC"; else CCSHARED="+z"; @@ -3355,8 +3362,27 @@ AC_MSG_RESULT(no) ) -AC_CHECK_FILE(/dev/ptmx, AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if we have /dev/ptmx.])) -AC_CHECK_FILE(/dev/ptc, AC_DEFINE(HAVE_DEV_PTC, 1, [Define if we have /dev/ptc.])) +AC_MSG_CHECKING(for /dev/ptmx) + +if test -r /dev/ptmx +then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DEV_PTMX, 1, + [Define if we have /dev/ptmx.]) +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(for /dev/ptc) + +if test -r /dev/ptc +then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DEV_PTC, 1, + [Define if we have /dev/ptc.]) +else + AC_MSG_RESULT(no) +fi AC_MSG_CHECKING(for %zd printf() format support) AC_TRY_RUN([#include Modified: stackless/branches/release25-maint/setup.py ============================================================================== --- stackless/branches/release25-maint/setup.py (original) +++ stackless/branches/release25-maint/setup.py Sat Apr 14 15:02:57 2007 @@ -606,7 +606,7 @@ # a release. Most open source OSes come with one or more # versions of BerkeleyDB already installed. - max_db_ver = (4, 4) + max_db_ver = (4, 5) min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? @@ -623,7 +623,7 @@ '/sw/include/db3', ] # 4.x minor number specific paths - for x in (0,1,2,3,4): + for x in (0,1,2,3,4,5): db_inc_paths.append('/usr/include/db4%d' % x) db_inc_paths.append('/usr/include/db4.%d' % x) db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) @@ -631,7 +631,7 @@ db_inc_paths.append('/pkg/db-4.%d/include' % x) db_inc_paths.append('/opt/db-4.%d/include' % x) # 3.x minor number specific paths - for x in (2,3): + for x in (3,): db_inc_paths.append('/usr/include/db3%d' % x) db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) db_inc_paths.append('/usr/local/include/db3%d' % x) @@ -1316,7 +1316,8 @@ from distutils.dep_util import newer_group config_sources = [os.path.join(ffi_srcdir, fname) - for fname in os.listdir(ffi_srcdir)] + for fname in os.listdir(ffi_srcdir) + if os.path.isfile(os.path.join(ffi_srcdir, fname))] if self.force or newer_group(config_sources, ffi_configfile): from distutils.dir_util import mkpath -------------- next part -------------- _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Sun Apr 15 01:04:28 2007 From: python-checkins at python.org (richard.tew) Date: Sun, 15 Apr 2007 01:04:28 +0200 (CEST) Subject: [Stackless-checkins] r54827 - stackless/branches/release25-maint/PCbuild/_bsddb.vcproj stackless/branches/release25-maint/PCbuild/_ctypes.vcproj stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj stackless/branches/release25-maint/PCbuild/_elementtree.vcproj stackless/branches/release25-maint/PCbuild/_msi.vcproj stackless/branches/release25-maint/PCbuild/_socket.vcproj stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj stackless/branches/release25-maint/PCbuild/_ssl.vcproj stackless/branches/release25-maint/PCbuild/_testcapi.vcproj stackless/branches/release25-maint/PCbuild/_tkinter.vcproj stackless/branches/release25-maint/PCbuild/bz2.vcproj stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj stackless/branches/release25-maint/PCbuild/pcbuild.sln stackless/branches/release25-maint/PCbuild/pyexpat.vcproj stackless/branches/release25-maint/PCbuild/python.vcproj stackless/branches/release25! -maint/PCbuild/pythoncore.vcproj stackless/branches/release25-maint/PCbuild/pythonw.vcproj stackless/branches/release25-maint/PCbuild/select.vcproj stackless/branches/release25-maint/PCbuild/unicodedata.vcproj stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj stackless/branches/release25-maint/PCbuild/winsound.vcproj Message-ID: <20070414230428.61BEE1E4003@bag.python.org> Author: richard.tew Date: Sun Apr 15 01:04:20 2007 New Revision: 54827 Modified: stackless/branches/release25-maint/PCbuild/_bsddb.vcproj stackless/branches/release25-maint/PCbuild/_ctypes.vcproj stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj stackless/branches/release25-maint/PCbuild/_elementtree.vcproj stackless/branches/release25-maint/PCbuild/_msi.vcproj stackless/branches/release25-maint/PCbuild/_socket.vcproj stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj stackless/branches/release25-maint/PCbuild/_ssl.vcproj stackless/branches/release25-maint/PCbuild/_testcapi.vcproj stackless/branches/release25-maint/PCbuild/_tkinter.vcproj stackless/branches/release25-maint/PCbuild/bz2.vcproj stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj stackless/branches/release25-maint/PCbuild/pcbuild.sln stackless/branches/release25-maint/PCbuild/pyexpat.vcproj stackless/branches/release25-maint/PCbuild/python.vcproj stackless/branches/release25-maint/PCbuild/pythoncore.vcproj stackless/branches/release25-maint/PCbuild/pythonw.vcproj stackless/branches/release25-maint/PCbuild/select.vcproj stackless/branches/release25-maint/PCbuild/unicodedata.vcproj stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj stackless/branches/release25-maint/PCbuild/winsound.vcproj Log: With the merge in from the mainline trunk, I checked in the PCbuild directory as VS8 (which I use). This should correct PCbuild for VS7 merged up to date according to the mainline trunk. Modified: stackless/branches/release25-maint/PCbuild/_bsddb.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_bsddb.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_bsddb.vcproj Sun Apr 15 01:04:20 2007 @@ -1,213 +1,135 @@ + SccProjectName="_bsddb" + SccAuxPath="" + SccLocalPath=".." + SccProvider="MSSCCI:Perforce SCM"> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_bsddb.c"> Modified: stackless/branches/release25-maint/PCbuild/_ctypes.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ctypes.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ctypes.vcproj Sun Apr 15 01:04:20 2007 @@ -1,406 +1,273 @@ + Keyword="Win32Proj"> + Name="Win32"/> - - - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_ctypes\_ctypes.c"> + RelativePath="..\Modules\_ctypes\callbacks.c"> + RelativePath="..\Modules\_ctypes\callproc.c"> + RelativePath="..\Modules\_ctypes\cfield.c"> + RelativePath="..\Modules\_ctypes\libffi_msvc\ffi.c"> + RelativePath="..\Modules\_ctypes\malloc_closure.c"> + RelativePath="..\Modules\_ctypes\libffi_msvc\prep_cif.c"> + RelativePath="..\Modules\_ctypes\stgdict.c"> + RelativePath="..\Modules\_ctypes\libffi_msvc\win32.c"> Modified: stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ctypes_test.vcproj Sun Apr 15 01:04:20 2007 @@ -1,365 +1,240 @@ + Keyword="Win32Proj"> + Name="Win32"/> - - - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_ctypes\_ctypes_test.c"> Modified: stackless/branches/release25-maint/PCbuild/_elementtree.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_elementtree.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_elementtree.vcproj Sun Apr 15 01:04:20 2007 @@ -1,211 +1,132 @@ + SccProjectName="_elementtree" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_elementtree.c"> + RelativePath="..\Modules\expat\xmlparse.c"> + RelativePath="..\Modules\expat\xmlrole.c"> + RelativePath="..\Modules\expat\xmltok.c"> Modified: stackless/branches/release25-maint/PCbuild/_msi.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_msi.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_msi.vcproj Sun Apr 15 01:04:20 2007 @@ -1,43 +1,24 @@ + SccProjectName="_msi" + SccLocalPath="..\pc"> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\PC\_msi.c"> Modified: stackless/branches/release25-maint/PCbuild/_socket.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_socket.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_socket.vcproj Sun Apr 15 01:04:20 2007 @@ -1,211 +1,131 @@ + SccProjectName="_socket" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\socketmodule.c"> Modified: stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_sqlite3.vcproj Sun Apr 15 01:04:20 2007 @@ -1,213 +1,134 @@ + SccProjectName="_sqlite3" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_sqlite\cache.c"> + RelativePath="..\Modules\_sqlite\connection.c"> + RelativePath="..\Modules\_sqlite\cursor.c"> + RelativePath="..\Modules\_sqlite\microprotocols.c"> + RelativePath="..\Modules\_sqlite\module.c"> + RelativePath="..\Modules\_sqlite\prepare_protocol.c"> + RelativePath="..\Modules\_sqlite\row.c"> + RelativePath="..\Modules\_sqlite\statement.c"> + RelativePath="..\Modules\_sqlite\util.c"> Modified: stackless/branches/release25-maint/PCbuild/_ssl.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_ssl.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_ssl.vcproj Sun Apr 15 01:04:20 2007 @@ -1,123 +1,82 @@ + SccProjectName="" + SccLocalPath="" + Keyword="MakeFileProj"> + Name="Win32"/> - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + Output="_ssl.pyd"/> + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + Output="_ssl_d.pyd"/> + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + Output="_ssl.pyd"/> + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + Output="_ssl.pyd"/> + RelativePath="..\Modules\_ssl.c"> + RelativePath="..\Modules\_hashopenssl.c"> Modified: stackless/branches/release25-maint/PCbuild/_testcapi.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_testcapi.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_testcapi.vcproj Sun Apr 15 01:04:20 2007 @@ -1,126 +1,76 @@ + SccProjectName="_testcapi" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_testcapimodule.c"> Modified: stackless/branches/release25-maint/PCbuild/_tkinter.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/_tkinter.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/_tkinter.vcproj Sun Apr 15 01:04:20 2007 @@ -1,213 +1,133 @@ + SccProjectName="_tkinter" + SccLocalPath="..\..\.."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\_tkinter.c"> + RelativePath="..\Modules\tkappinit.c"> Modified: stackless/branches/release25-maint/PCbuild/bz2.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/bz2.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/bz2.vcproj Sun Apr 15 01:04:20 2007 @@ -1,216 +1,140 @@ + SccProjectName="bz2" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> - + CompileAs="0"/> - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> - + CompileAs="0"/> - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> - + CompileAs="0"/> - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> - + CompileAs="0"/> - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\bz2module.c"> Modified: stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/make_buildinfo.vcproj Sun Apr 15 01:04:20 2007 @@ -1,172 +1,108 @@ + Keyword="Win32Proj"> + Name="Win32"/> - - - - - - - + CharacterSet="2"> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + CharacterSet="2"> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> @@ -175,11 +111,9 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + RelativePath=".\make_buildinfo.c"> Modified: stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/make_versioninfo.vcproj Sun Apr 15 01:04:20 2007 @@ -1,202 +1,140 @@ + SccProjectName="make_versioninfo" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> - + CompileAs="0"/> - + Name="VCCustomBuildTool" + CommandLine=".\make_versioninfo.exe >..\PC\pythonnt_rc.h +" + Outputs="..\PC\pythonnt_rc.h"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool" + CommandLine="$(TargetFileName) > ..\PC\python_nt.h"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> - + CompileAs="0"/> - + Name="VCCustomBuildTool" + CommandLine=".\make_versioninfo_d.exe >..\PC\pythonnt_rc_d.h +" + Outputs="..\PC\pythonnt_rc_d.h"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool" + CommandLine="$(TargetFileName) > ..\PC\python_nt_d.h"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + + RelativePath="..\PC\make_versioninfo.c"> Modified: stackless/branches/release25-maint/PCbuild/pcbuild.sln ============================================================================== --- stackless/branches/release25-maint/PCbuild/pcbuild.sln (original) +++ stackless/branches/release25-maint/PCbuild/pcbuild.sln Sun Apr 15 01:04:20 2007 @@ -1,5 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 +Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{E1DBB220-D64B-423D-A545-539A55AA7FE2}" ProjectSection(ProjectDependencies) = postProject {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} @@ -33,6 +32,8 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" ProjectSection(ProjectDependencies) = postProject @@ -66,6 +67,8 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" ProjectSection(ProjectDependencies) = postProject @@ -78,6 +81,8 @@ EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" ProjectSection(ProjectDependencies) = postProject @@ -100,177 +105,182 @@ EndProjectSection EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - ReleaseAMD64|Win32 = ReleaseAMD64|Win32 - ReleaseItanium|Win32 = ReleaseItanium|Win32 + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + ReleaseAMD64 = ReleaseAMD64 + ReleaseItanium = ReleaseItanium + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.ActiveCfg = Debug|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.Build.0 = Debug|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.ActiveCfg = Release|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.Build.0 = Release|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.ActiveCfg = Release|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.Build.0 = Release|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.ActiveCfg = Debug|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.ActiveCfg = Release|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.Build.0 = Release|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.ActiveCfg = Debug|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.ActiveCfg = Release|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.Build.0 = Release|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.ActiveCfg = Debug|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.ActiveCfg = Release|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.Build.0 = Release|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.ActiveCfg = Release|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.Build.0 = Release|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.ActiveCfg = Debug|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.Build.0 = Debug|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.ActiveCfg = Release|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.Build.0 = Release|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.ActiveCfg = Debug|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.Build.0 = Debug|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.ActiveCfg = Release|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.Build.0 = Release|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + EndGlobalSection + GlobalSection(SolutionItems) = postSolution + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c + readme.txt = readme.txt EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug|Win32.Build.0 = Debug|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release|Win32.ActiveCfg = Release|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release|Win32.Build.0 = Release|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug|Win32.Build.0 = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release|Win32.ActiveCfg = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release|Win32.Build.0 = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug|Win32.ActiveCfg = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug|Win32.Build.0 = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release|Win32.ActiveCfg = Release|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release|Win32.Build.0 = Release|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug|Win32.ActiveCfg = Debug|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug|Win32.Build.0 = Debug|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Release|Win32.ActiveCfg = Release|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Release|Win32.Build.0 = Release|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug|Win32.ActiveCfg = Debug|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug|Win32.Build.0 = Debug|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release|Win32.ActiveCfg = Release|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release|Win32.Build.0 = Release|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug|Win32.Build.0 = Debug|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release|Win32.ActiveCfg = Release|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release|Win32.Build.0 = Release|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium|Win32.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug|Win32.ActiveCfg = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug|Win32.Build.0 = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release|Win32.ActiveCfg = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release|Win32.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug|Win32.ActiveCfg = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug|Win32.Build.0 = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release|Win32.ActiveCfg = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release|Win32.Build.0 = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug|Win32.ActiveCfg = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug|Win32.Build.0 = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release|Win32.ActiveCfg = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release|Win32.Build.0 = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug|Win32.ActiveCfg = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug|Win32.Build.0 = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release|Win32.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release|Win32.Build.0 = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug|Win32.Build.0 = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release|Win32.ActiveCfg = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release|Win32.Build.0 = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium|Win32.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug|Win32.Build.0 = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release|Win32.ActiveCfg = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release|Win32.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug|Win32.ActiveCfg = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug|Win32.Build.0 = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release|Win32.ActiveCfg = Release|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release|Win32.Build.0 = Release|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug|Win32.Build.0 = Debug|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release|Win32.ActiveCfg = Release|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release|Win32.Build.0 = Release|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug|Win32.Build.0 = Debug|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release|Win32.ActiveCfg = Release|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release|Win32.Build.0 = Release|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64|Win32.ActiveCfg = ReleaseAMD64|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64|Win32.Build.0 = ReleaseAMD64|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium|Win32.ActiveCfg = ReleaseItanium|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium|Win32.Build.0 = ReleaseItanium|Win32 + GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal Modified: stackless/branches/release25-maint/PCbuild/pyexpat.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pyexpat.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pyexpat.vcproj Sun Apr 15 01:04:20 2007 @@ -1,211 +1,131 @@ + SccProjectName="pyexpat" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\pyexpat.c"> + RelativePath="..\Modules\expat\xmlparse.c"> + RelativePath="..\Modules\expat\xmlrole.c"> + RelativePath="..\Modules\expat\xmltok.c"> Modified: stackless/branches/release25-maint/PCbuild/python.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/python.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/python.vcproj Sun Apr 15 01:04:20 2007 @@ -1,220 +1,140 @@ + SccProjectName="python" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> - - + CompileAs="0"/> + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + AdditionalIncludeDirectories="..\Include"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> - - + CompileAs="0"/> + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> - - + CompileAs="0"/> + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\PC\pycon.ico"> + RelativePath="..\Modules\python.c"> + RelativePath="..\PC\python_exe.rc"> Modified: stackless/branches/release25-maint/PCbuild/pythoncore.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pythoncore.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pythoncore.vcproj Sun Apr 15 01:04:20 2007 @@ -1,43 +1,24 @@ + SccProjectName="pythoncore" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe $(ConfigurationName)"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe $(ConfigurationName)"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe $(ConfigurationName)"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe $(ConfigurationName)"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> @@ -397,843 +275,639 @@ + Filter=""> + RelativePath="..\Modules\zlib\adler32.c"> + RelativePath="..\Modules\zlib\compress.c"> + RelativePath="..\Modules\zlib\crc32.c"> + RelativePath="..\Modules\zlib\deflate.c"> + RelativePath="..\Modules\zlib\gzio.c"> + RelativePath="..\Modules\zlib\infback.c"> + RelativePath="..\Modules\zlib\inffast.c"> + RelativePath="..\Modules\zlib\inflate.c"> + RelativePath="..\Modules\zlib\inftrees.c"> + RelativePath="..\Modules\zlib\trees.c"> + RelativePath="..\Modules\zlib\uncompr.c"> + RelativePath="..\Modules\zlibmodule.c"> + Name="Release|Win32"> + AdditionalIncludeDirectories="..\Modules\zlib"/> + Name="Debug|Win32"> + AdditionalIncludeDirectories="..\Modules\zlib"/> + Name="ReleaseItanium|Win32"> + AdditionalIncludeDirectories="..\Modules\zlib"/> + Name="ReleaseAMD64|Win32"> + AdditionalIncludeDirectories="..\Modules\zlib"/> + RelativePath="..\Modules\zlib\zutil.c"> + Filter=""> + RelativePath="..\Stackless\readme.txt"> + RelativePath="..\Stackless\stackless.h"> + RelativePath="..\Stackless\stackless_api.h"> + RelativePath="..\Stackless\stackless_version.h"> + Filter=""> + RelativePath="..\Stackless\core\backwardcompat.h"> + RelativePath="..\Stackless\module\channelobject.c"> + RelativePath="..\Stackless\module\channelobject.h"> + RelativePath="..\Stackless\module\flextype.c"> + RelativePath="..\Stackless\module\flextype.h"> + RelativePath="..\Stackless\module\scheduling.c"> + RelativePath="..\Stackless\module\stacklessmodule.c"> + RelativePath="..\Stackless\module\taskletobject.c"> + RelativePath="..\Stackless\module\taskletobject.h"> + Filter=""> + RelativePath="..\Stackless\core\cframeobject.c"> + RelativePath="..\Stackless\core\slp_transfer.c"> + RelativePath="..\Stackless\core\stackless_impl.h"> + RelativePath="..\Stackless\core\stackless_methods.h"> + RelativePath="..\Stackless\core\stackless_structs.h"> + RelativePath="..\Stackless\core\stackless_tstate.h"> + RelativePath="..\Stackless\core\stackless_util.c"> + RelativePath="..\Stackless\core\stacklesseval.c"> + Filter=""> + RelativePath="..\Stackless\platf\slp_platformselect.h"> + RelativePath="..\Stackless\platf\switch_ppc_macosx.h"> + RelativePath="..\Stackless\platf\switch_ppc_unix.h"> + RelativePath="..\Stackless\platf\switch_s390_unix.h"> + RelativePath="..\Stackless\platf\switch_sparc_sun_gcc.h"> + RelativePath="..\Stackless\platf\switch_x64_msvc.h"> + RelativePath="..\Stackless\platf\switch_x86_msvc.h"> + RelativePath="..\Stackless\platf\switch_x86_unix.h"> + Filter=""> + RelativePath="..\Stackless\pickling\prickelpit.c"> + RelativePath="..\Stackless\pickling\prickelpit.h"> + RelativePath="..\Stackless\pickling\safe_pickle.c"> + RelativePath="..\Modules\_bisectmodule.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_cn.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_hk.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_iso2022.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_jp.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_kr.c"> + RelativePath="..\Modules\cjkcodecs\_codecs_tw.c"> + RelativePath="..\Modules\_codecsmodule.c"> + RelativePath="..\Modules\_csv.c"> + RelativePath="..\Modules\_functoolsmodule.c"> + RelativePath="..\Modules\_heapqmodule.c"> + RelativePath="..\Modules\_hotshot.c"> + RelativePath="..\Modules\_localemodule.c"> + RelativePath="..\Modules\_lsprof.c"> + RelativePath="..\Modules\_randommodule.c"> + RelativePath="..\Modules\_sre.c"> + RelativePath="..\Modules\_struct.c"> + RelativePath="..\Pc\_subprocess.c"> + RelativePath="..\Modules\_typesmodule.c"> + RelativePath="..\Modules\_weakref.c"> + RelativePath="..\Pc\_winreg.c"> + RelativePath="..\Objects\abstract.c"> + RelativePath="..\Parser\acceler.c"> + RelativePath="..\Modules\arraymodule.c"> + RelativePath="..\Python\asdl.c"> + RelativePath="..\Python\ast.c"> + RelativePath="..\Modules\audioop.c"> + RelativePath="..\Modules\binascii.c"> + RelativePath="..\Parser\bitset.c"> + RelativePath="..\Python\bltinmodule.c"> + RelativePath="..\Objects\boolobject.c"> + RelativePath="..\Objects\bufferobject.c"> + RelativePath="..\Objects\cellobject.c"> + RelativePath="..\Python\ceval.c"> + RelativePath="..\Objects\classobject.c"> + RelativePath="..\Modules\cmathmodule.c"> + RelativePath="..\Objects\cobject.c"> + RelativePath="..\Python\codecs.c"> + RelativePath="..\Objects\codeobject.c"> + RelativePath="..\Modules\collectionsmodule.c"> + RelativePath="..\Python\compile.c"> + RelativePath="..\Objects\complexobject.c"> + RelativePath="..\PC\config.c"> + RelativePath="..\Modules\cPickle.c"> + RelativePath="..\Modules\cStringIO.c"> + RelativePath="..\Modules\datetimemodule.c"> + RelativePath="..\Objects\descrobject.c"> + RelativePath="..\Objects\dictobject.c"> + RelativePath="..\PC\dl_nt.c"> + RelativePath="..\Python\dynload_win.c"> + RelativePath="..\Objects\enumobject.c"> + RelativePath="..\Modules\errnomodule.c"> + RelativePath="..\Python\errors.c"> + RelativePath="..\Objects\exceptions.c"> + RelativePath="..\Objects\fileobject.c"> + RelativePath="..\Parser\firstsets.c"> + RelativePath="..\Objects\floatobject.c"> + RelativePath="..\Objects\frameobject.c"> + RelativePath="..\Python\frozen.c"> + RelativePath="..\Objects\funcobject.c"> + RelativePath="..\Python\future.c"> + RelativePath="..\Modules\gcmodule.c"> + RelativePath="..\Objects\genobject.c"> + RelativePath="..\Python\getargs.c"> + RelativePath="..\Python\getcompiler.c"> + RelativePath="..\Python\getcopyright.c"> + RelativePath="..\Python\getmtime.c"> + RelativePath="..\Python\getopt.c"> + RelativePath="..\PC\getpathp.c"> + RelativePath="..\Python\getplatform.c"> + RelativePath="..\Python\getversion.c"> + RelativePath="..\Python\graminit.c"> + RelativePath="..\Parser\grammar.c"> + RelativePath="..\Parser\grammar1.c"> + RelativePath="..\Modules\imageop.c"> + RelativePath="..\Python\import.c"> + RelativePath="..\PC\import_nt.c"> + Name="Release|Win32"> + AdditionalIncludeDirectories="..\Python"/> + Name="Debug|Win32"> + AdditionalIncludeDirectories="..\Python"/> + Name="ReleaseItanium|Win32"> + AdditionalIncludeDirectories="..\Python"/> + Name="ReleaseAMD64|Win32"> + AdditionalIncludeDirectories="..\Python"/> + RelativePath="..\Python\importdl.c"> + RelativePath="..\Objects\intobject.c"> + RelativePath="..\Objects\iterobject.c"> + RelativePath="..\Modules\itertoolsmodule.c"> + RelativePath="..\Parser\listnode.c"> + RelativePath="..\Objects\listobject.c"> + RelativePath="..\Objects\longobject.c"> + RelativePath="..\Modules\main.c"> + RelativePath="..\Python\marshal.c"> + RelativePath="..\Modules\mathmodule.c"> + RelativePath="..\Modules\md5.c"> + RelativePath="..\Modules\md5module.c"> + RelativePath="..\Parser\metagrammar.c"> + RelativePath="..\Objects\methodobject.c"> + RelativePath="..\Modules\mmapmodule.c"> + RelativePath="..\Python\modsupport.c"> + RelativePath="..\Objects\moduleobject.c"> + RelativePath="..\PC\msvcrtmodule.c"> + RelativePath="..\Modules\cjkcodecs\multibytecodec.c"> + RelativePath="..\Parser\myreadline.c"> + RelativePath="..\Python\mysnprintf.c"> + RelativePath="..\Python\mystrtoul.c"> + RelativePath="..\Parser\node.c"> + RelativePath="..\Objects\object.c"> + RelativePath="..\Objects\obmalloc.c"> + RelativePath="..\Modules\operator.c"> + RelativePath="..\Parser\parser.c"> + RelativePath="..\Modules\parsermodule.c"> + RelativePath="..\Parser\parsetok.c"> + RelativePath="..\Modules\posixmodule.c"> + RelativePath="..\Python\pyarena.c"> + RelativePath="..\Python\pyfpe.c"> + RelativePath="..\Python\pystate.c"> + RelativePath="..\Python\pystrtod.c"> + RelativePath="..\Python\Python-ast.c"> + RelativePath="..\PC\python_nt.rc"> + RelativePath="..\Python\pythonrun.c"> + RelativePath="..\Objects\rangeobject.c"> + RelativePath="..\Modules\rgbimgmodule.c"> + RelativePath="..\Modules\rotatingtree.c"> + RelativePath="..\Objects\setobject.c"> + RelativePath="..\Modules\sha256module.c"> + RelativePath="..\Modules\sha512module.c"> + RelativePath="..\Modules\shamodule.c"> + RelativePath="..\Modules\signalmodule.c"> + RelativePath="..\Objects\sliceobject.c"> + RelativePath="..\Objects\stringobject.c"> + RelativePath="..\Modules\stropmodule.c"> + RelativePath="..\Python\structmember.c"> + RelativePath="..\Objects\structseq.c"> + RelativePath="..\Python\symtable.c"> + RelativePath="..\Modules\symtablemodule.c"> + RelativePath="..\Python\sysmodule.c"> + RelativePath="..\Python\thread.c"> + RelativePath="..\Modules\threadmodule.c"> + RelativePath="..\Modules\timemodule.c"> + RelativePath="..\Parser\tokenizer.c"> + RelativePath="..\Python\traceback.c"> + RelativePath="..\Objects\tupleobject.c"> + RelativePath="..\Objects\typeobject.c"> + RelativePath="..\Objects\unicodectype.c"> + RelativePath="..\Objects\unicodeobject.c"> + RelativePath="..\Objects\weakrefobject.c"> + RelativePath="..\Modules\xxsubtype.c"> + RelativePath="..\Modules\yuvconvert.c"> + RelativePath="..\Modules\zipimport.c"> Modified: stackless/branches/release25-maint/PCbuild/pythonw.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/pythonw.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/pythonw.vcproj Sun Apr 15 01:04:20 2007 @@ -1,213 +1,133 @@ + SccProjectName="pythonw" + SccLocalPath="..\pc"> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\PC\python_exe.rc"> + RelativePath="..\PC\WinMain.c"> Modified: stackless/branches/release25-maint/PCbuild/select.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/select.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/select.vcproj Sun Apr 15 01:04:20 2007 @@ -1,213 +1,133 @@ + SccProjectName="select" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\selectmodule.c"> Modified: stackless/branches/release25-maint/PCbuild/unicodedata.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/unicodedata.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/unicodedata.vcproj Sun Apr 15 01:04:20 2007 @@ -1,126 +1,76 @@ + SccProjectName="unicodedata" + SccLocalPath=".."> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\Modules\unicodedata.c"> Modified: stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/w9xpopen.vcproj Sun Apr 15 01:04:20 2007 @@ -1,183 +1,119 @@ + SccProjectName="" + SccLocalPath=""> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + DebugInformationFormat="3"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\PC\w9xpopen.c"> Modified: stackless/branches/release25-maint/PCbuild/winsound.vcproj ============================================================================== --- stackless/branches/release25-maint/PCbuild/winsound.vcproj (original) +++ stackless/branches/release25-maint/PCbuild/winsound.vcproj Sun Apr 15 01:04:20 2007 @@ -1,43 +1,23 @@ + SccProjectName="winsound" + SccLocalPath="..\pc"> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + CompileAs="0"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="0"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + RelativePath="..\PC\winsound.c"> _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From mailman-bounces at stackless.com Fri Apr 27 11:07:04 2007 From: mailman-bounces at stackless.com (mailman-bounces at stackless.com) Date: Fri, 27 Apr 2007 11:07:04 +0200 Subject: Stackless-checkins subscription notification Message-ID: alva bai has been successfully subscribed to Stackless-checkins. From stackless-checkins-bounces at stackless.com Sat Apr 14 15:06:00 2007 From: stackless-checkins-bounces at stackless.com (stackless-checkins-bounces at stackless.com) Date: Sat, 14 Apr 2007 15:06:00 +0200 Subject: [Python-checkins] Your message to Stackless-checkins awaits moderator approval Message-ID: Your mail to 'Stackless-checkins' with the subject r54826 - in stackless/branches/release25-maint: Demo/parser/unparse.py Doc/README Doc/api/abstract.tex Doc/api/concrete.tex Doc/api/exceptions.tex Doc/api/memory.tex Doc/api/newtypes.tex Doc/api/utilities.tex Doc/commontex/boilerplate.tex Doc/commontex/license.tex Doc/dist/dist.tex Doc/ext/newtypes.tex Doc/ext/shoddy.c Doc/inst/inst.tex Doc/lib/emailgenerator.tex Doc/lib/libasyncore.tex Doc/lib/libbase64.tex Doc/lib/libbsddb.tex Doc/lib/libbz2.tex Doc/lib/libcollections.tex Doc/lib/libcommands.tex Doc/lib/libcsv.tex Doc/lib/libctypes.tex Doc/lib/libdbhash.tex Doc/lib/libfnmatch.tex Doc/lib/libfuncs.tex Doc/lib/libfunctools.tex Doc/lib/libgetopt.tex Doc/lib/libgettext.tex Doc/lib/libheapq.tex Doc/lib/libimageop.tex Doc/lib/libitertools.tex Doc/lib/liblocale.tex Doc/lib/liblogging.tex Doc/lib/libmailbox.tex Doc/lib/libmmap.tex Doc/lib/libmsilib.tex Doc/lib/libos.tex Doc/lib/libpickle.tex Doc/lib/libpopen2.tex Doc/lib/libprofile.tex Doc/lib/librandom.tex Doc/lib/libshu! til.tex Doc/lib/libsimplexmlrpc.tex Doc/lib/libsmtplib.tex Doc/lib/libsocket.tex Doc/lib/libsqlite3.tex Doc/lib/libstdtypes.tex Doc/lib/libstring.tex Doc/lib/libstruct.tex Doc/lib/libsubprocess.tex Doc/lib/libtarfile.tex Doc/lib/libtempfile.tex Doc/lib/libthreading.tex Doc/lib/libtimeit.tex Doc/lib/libunittest.tex Doc/lib/liburlparse.tex Doc/lib/libwsgiref.tex Doc/lib/tkinter.tex Doc/mac/toolbox.tex Doc/ref/ref1.tex Doc/ref/ref3.tex Doc/ref/ref5.tex Doc/ref/ref6.tex Doc/ref/ref7.tex Doc/tools/py2texi.el Doc/tut/tut.tex Doc/whatsnew/whatsnew25.tex Include/Python-ast.h Include/abstract.h Include/dictobject.h Include/patchlevel.h Include/pystate.h Include/setobject.h LICENSE Lib/CGIHTTPServer.py Lib/Queue.py Lib/SimpleHTTPServer.py Lib/SocketServer.py Lib/StringIO.py Lib/_strptime.py Lib/bisect.py Lib/bsddb/dbobj.py Lib/bsddb/test/test_1413192.py Lib/bsddb/test/test_dbobj.py Lib/codecs.py Lib/compiler/pycodegen.py Lib/compiler/transformer.py Lib/ctypes Lib/ctypes/__init__.py L! ib/ctypes/test/test_callbacks.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_loading.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_structures.py Lib/ctypes/util.py Lib/decimal.py Lib/difflib.py Lib/distutils/__init__.py Lib/distutils/command/bdist_rpm.py Lib/distutils/command/build_ext.py Lib/distut Is being held until the list moderator can review it for approval. The reason it is being held: Message body is too big: 909930 bytes with a limit of 500 KB Either the message will get posted to the list, or you will receive notification of the moderator's decision. If you would like to cancel this posting, please visit the following URL: http://www.stackless.com/mailman/confirm/stackless-checkins/793022e0e2f4ffef76427874acc8923d75b2d392 _______________________________________________ Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins From stackless-checkins-owner at stackless.com Sat Apr 14 15:06:00 2007 From: stackless-checkins-owner at stackless.com (stackless-checkins-owner at stackless.com) Date: Sat, 14 Apr 2007 15:06:00 +0200 Subject: Stackless-checkins post from python-checkins@python.org requires approval Message-ID: As list administrator, your authorization is requested for the following mailing list posting: List: Stackless-checkins at stackless.com From: python-checkins at python.org Subject: r54826 - in stackless/branches/release25-maint: Demo/parser/unparse.py Doc/README Doc/api/abstract.tex Doc/api/concrete.tex Doc/api/exceptions.tex Doc/api/memory.tex Doc/api/newtypes.tex Doc/api/utilities.tex Doc/commontex/boilerplate.tex Doc/commontex/license.tex Doc/dist/dist.tex Doc/ext/newtypes.tex Doc/ext/shoddy.c Doc/inst/inst.tex Doc/lib/emailgenerator.tex Doc/lib/libasyncore.tex Doc/lib/libbase64.tex Doc/lib/libbsddb.tex Doc/lib/libbz2.tex Doc/lib/libcollections.tex Doc/lib/libcommands.tex Doc/lib/libcsv.tex Doc/lib/libctypes.tex Doc/lib/libdbhash.tex Doc/lib/libfnmatch.tex Doc/lib/libfuncs.tex Doc/lib/libfunctools.tex Doc/lib/libgetopt.tex Doc/lib/libgettext.tex Doc/lib/libheapq.tex Doc/lib/libimageop.tex Doc/lib/libitertools.tex Doc/lib/liblocale.tex Doc/lib/liblogging.tex Doc/lib/libmailbox.tex Doc/lib/libmmap.tex Doc/lib/libmsilib.tex Doc/lib/libos.tex Doc/lib/libpickle.tex Doc/lib/libpopen2.tex Doc/lib/libprofile.tex Doc/lib/librandom.tex Doc/lib/libshu! til.tex Doc/lib/libsimplexmlrpc.tex Doc/lib/libsmtplib.tex Doc/lib/libsocket.tex Doc/lib/libsqlite3.tex Doc/lib/libstdtypes.tex Doc/lib/libstring.tex Doc/lib/libstruct.tex Doc/lib/libsubprocess.tex Doc/lib/libtarfile.tex Doc/lib/libtempfile.tex Doc/lib/libthreading.tex Doc/lib/libtimeit.tex Doc/lib/libunittest.tex Doc/lib/liburlparse.tex Doc/lib/libwsgiref.tex Doc/lib/tkinter.tex Doc/mac/toolbox.tex Doc/ref/ref1.tex Doc/ref/ref3.tex Doc/ref/ref5.tex Doc/ref/ref6.tex Doc/ref/ref7.tex Doc/tools/py2texi.el Doc/tut/tut.tex Doc/whatsnew/whatsnew25.tex Include/Python-ast.h Include/abstract.h Include/dictobject.h Include/patchlevel.h Include/pystate.h Include/setobject.h LICENSE Lib/CGIHTTPServer.py Lib/Queue.py Lib/SimpleHTTPServer.py Lib/SocketServer.py Lib/StringIO.py Lib/_strptime.py Lib/bisect.py Lib/bsddb/dbobj.py Lib/bsddb/test/test_1413192.py Lib/bsddb/test/test_dbobj.py Lib/codecs.py Lib/compiler/pycodegen.py Lib/compiler/transformer.py Lib/ctypes Lib/ctypes/__init__.py L! ib/ctypes/test/test_callbacks.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_loading.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_structures.py Lib/ctypes/util.py Lib/decimal.py Lib/difflib.py Lib/distutils/__init__.py Lib/distutils/command/bdist_rpm.py Lib/distutils/command/build_ext.py Lib/distut Reason: Message body is too big: 909930 bytes with a limit of 500 KB At your convenience, visit: http://www.stackless.com/mailman/admindb/stackless-checkins to approve or deny the request. -------------- next part -------------- An embedded message was scrubbed... From: "richard.tew" Subject: r54826 - in stackless/branches/release25-maint: Demo/parser/unparse.py Doc/README Doc/api/abstract.tex Doc/api/concrete.tex Doc/api/exceptions.tex Doc/api/memory.tex Doc/api/newtypes.tex Doc/api/utilities.tex Doc/commontex/boilerplate.tex Doc/commontex/license.tex Doc/dist/dist.tex Doc/ext/newtypes.tex Doc/ext/shoddy.c Doc/inst/inst.tex Doc/lib/emailgenerator.tex Doc/lib/libasyncore.tex Doc/lib/libbase64.tex Doc/lib/libbsddb.tex Doc/lib/libbz2.tex Doc/lib/libcollections.tex Doc/lib/libcommands.tex Doc/lib/libcsv.tex Doc/lib/libctypes.tex Doc/lib/libdbhash.tex Doc/lib/libfnmatch.tex Doc/lib/libfuncs.tex Doc/lib/libfunctools.tex Doc/lib/libgetopt.tex Doc/lib/libgettext.tex Doc/lib/libheapq.tex Doc/lib/libimageop.tex Doc/lib/libitertools.tex Doc/lib/liblocale.tex Doc/lib/liblogging.tex Doc/lib/libmailbox.tex Doc/lib/libmmap.tex Doc/lib/libmsilib.tex Doc/lib/libos.tex Doc/lib/libpickle.tex Doc/lib/libpopen2.tex Doc/lib/libprofile.tex Doc/lib/librandom.tex Doc/lib/libshu! til.tex Doc/lib/libsimplexmlrpc.tex Doc/lib/libsmtplib.tex Doc/lib/libsocket.tex Doc/lib/libsqlite3.tex Doc/lib/libstdtypes.tex Doc/lib/libstring.tex Doc/lib/libstruct.tex Doc/lib/libsubprocess.tex Doc/lib/libtarfile.tex Doc/lib/libtempfile.tex Doc/lib/libthreading.tex Doc/lib/libtimeit.tex Doc/lib/libunittest.tex Doc/lib/liburlparse.tex Doc/lib/libwsgiref.tex Doc/lib/tkinter.tex Doc/mac/toolbox.tex Doc/ref/ref1.tex Doc/ref/ref3.tex Doc/ref/ref5.tex Doc/ref/ref6.tex Doc/ref/ref7.tex Doc/tools/py2texi.el Doc/tut/tut.tex Doc/whatsnew/whatsnew25.tex Include/Python-ast.h Include/abstract.h Include/dictobject.h Include/patchlevel.h Include/pystate.h Include/setobject.h LICENSE Lib/CGIHTTPServer.py Lib/Queue.py Lib/SimpleHTTPServer.py Lib/SocketServer.py Lib/StringIO.py Lib/_strptime.py Lib/bisect.py Lib/bsddb/dbobj.py Lib/bsddb/test/test_1413192.py Lib/bsddb/test/test_dbobj.py Lib/codecs.py Lib/compiler/pycodegen.py Lib/compiler/transformer.py Lib/ctypes Lib/ctypes/__init__.py L! ib/ctypes/test/test_callbacks.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_loading.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_structures.py Lib/ctypes/util.py Lib/decimal.py Lib/difflib.py Lib/distutils/__init__.py Lib/distutils/command/bdist_rpm.py Lib/distutils/command/build_ext.py Lib/distut Date: Sat, 14 Apr 2007 15:05:17 +0200 (CEST) Size: 913710 Url: http://www.stackless.com/pipermail/stackless-checkins/attachments/20070414/fd6630ce/attachment.eml -------------- next part -------------- An embedded message was scrubbed... From: stackless-checkins-request at stackless.com Subject: confirm 793022e0e2f4ffef76427874acc8923d75b2d392 Date: no date Size: 652 Url: http://www.stackless.com/pipermail/stackless-checkins/attachments/20070414/fd6630ce/attachment-0001.eml From python-checkins at python.org Tue Apr 24 15:45:12 2007 From: python-checkins at python.org (kristjan.jonsson) Date: Tue, 24 Apr 2007 15:45:12 +0200 (CEST) Subject: [Stackless-checkins] r54936 - stackless/branches/release25-maint/Objects/exceptions.c Message-ID: <20070424134512.018361E400D@bag.python.org> Author: kristjan.jonsson Date: Tue Apr 24 15:45:09 2007 New Revision: 54936 Modified: stackless/branches/release25-maint/Objects/exceptions.c Log: Fix TaskletException. An incorrect macro was used to define it and so, accessiong TaskletException().code could cause a crash. Modified: stackless/branches/release25-maint/Objects/exceptions.c ============================================================================== --- stackless/branches/release25-maint/Objects/exceptions.c (original) +++ stackless/branches/release25-maint/Objects/exceptions.c Tue Apr 24 15:45:09 2007 @@ -474,7 +474,7 @@ /* * TaskletExit extends SystemExit */ -SimpleExtendsException(PyExc_SystemExit, TaskletExit, +MiddlingExtendsException(PyExc_SystemExit, TaskletExit, SystemExit, "This exception is used to silently kill a tasklet"); #endif _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins