From cbcb1e8f84557b06af9fbead2411c6eaa87a39e0 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 28 Oct 2013 02:39:04 -0600 Subject: Fix unintended switch from a constant to a global in 56a3c0bc4634 --- Lib/heapq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/heapq.py b/Lib/heapq.py index 19037ab..4b2c0c4 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py @@ -380,7 +380,7 @@ def merge(*iterables): while _len(h) > 1: try: - while True: + while 1: v, itnum, next = s = h[0] yield v s[0] = next() # raises StopIteration when exhausted -- cgit v0.12 From c0e60476a4cf56146a6dfba4b10196391f2d3c60 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 4 Nov 2013 21:45:33 -0500 Subject: Issue #19397: test_pydoc now works with -S (help not added to builtins). Patch by Serhiy Storchaka and Vajrasky Kok. --- Lib/test/test_pydoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 9e62f28..7558196 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -421,7 +421,7 @@ class TestDescriptions(unittest.TestCase): def test_namedtuple_public_underscore(self): NT = namedtuple('NT', ['abc', 'def'], rename=True) with captured_stdout() as help_io: - help(NT) + pydoc.help(NT) helptext = help_io.getvalue() self.assertIn('_1', helptext) self.assertIn('_replace', helptext) -- cgit v0.12 From 11852734a576221ecd71738b08874f6fd44e85bb Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 5 Nov 2013 02:40:03 -0800 Subject: Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. Some third-party projects, such as matplotlib and PIL/Pillow, depended on being able to build with Tcl and Tk frameworks in /Library/Frameworks. They were unable to build with the built-in Tcl/Tk and/or execute correctly. --- Mac/BuildScript/README.txt | 28 +--------------------------- Mac/BuildScript/build-installer.py | 10 +++++----- Mac/BuildScript/resources/ReadMe.txt | 23 +++++++---------------- Mac/BuildScript/resources/Welcome.rtf | 18 +++++++++++------- Misc/NEWS | 8 ++++++++ 5 files changed, 32 insertions(+), 55 deletions(-) diff --git a/Mac/BuildScript/README.txt b/Mac/BuildScript/README.txt index 3612cd0..ecf62bb 100644 --- a/Mac/BuildScript/README.txt +++ b/Mac/BuildScript/README.txt @@ -57,39 +57,13 @@ for each release. * NCurses 5.9 (http://bugs.python.org/issue15037) * SQLite 3.7.13 - * Tcl 8.5.15 - uses system-supplied versions of third-party libraries * readline module links with Apple BSD editline (libedit) * builds Oracle Sleepycat DB 4.8 (Python 2.x only) - - requires ActiveState Tcl/Tk 8.5.14 (or later) to be installed for building - - * Beginning with Python 2.7.6, this installer now includes its own - builtin copy of Tcl and Tk 8.5.15 libraries and thus is no longer - dependent on the buggy releases of Aqua Cocoa Tk 8.5 shipped with - OS X 10.6 or on installing a newer third-party version of Tcl/Tk - in /Library/Frameworks, such as from ActiveState. If it is - necessary to fallback to using a third-party Tcl/Tk because of - a problem with the builtin Tcl/Tk, there is a backup version of - the _tkinter extension included which will dynamically link to - Tcl and Tk frameworks in /Library/Frameworks as in previous releases. - To enable (for all users of this Python 2.7):: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/2.7 - cd ./lib/python2.7 - cp -p ./lib-tkinter/library/_tkinter.so ./lib-dynload - exit - - To restore using Python's builtin versions of Tcl and Tk:: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/2.7 - cd ./lib/python2.7 - cp -p ./lib-tkinter/builtin/_tkinter.so ./lib-dynload - exit + - requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building - recommended build environment: diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 0859b3a..fd5d5c3 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -193,7 +193,7 @@ def library_recipes(): LT_10_5 = bool(DEPTARGET < '10.5') - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): result.extend([ dict( name="Tcl 8.5.15", @@ -571,7 +571,7 @@ def checkEnvironment(): # - the traditional version (renamed to _tkinter_library.so) linked # with /Library/Frameworks/{Tcl,Tk}.framework # - the default version linked with our builtin copies of Tcl and Tk - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): EXPECTED_SHARED_LIBS['_tkinter_library.so'] = \ EXPECTED_SHARED_LIBS['_tkinter.so'] EXPECTED_SHARED_LIBS['_tkinter.so'] = [ @@ -971,7 +971,7 @@ def buildPython(): # out-of-date and has critical bugs. Save the _tkinter.so that was # linked with /Library/Frameworks/{Tck,Tk}.framework and build # another _tkinter.so linked with our builtin Tcl and Tk libs. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): runCommand("find build -name '_tkinter.so' " " -execdir mv '{}' _tkinter_library.so \;") print("Running make to build builtin _tkinter") @@ -1012,7 +1012,7 @@ def buildPython(): # users to select which to import by manipulating sys.path # directly or with PYTHONPATH. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): TKINTERS = ['builtin', 'library'] tkinter_moves = [('_tkinter_' + tkn + '.so', os.path.join(path_to_lib, 'lib-tkinter', tkn)) @@ -1059,7 +1059,7 @@ def buildPython(): # The files are moved after the entire tree has been walked # since the shared library checking depends on the files # having unique names. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): for tkm in tkinter_moves: if fn == tkm[0]: moves_list.append( diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt index 2013320..212d963 100644 --- a/Mac/BuildScript/resources/ReadMe.txt +++ b/Mac/BuildScript/resources/ReadMe.txt @@ -17,27 +17,18 @@ instead of double-clicking, control-click or right click the "Python" installer package icon. Then select "Open using ... Installer" from the contextual menu that appears. - **** IMPORTANT changes if you use IDLE and Tkinter **** - -Installing a third-party version of Tcl/Tk is no longer required -================================================================ + **** IMPORTANT **** -As of Python 2.7.6, the 10.6+ 64-bit installer now -comes with its own private copy of Tcl and Tk 8.5 libraries. For -this version of Python, it is no longer necessary to install -a third-party version of Tcl/Tk 8.5, such as those from ActiveState, -to work around the problematic versions of Tcl/Tk 8.5 shipped by -Apple in OS X 10.6 and later. (This does not change the requirements -for older versions of Python installed from python.org.) By default, -this version of Python will always use its own private version, -regardless of whether a third-party Tcl/Tk is installed. -The 10.3+ 32-bit-only installer continues to use Tcl/Tk 8.4, -either a third-party or system-supplied version. +Update your version of Tcl/Tk to use IDLE or other Tk applications +================================================================== -Visit http://www.python.org/download/mac/tcltk/ +To use IDLE or other programs that use the Tkinter graphical user +interface toolkit, you may need to install a newer third-party version +of the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/ for current information about supported and recommended versions of Tcl/Tk for this version of Python and of Mac OS X. + Using this version of Python on OS X ==================================== diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf index e11f457..1fb7cd4 100644 --- a/Mac/BuildScript/resources/Welcome.rtf +++ b/Mac/BuildScript/resources/Welcome.rtf @@ -1,8 +1,8 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400 -\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\paperw11905\paperh16837\margl1440\margr1440\vieww9640\viewh10620\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640 +\paperw11904\paperh16836\margl1440\margr1440\vieww9640\viewh10620\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \f0\fs24 \cf0 This package will install \b Python $FULL_VERSION @@ -19,7 +19,11 @@ See the ReadMe file and the Python documentation for more information.\ \ -\b IMPORTANT for users of IDLE and tkinter: -\b0 As of Python 2.7.6, it is no longer necessary to install third-party versions of the +\b IMPORTANT: +\b0 +\b IDLE +\b0 and other programs using the +\b tkinter +\b0 graphical user interface toolkit require specific versions of the \b Tcl/Tk -\b0 platform independent windowing toolkit. Please read the ReadMe file and visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for more information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file +\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file diff --git a/Misc/NEWS b/Misc/NEWS index c353571..319b286 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -22,6 +22,14 @@ Tests - Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are loaded from .py[co] files. +Build +----- + +- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. + Some third-party projects, such as Matplotlib and PIL/Pillow, + depended on being able to build with Tcl and Tk frameworks in + /Library/Frameworks. + What's New in Python 2.7.6 release candidate 1? =============================================== -- cgit v0.12 From 52c48fdf30b0f6387d24d4ac5de1c25bc6988dc3 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 5 Nov 2013 02:40:03 -0800 Subject: Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. Some third-party projects, such as matplotlib and PIL/Pillow, depended on being able to build with Tcl and Tk frameworks in /Library/Frameworks. They were unable to build with the built-in Tcl/Tk and/or execute correctly. --- Mac/BuildScript/README.txt | 28 +--------------------------- Mac/BuildScript/build-installer.py | 10 +++++----- Mac/BuildScript/resources/ReadMe.txt | 23 +++++++---------------- Mac/BuildScript/resources/Welcome.rtf | 18 +++++++++++------- Misc/NEWS | 8 ++++++++ 5 files changed, 32 insertions(+), 55 deletions(-) diff --git a/Mac/BuildScript/README.txt b/Mac/BuildScript/README.txt index 3612cd0..ecf62bb 100644 --- a/Mac/BuildScript/README.txt +++ b/Mac/BuildScript/README.txt @@ -57,39 +57,13 @@ for each release. * NCurses 5.9 (http://bugs.python.org/issue15037) * SQLite 3.7.13 - * Tcl 8.5.15 - uses system-supplied versions of third-party libraries * readline module links with Apple BSD editline (libedit) * builds Oracle Sleepycat DB 4.8 (Python 2.x only) - - requires ActiveState Tcl/Tk 8.5.14 (or later) to be installed for building - - * Beginning with Python 2.7.6, this installer now includes its own - builtin copy of Tcl and Tk 8.5.15 libraries and thus is no longer - dependent on the buggy releases of Aqua Cocoa Tk 8.5 shipped with - OS X 10.6 or on installing a newer third-party version of Tcl/Tk - in /Library/Frameworks, such as from ActiveState. If it is - necessary to fallback to using a third-party Tcl/Tk because of - a problem with the builtin Tcl/Tk, there is a backup version of - the _tkinter extension included which will dynamically link to - Tcl and Tk frameworks in /Library/Frameworks as in previous releases. - To enable (for all users of this Python 2.7):: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/2.7 - cd ./lib/python2.7 - cp -p ./lib-tkinter/library/_tkinter.so ./lib-dynload - exit - - To restore using Python's builtin versions of Tcl and Tk:: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/2.7 - cd ./lib/python2.7 - cp -p ./lib-tkinter/builtin/_tkinter.so ./lib-dynload - exit + - requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building - recommended build environment: diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 0859b3a..fd5d5c3 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -193,7 +193,7 @@ def library_recipes(): LT_10_5 = bool(DEPTARGET < '10.5') - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): result.extend([ dict( name="Tcl 8.5.15", @@ -571,7 +571,7 @@ def checkEnvironment(): # - the traditional version (renamed to _tkinter_library.so) linked # with /Library/Frameworks/{Tcl,Tk}.framework # - the default version linked with our builtin copies of Tcl and Tk - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): EXPECTED_SHARED_LIBS['_tkinter_library.so'] = \ EXPECTED_SHARED_LIBS['_tkinter.so'] EXPECTED_SHARED_LIBS['_tkinter.so'] = [ @@ -971,7 +971,7 @@ def buildPython(): # out-of-date and has critical bugs. Save the _tkinter.so that was # linked with /Library/Frameworks/{Tck,Tk}.framework and build # another _tkinter.so linked with our builtin Tcl and Tk libs. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): runCommand("find build -name '_tkinter.so' " " -execdir mv '{}' _tkinter_library.so \;") print("Running make to build builtin _tkinter") @@ -1012,7 +1012,7 @@ def buildPython(): # users to select which to import by manipulating sys.path # directly or with PYTHONPATH. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): TKINTERS = ['builtin', 'library'] tkinter_moves = [('_tkinter_' + tkn + '.so', os.path.join(path_to_lib, 'lib-tkinter', tkn)) @@ -1059,7 +1059,7 @@ def buildPython(): # The files are moved after the entire tree has been walked # since the shared library checking depends on the files # having unique names. - if DEPTARGET > '10.5': + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): for tkm in tkinter_moves: if fn == tkm[0]: moves_list.append( diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt index 2013320..212d963 100644 --- a/Mac/BuildScript/resources/ReadMe.txt +++ b/Mac/BuildScript/resources/ReadMe.txt @@ -17,27 +17,18 @@ instead of double-clicking, control-click or right click the "Python" installer package icon. Then select "Open using ... Installer" from the contextual menu that appears. - **** IMPORTANT changes if you use IDLE and Tkinter **** - -Installing a third-party version of Tcl/Tk is no longer required -================================================================ + **** IMPORTANT **** -As of Python 2.7.6, the 10.6+ 64-bit installer now -comes with its own private copy of Tcl and Tk 8.5 libraries. For -this version of Python, it is no longer necessary to install -a third-party version of Tcl/Tk 8.5, such as those from ActiveState, -to work around the problematic versions of Tcl/Tk 8.5 shipped by -Apple in OS X 10.6 and later. (This does not change the requirements -for older versions of Python installed from python.org.) By default, -this version of Python will always use its own private version, -regardless of whether a third-party Tcl/Tk is installed. -The 10.3+ 32-bit-only installer continues to use Tcl/Tk 8.4, -either a third-party or system-supplied version. +Update your version of Tcl/Tk to use IDLE or other Tk applications +================================================================== -Visit http://www.python.org/download/mac/tcltk/ +To use IDLE or other programs that use the Tkinter graphical user +interface toolkit, you may need to install a newer third-party version +of the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/ for current information about supported and recommended versions of Tcl/Tk for this version of Python and of Mac OS X. + Using this version of Python on OS X ==================================== diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf index e11f457..1fb7cd4 100644 --- a/Mac/BuildScript/resources/Welcome.rtf +++ b/Mac/BuildScript/resources/Welcome.rtf @@ -1,8 +1,8 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400 -\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\paperw11905\paperh16837\margl1440\margr1440\vieww9640\viewh10620\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640 +\paperw11904\paperh16836\margl1440\margr1440\vieww9640\viewh10620\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \f0\fs24 \cf0 This package will install \b Python $FULL_VERSION @@ -19,7 +19,11 @@ See the ReadMe file and the Python documentation for more information.\ \ -\b IMPORTANT for users of IDLE and tkinter: -\b0 As of Python 2.7.6, it is no longer necessary to install third-party versions of the +\b IMPORTANT: +\b0 +\b IDLE +\b0 and other programs using the +\b tkinter +\b0 graphical user interface toolkit require specific versions of the \b Tcl/Tk -\b0 platform independent windowing toolkit. Please read the ReadMe file and visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for more information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file +\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file diff --git a/Misc/NEWS b/Misc/NEWS index 07d1ea4..3d00af1 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -59,6 +59,14 @@ Tests - Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are loaded from .py[co] files. +Build +----- + +- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. + Some third-party projects, such as Matplotlib and PIL/Pillow, + depended on being able to build with Tcl and Tk frameworks in + /Library/Frameworks. + What's New in Python 2.7.6 release candidate 1? =============================================== -- cgit v0.12