cpython: a8a342b3fbc7 (original) (raw)

Mercurial > cpython

changeset 105425:a8a342b3fbc7 2.7

Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied system Python site-packages directory, to sys.path for macOS framework builds. The coupling between the two Python instances often caused confusion and, as of macOS 10.12, changes to the site-packages layout can cause pip component installations to fail. This change reverts the effects introduced in 2.7.0 by Issue #4865. If you are using a package with both the Apple system Python 2.7 and a user-installed Python 2.7, you will need to ensure that copies of the package are installed with both Python instances. [#28440]

Ned Deily nad@python.org
date Sat, 03 Dec 2016 02:14:09 -0500
parents cb4a892e9b66
children 2b190bfd9ab4
files Doc/whatsnew/2.7.rst Lib/site.py Lib/test/test_site.py Mac/BuildScript/resources/ReadMe.rtf Misc/NEWS
diffstat 5 files changed, 59 insertions(+), 35 deletions(-)[+] [-] Doc/whatsnew/2.7.rst 12 Lib/site.py 9 Lib/test/test_site.py 13 Mac/BuildScript/resources/ReadMe.rtf 47 Misc/NEWS 13

line wrap: on

line diff

--- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -2343,6 +2343,18 @@ Port-Specific Changes: Mac OS X installation and a user-installed copy of the same version. (Changed by Ronald Oussoren; :issue:4865.)

+ Port-Specific Changes: FreeBSD -----------------------------------

--- a/Lib/site.py +++ b/Lib/site.py @@ -295,15 +295,6 @@ def getsitepackages(): else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, "lib", "site-packages"))

--- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -233,19 +233,8 @@ class HelperFunctionsTests(unittest.Test self.assertEqual(len(dirs), 1) wanted = os.path.join('xoxo', 'Lib', 'site-packages') self.assertEqual(dirs[0], wanted)

--- a/Mac/BuildScript/resources/ReadMe.rtf +++ b/Mac/BuildScript/resources/ReadMe.rtf @@ -1,12 +1,13 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1347\cocoasubrtf570 +{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf750 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;} {\colortbl;\red255\green255\blue255;} +{*\expandedcolortbl;;} \margl1440\margr1440\vieww15240\viewh15540\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\fs24 \cf0 This package will install Python FULLVERSIONforMacOSXFULL_VERSION for Mac OS X FULLVERSIONforMacOSXMACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.[](#l4.13) [](#l4.14) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul \ulc0 Which installer variant should I use? \b0 \ulnone [](#l4.19) @@ -36,8 +37,26 @@ To use IDLE or other programs that use t \i0 for this version of Python and of Mac OS X.[](#l4.21) \b \ul [](#l4.23) -Installing on OS X 10.8 (Mountain Lion) or later systems[](#l4.24) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 +\cf0 Packages installed with the system Python 2.7 are no longer searched for[](#l4.27) +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 +\cf0 \ulnone [CHANGED for Python 2.7.13] +\b0 [](#l4.30) +[](#l4.31) +As of Python 2.7.0, user-installed Python 2.7 versions from python.org installers added the system-wide site-packages directory for the Apple-supplied Python 2.7 to the end of their search path. This meant that packages installed with the system Python 2.7 could also be used by the user-installed Python 2.7. While sometimes convenient, this also often caused confusion with the implicit coupling between the two Python instances. Separately, as of macOS 10.12, Apple changed the layout of the system site-packages directory, +\f1 /Library/Python/2.7/site-packages +\f0 , in a way that can now cause installation of +\f1 pip +\f0 components to fail. To avoid the confusion and the installation failures, as of 2.7.13 user-installed Pythons no longer add +\f1 /Library/Python/2.7/site-packages +\f0 to +\f1 sys.path +\f0 . If you are using a package with both a user-installed Python 2.7 and the system Python 2.7, you will now need to ensure that separate copies of the package are installed for each instance.[](#l4.40) +[](#l4.41) +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 + +\b \cf0 \ul Installing on OS X 10.8 (Mountain Lion) or later systems[](#l4.44) +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ulnone [CHANGED for Python 2.7.9] \b0 [](#l4.47) [](#l4.48) @@ -45,10 +64,10 @@ As of Python 2.7.9, installer packages f \i Install Python \i0 installer window. Refer to Apple'92s support pages for {\field{*\fldinst{HYPERLINK "http://support.apple.com/kb/ht5290"}}{\fldrslt more information on Gatekeeper}}.[](#l4.51) [](#l4.52) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul Simplified web-based installs[](#l4.56) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ulnone [NEW for Python 2.7.9] \b0 [](#l4.60) [](#l4.61) @@ -58,10 +77,10 @@ With the change to the newer flat format \f1 .dmg \f0 ) container. If you download the Python installer through a web browser, the OS X installer application may open automatically to allow you to perform the install. If your browser settings do not allow automatic open, double click on the downloaded installer file.[](#l4.64) [](#l4.65) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul New Installation Options and Defaults[](#l4.69) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ulnone [NEW for Python 2.7.9] \b0 [](#l4.73) [](#l4.74) @@ -77,10 +96,10 @@ The Python installer now includes an opt \i Release Notes \i0 link for this release at {\field{*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt https://www.python.org/downloads/}}.\[](#l4.77) [](#l4.78) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul Certificate verification and OpenSSL[](#l4.82) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ulnone [CHANGED for Python 2.7.9] \b0 [](#l4.86) [](#l4.87) @@ -132,17 +151,17 @@ For OS X 10.6+, Apple also provides The bundled \f1 pip \f0 included with 2.7.9 has its own default certificate store for verifying download connections.[](#l4.91) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul [](#l4.95) Binary installer support for OS X 10.4 and 10.3.9 discontinued[](#l4.96) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ulnone [CHANGED for Python 2.7.9] \b0 [](#l4.100) [](#l4.101) As previously announced, binary installers for Python 2.7.9 from python.org no longer support Mac OS X 10.3.9 (Panther) and 10.4.x (Tiger) systems. These systems were last updated by Apple in 2005 and 2007. As of 2.7.9, the 32-bit-only installer supports PPC and Intel Macs running OS X 10.5 (Leopard). 10.5 was the last OS X release for PPC machines (G4 and G5). The 64-/32-bit installer configuration remains unchanged and should normally be used on OS X 10.6 (Snow Leopard) and later systems. This aligns Python 2.7.x installer configurations with those currently provided with Python 3.x. If needed, it is still possible to build Python from source for 10.3.9 and 10.4.[](#l4.102) [](#l4.103) -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \b \cf0 \ul Python 3 and Python 2 Co-existence[](#l4.107)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -336,6 +336,19 @@ Windows