From abb4f4814e48a5293baec3d303d40a419b969866 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Mon, 24 Dec 2012 10:44:31 -0600 Subject: [PATCH 1/2] Fix #14470. Remove mentions of w9xpopen on old versions of Visual Studio. --- PC/VC6/pcbuild.dsw | 15 +- PC/VC6/w9xpopen.dsp | 97 ------- PC/VS7.1/pcbuild.sln | 4 - PC/VS7.1/python.iss | 1 - PC/VS7.1/python20.wse | 5 - PC/VS7.1/w9xpopen.vcproj | 121 -------- PC/VS8.0/pcbuild.sln | 5 - PC/VS8.0/w9xpopen.vcproj | 576 --------------------------------------- PC/VS9.0/pcbuild.sln | 5 - PC/VS9.0/w9xpopen.vcproj | 576 --------------------------------------- 10 files changed, 1 insertion(+), 1404 deletions(-) delete mode 100644 PC/VC6/w9xpopen.dsp delete mode 100644 PC/VS7.1/w9xpopen.vcproj delete mode 100644 PC/VS8.0/w9xpopen.vcproj delete mode 100644 PC/VS9.0/w9xpopen.vcproj diff --git a/PC/VC6/pcbuild.dsw b/PC/VC6/pcbuild.dsw index 87b2ebc5984..276c629fff1 100644 --- a/PC/VC6/pcbuild.dsw +++ b/PC/VC6/pcbuild.dsw @@ -114,7 +114,6 @@ Package=<4> Project_Dep_Name python End Project Dependency Begin Project Dependency - Project_Dep_Name w9xpopen End Project Dependency }}} @@ -262,19 +261,7 @@ Package=<4> End Project Dependency }}} -############################################################################### - -Project: "w9xpopen"=".\w9xpopen.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### +############################################################################## Project: "winsound"=".\winsound.dsp" - Package Owner=<4> diff --git a/PC/VC6/w9xpopen.dsp b/PC/VC6/w9xpopen.dsp deleted file mode 100644 index 6a6403c3ab6..00000000000 --- a/PC/VC6/w9xpopen.dsp +++ /dev/null @@ -1,97 +0,0 @@ -# Microsoft Developer Studio Project File - Name="w9xpopen" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=w9xpopen - 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 "w9xpopen.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 "w9xpopen.mak" CFG="w9xpopen - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "w9xpopen - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "w9xpopen - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "w9xpopen - 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\w9xpopen" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "Py_BUILD_CORE_MODULE" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "Py_BUILD_CORE_MODULE" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc09 /d "NDEBUG" -# ADD RSC /l 0xc09 /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 /machine:I386 -# ADD LINK32 user32.lib /nologo /machine:I386 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "w9xpopen - 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\w9xpopen" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "Py_BUILD_CORE_MODULE" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "Py_BUILD_CORE_MODULE" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc09 /d "_DEBUG" -# ADD RSC /l 0xc09 /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 /debug /machine:I386 /pdbtype:sept -# ADD LINK32 user32.lib /nologo /debug /machine:I386 /out:"./w9xpopen_d.exe" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "w9xpopen - Win32 Release" -# Name "w9xpopen - Win32 Debug" -# Begin Source File - -SOURCE=..\w9xpopen.c -# End Source File -# End Target -# End Project diff --git a/PC/VS7.1/pcbuild.sln b/PC/VS7.1/pcbuild.sln index 720f19c6b32..d871e07ac9f 100644 --- a/PC/VS7.1/pcbuild.sln +++ b/PC/VS7.1/pcbuild.sln @@ -61,10 +61,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata. {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} 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 {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} diff --git a/PC/VS7.1/python.iss b/PC/VS7.1/python.iss index ca6a3c0ff45..c0fd95b1053 100644 --- a/PC/VS7.1/python.iss +++ b/PC/VS7.1/python.iss @@ -111,7 +111,6 @@ Source: *.ico; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main Source: python.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main Source: pythonw.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main -Source: w9xpopen.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main Source: DLLs\tcl83.dll; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: tk diff --git a/PC/VS7.1/python20.wse b/PC/VS7.1/python20.wse index 2e7f6ad3fbc..9ea0b18cc38 100644 --- a/PC/VS7.1/python20.wse +++ b/PC/VS7.1/python20.wse @@ -1702,11 +1702,6 @@ item: Install File Destination=%MAINDIR%\pythonw.exe Flags=0000000000000010 end -item: Install File - Source=.\w9xpopen.exe - Destination=%MAINDIR%\w9xpopen.exe - Flags=0000000000000010 -end item: Remark end item: Remark diff --git a/PC/VS7.1/w9xpopen.vcproj b/PC/VS7.1/w9xpopen.vcproj deleted file mode 100644 index b9f3b4ea32a..00000000000 --- a/PC/VS7.1/w9xpopen.vcproj +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PC/VS8.0/pcbuild.sln b/PC/VS8.0/pcbuild.sln index 9aca4aaa8cc..2ad2176dcb3 100644 --- a/PC/VS8.0/pcbuild.sln +++ b/PC/VS8.0/pcbuild.sln @@ -20,11 +20,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" diff --git a/PC/VS8.0/w9xpopen.vcproj b/PC/VS8.0/w9xpopen.vcproj deleted file mode 100644 index e14d206d128..00000000000 --- a/PC/VS8.0/w9xpopen.vcproj +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PC/VS9.0/pcbuild.sln b/PC/VS9.0/pcbuild.sln index 9956e467a74..3b73fce490c 100644 --- a/PC/VS9.0/pcbuild.sln +++ b/PC/VS9.0/pcbuild.sln @@ -20,11 +20,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" diff --git a/PC/VS9.0/w9xpopen.vcproj b/PC/VS9.0/w9xpopen.vcproj deleted file mode 100644 index 7a85b00fbe1..00000000000 --- a/PC/VS9.0/w9xpopen.vcproj +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 6f0c94df50f30aac8d9a1a9f85adcda1e63d0ab7 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 24 Dec 2012 11:53:30 -0600 Subject: [PATCH 2/2] improve tracing performance when f_trace is NULL (closes #16672) Patch by Xavier de Gaye. --- Misc/NEWS | 2 ++ Python/ceval.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 6175be1a944..36d305dfb9b 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1? Core and Builtins ----------------- +- Issue #16672: Improve performance tracing performance + - Issue #14470: Remove w9xpopen support per PEP 11. - Issue #9856: Replace deprecation warning with raising TypeError diff --git a/Python/ceval.c b/Python/ceval.c index 32c203ecbcf..5f6f35cb54f 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1277,7 +1277,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) /* line-by-line tracing support */ if (_Py_TracingPossible && - tstate->c_tracefunc != NULL && !tstate->tracing) { + tstate->c_tracefunc != NULL && !tstate->tracing && + f->f_trace != NULL) { int err; /* see maybe_call_line_trace for expository comments */ @@ -3008,7 +3009,7 @@ error: /* Log traceback info. */ PyTraceBack_Here(f); - if (tstate->c_tracefunc != NULL) + if (tstate->c_tracefunc != NULL && f->f_trace != NULL) call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, f); fast_block_end: @@ -3127,7 +3128,7 @@ fast_yield: } if (tstate->use_tracing) { - if (tstate->c_tracefunc) { + if (tstate->c_tracefunc && f->f_trace != NULL) { if (why == WHY_RETURN || why == WHY_YIELD) { if (call_trace(tstate->c_tracefunc, tstate->c_traceobj, f,