pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang python38: updated to 3.8.10



details:   https://anonhg.NetBSD.org/pkgsrc/rev/014ae97a18b1
branches:  trunk
changeset: 451920:014ae97a18b1
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue May 04 05:16:07 2021 +0000

description:
python38: updated to 3.8.10

Python 3.8.10 final

Security
bpo-43434: Creating a sqlite3.Connection object now also produces a sqlite3.connect auditing event. Previously this event was only produced by sqlite3.connect() calls. Patch by Erlend E. Aasland.
bpo-43472: Ensures interpreter-level audit hooks receive the cpython.PyInterpreterState_New event when called through the _xxsubinterpreters module.
bpo-43075: Fix Regular Expression Denial of Service (ReDoS) vulnerability in urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex has quadratic worst-case complexity and it allows 
cause a denial of service when identifying crafted invalid RFCs. This ReDoS issue is on the client side and needs remote attackers to control the HTTP server.

Core and Builtins
bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations.
bpo-42924: Fix bytearray repetition incorrectly copying data from the start of the buffer, even if the data is offset within the buffer (e.g. after reassigning a slice at the start of the bytearray 
to a shorter byte string).

Library
bpo-43993: Update bundled pip to 21.1.1.
bpo-43937: Fixed the turtle module working with non-default root window.
bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0
bpo-43920: OpenSSL 3.0.0: load_verify_locations() now returns a consistent error message when cadata contains no valid certificate.
bpo-43607: urllib can now convert Windows paths with \\?\ prefixes into URL paths.
bpo-43284: platform.win32_ver derives the windows version from sys.getwindowsversion().platform_version which in turn derives the version from kernel32.dll (which can be of a different version than 
Windows itself). Therefore change the platform.win32_ver to determine the version using the platform module’s _syscmd_ver private function to return an accurate version.
bpo-42248: [Enum] ensure exceptions raised in _missing__ are released
bpo-43799: OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1 to suppress deprecation warnings. Python requires OpenSSL 1.1.1 APIs.
bpo-43794: Add ssl.OP_IGNORE_UNEXPECTED_EOF constants (OpenSSL 3.0.0)
bpo-43789: OpenSSL 3.0.0: Don’t call the password callback function a second time when first call has signaled an error condition.
bpo-43788: The header files for ssl error codes are now OpenSSL version-specific. Exceptions will now show correct reason and library codes. The make_ssl_data.py script has been rewritten to use 
OpenSSL’s text file with error codes.
bpo-43655: tkinter dialog windows are now recognized as dialogs by window managers on macOS and X Window.
bpo-43534: turtle.textinput() and turtle.numinput() create now a transient window working on behalf of the canvas window.
bpo-43522: Fix problem with hostname_checks_common_name. OpenSSL does not copy hostflags from struct SSL_CTX to struct SSL.
bpo-42967: Allow bytes separator argument in urllib.parse.parse_qs and urllib.parse.parse_qsl when parsing str query strings. Previously, this raised a TypeError.
bpo-43176: Fixed processing of a dataclass that inherits from a frozen dataclass with no fields. It is now correctly detected as an error.
bpo-34463: Fixed discrepancy between traceback and the interpreter in formatting of SyntaxError with lineno not set (traceback was changed to match interpreter).
bpo-41735: Fix thread locks in zlib module may go wrong in rare case. Patch by Ma Lin.
bpo-26053: Fixed bug where the pdb interactive run command echoed the args from the shell command line, even if those have been overridden at the pdb prompt.
bpo-36470: Fix dataclasses with InitVars and replace(). Patch by Claudiu Popa.
bpo-28577: The hosts method on 32-bit prefix length IPv4Networks and 128-bit prefix IPv6Networks now returns a list containing the single Address instead of an empty list.
bpo-32745: Fix a regression in the handling of ctypes’ ctypes.c_wchar_p type: embedded null characters would cause a ValueError to be raised. Patch by Zackery Spytz.

Documentation
bpo-43959: The documentation on the PyContextVar C-API was clarified.
bpo-43938: Update dataclasses documentation to express that FrozenInstanceError is derived from AttributeError.
bpo-43739: Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

Tests
bpo-43842: Fix a race condition in the SMTP test of test_logging. Don’t close a file descriptor (socket) from a different thread while asyncore.loop() is polling the file descriptor. Patch by Victor 
Stinner.
bpo-43811: Tests multiple OpenSSL versions on GitHub Actions. Use ccache to speed up testing.
bpo-43791: OpenSSL 3.0.0: Disable testing of legacy protocols TLS 1.0 and 1.1. Tests are failing with TLSV1_ALERT_INTERNAL_ERROR.

Windows
bpo-35306: Avoid raising errors from pathlib.Path.exists() when passed an invalid filename.
bpo-38822: Fixed os.stat() failing on inaccessible directories with a trailing slash, rather than falling back to the parent directory’s metadata. This implicitly affected os.path.exists() and 
os.path.isdir().
bpo-26227: Fixed decoding of host names in socket.gethostbyaddr() and socket.gethostbyname_ex().
bpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. Earlier releases were mislabelled and actually included 1.1.1i again.
bpo-43492: Upgrade Windows installer to use SQLite 3.35.5.

macOS
bpo-44009: Provide “python3.x-intel64” executable to allow reliably forcing macOS universal2 framework builds to run under Rosetta 2 Intel-64 emulation on Apple Silicon Macs. This can be useful for 
testing or when universal2 wheels are not yet available.
bpo-41100: As of 3.8.10, Python now supports building and running on macOS 11 (Big Sur) and on Apple Silicon Macs (based on the ARM64 architecture). A new universal build variant, universal2, is also 
available to natively support both ARM64 and Intel 64 in one set of executables. This backport from Python 3.9 does not include support for “weaklinking”; to support a range of macOS versions, 
continue to target for and build on the oldest version in the range; for 3.8.x, the universal2 variant is only useful on macOS 11 or later.
bpo-43492: Update macOS installer to use SQLite 3.35.4.

IDLE
bpo-43655: IDLE dialog windows are now recognized as dialogs by window managers on macOS and X Window.

C API
bpo-43962: _PyInterpreterState_IDIncref() now calls _PyInterpreterState_IDInitref() and always increments id_refcount. Previously, calling _xxsubinterpreters.get_current() could create an id_refcount 
inconsistency when a _xxsubinterpreters.InterpreterID object was deallocated. Patch by Victor Stinner.

diffstat:

 lang/py38-html-docs/Makefile                                        |    4 +-
 lang/py38-html-docs/distinfo                                        |   10 +-
 lang/python38/PLIST                                                 |    7 +-
 lang/python38/dist.mk                                               |    4 +-
 lang/python38/distinfo                                              |   31 +-
 lang/python38/patches/patch-Lib___osx__support.py                   |   80 ----
 lang/python38/patches/patch-Lib_ctypes_macholib_dyld.py             |   35 -
 lang/python38/patches/patch-Lib_ctypes_test_test__macholib.py       |   36 -
 lang/python38/patches/patch-Lib_distutils_tests_test__build__ext.py |   16 -
 lang/python38/patches/patch-Lib_test_test__bytes.py                 |   15 -
 lang/python38/patches/patch-Lib_test_test__platform.py              |   16 -
 lang/python38/patches/patch-Lib_test_test__unicode.py               |   21 -
 lang/python38/patches/patch-Mac_BuildScript_build-installer.py      |   68 ---
 lang/python38/patches/patch-Mac_Tools_pythonw.c                     |   44 --
 lang/python38/patches/patch-Modules___ctypes_callbacks.c            |   76 ----
 lang/python38/patches/patch-Modules___ctypes_callproc.c             |  190 ----------
 lang/python38/patches/patch-Modules___ctypes_ctypes.h               |   22 -
 lang/python38/patches/patch-Modules___ctypes_malloc__closure.c      |   37 -
 lang/python38/patches/patch-Modules___decimal_libmpdec_mpdecimal.h  |   17 -
 lang/python38/patches/patch-Modules_getpath.c                       |   19 -
 lang/python38/patches/patch-configure                               |   94 +----
 lang/python38/patches/patch-pyconfig.h.in                           |   16 +-
 lang/python38/patches/patch-setup.py                                |  183 +--------
 23 files changed, 49 insertions(+), 992 deletions(-)

diffs (truncated from 1296 to 300 lines):

diff -r a531975c651d -r 014ae97a18b1 lang/py38-html-docs/Makefile
--- a/lang/py38-html-docs/Makefile      Tue May 04 02:38:19 2021 +0000
+++ b/lang/py38-html-docs/Makefile      Tue May 04 05:16:07 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.10 2021/04/03 06:22:06 adam Exp $
+# $NetBSD: Makefile,v 1.11 2021/05/04 05:16:07 adam Exp $
 
-VERS=          3.8.9
+VERS=          3.8.10
 DISTNAME=      python-${VERS}-docs-html
 PKGNAME=       py38-html-docs-${VERS}
 CATEGORIES=    lang python
diff -r a531975c651d -r 014ae97a18b1 lang/py38-html-docs/distinfo
--- a/lang/py38-html-docs/distinfo      Tue May 04 02:38:19 2021 +0000
+++ b/lang/py38-html-docs/distinfo      Tue May 04 05:16:07 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.10 2021/04/03 06:22:06 adam Exp $
+$NetBSD: distinfo,v 1.11 2021/05/04 05:16:07 adam Exp $
 
-SHA1 (python-3.8.9-docs-html.tar.bz2) = 0e8a0ebc11946120a5251d1bffbaade125f796a1
-RMD160 (python-3.8.9-docs-html.tar.bz2) = ee7a77c81275441a41c8a9c057f4ff3e89824be1
-SHA512 (python-3.8.9-docs-html.tar.bz2) = 384f2326d1ab3c08ade6a1e42edbf7a8cf9e15638297ef5413d1dad55299daf62a92e87c7e13e4c6f042be2432604a0500fe7bc5a0a8816f9024ca28d068a472
-Size (python-3.8.9-docs-html.tar.bz2) = 6593775 bytes
+SHA1 (python-3.8.10-docs-html.tar.bz2) = 1e1ffe6cabfe5f0ac6ea4bc6858580a8c86ff42d
+RMD160 (python-3.8.10-docs-html.tar.bz2) = 89af0bf8fcf4c5985616e5273eb0ee02789ffbbf
+SHA512 (python-3.8.10-docs-html.tar.bz2) = 74a94ecbcba83f3392f08e36b0697f4213ff9118c68363706d0151c29c50fa12a0e61fd821bb1c16166833872a996e6b53126ba5c9e1c3aa606a57ade5086eb6
+Size (python-3.8.10-docs-html.tar.bz2) = 6604538 bytes
diff -r a531975c651d -r 014ae97a18b1 lang/python38/PLIST
--- a/lang/python38/PLIST       Tue May 04 02:38:19 2021 +0000
+++ b/lang/python38/PLIST       Tue May 04 05:16:07 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2021/02/20 19:29:06 adam Exp $
+@comment $NetBSD: PLIST,v 1.10 2021/05/04 05:16:07 adam Exp $
 bin/2to3-${PY_VER_SUFFIX}
 bin/pydoc${PY_VER_SUFFIX}
 bin/python${PY_VER_SUFFIX}
@@ -1403,8 +1403,8 @@
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.py
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyc
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyo
-lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl
-lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-49.2.1-py3-none-any.whl
+lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-21.1.1-py3-none-any.whl
+lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-56.0.0-py3-none-any.whl
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.py
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyc
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyo
@@ -3066,6 +3066,7 @@
 lib/python${PY_VER_SUFFIX}/test/multibytecodec_support.pyc
 lib/python${PY_VER_SUFFIX}/test/multibytecodec_support.pyo
 lib/python${PY_VER_SUFFIX}/test/nokia.pem
+lib/python${PY_VER_SUFFIX}/test/nosan.pem
 lib/python${PY_VER_SUFFIX}/test/nullbytecert.pem
 lib/python${PY_VER_SUFFIX}/test/nullcert.pem
 lib/python${PY_VER_SUFFIX}/test/outstanding_bugs.py
diff -r a531975c651d -r 014ae97a18b1 lang/python38/dist.mk
--- a/lang/python38/dist.mk     Tue May 04 02:38:19 2021 +0000
+++ b/lang/python38/dist.mk     Tue May 04 05:16:07 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: dist.mk,v 1.10 2021/04/03 06:22:06 adam Exp $
+# $NetBSD: dist.mk,v 1.11 2021/05/04 05:16:07 adam Exp $
 
-PY_DISTVERSION=        3.8.9
+PY_DISTVERSION=        3.8.10
 DISTNAME=      Python-${PY_DISTVERSION}
 EXTRACT_SUFX=  .tar.xz
 DISTINFO_FILE= ${.CURDIR}/../../lang/python38/distinfo
diff -r a531975c651d -r 014ae97a18b1 lang/python38/distinfo
--- a/lang/python38/distinfo    Tue May 04 02:38:19 2021 +0000
+++ b/lang/python38/distinfo    Tue May 04 05:16:07 2021 +0000
@@ -1,31 +1,16 @@
-$NetBSD: distinfo,v 1.18 2021/04/03 06:22:06 adam Exp $
+$NetBSD: distinfo,v 1.19 2021/05/04 05:16:07 adam Exp $
 
-SHA1 (Python-3.8.9.tar.xz) = ea40651135adc4126a60a45093d100722610f4de
-RMD160 (Python-3.8.9.tar.xz) = fb13a5a53796ecc6acce509cf4fe49f3be61666e
-SHA512 (Python-3.8.9.tar.xz) = e7872a6767f9a8941e8fd76d384fc1a528bcee18514ad13fcb4d3d59f6075c6283e4c933a728b9ae68b9606da2f0a3ae0208e46fbefe3bd7899ced61da5dcf47
-Size (Python-3.8.9.tar.xz) = 18271948 bytes
-SHA1 (patch-Lib___osx__support.py) = 95c729132e5bdbda72789f02b37ed111d0d9d11e
-SHA1 (patch-Lib_ctypes_macholib_dyld.py) = 3acfa836e06bb1ca994357bc4b687af1ce1641e0
-SHA1 (patch-Lib_ctypes_test_test__macholib.py) = db352894c47cbb4bed4905b4a7dde272577c65d8
+SHA1 (Python-3.8.10.tar.xz) = f6579351d42a81c77b55aa4ca8b1280b4f5b37f9
+RMD160 (Python-3.8.10.tar.xz) = eaffc74bd79021ef7a6309f494ca387860e8af9c
+SHA512 (Python-3.8.10.tar.xz) = 0be69705483ff9692e12048a96180e586f9d84c8d53066629f7fb2389585eb75c0f3506bb8182936e322508f58b71f4d8c6dfebbab9049b31b49da11d3b98e80
+Size (Python-3.8.10.tar.xz) = 18433456 bytes
 SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3
 SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341
 SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
-SHA1 (patch-Lib_distutils_tests_test__build__ext.py) = 481dce36ddb258707470d18f84c300700326dc1e
 SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69
 SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2
 SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
-SHA1 (patch-Lib_test_test__bytes.py) = 6de71f3d00cc2079f1c2fcf1a56eca993a4dc43a
-SHA1 (patch-Lib_test_test__platform.py) = ce6825dba49024fcd200638614209b31ae24df0a
-SHA1 (patch-Lib_test_test__unicode.py) = 915a80e2c7b9e056e58fc8600b099e86634f28dd
-SHA1 (patch-Mac_BuildScript_build-installer.py) = 731aa225a7cf33a21431bbd34d50cb5f629ab0df
-SHA1 (patch-Mac_Tools_pythonw.c) = aa2e7bfc5c515d48916f817d04fe2bb9775ea3c3
 SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8
-SHA1 (patch-Modules___ctypes_callbacks.c) = 99d821b1db08e680bc8ed3faecbda07f31e389e0
-SHA1 (patch-Modules___ctypes_callproc.c) = ec013388ecf599d3faad20a3945e852bed94a5e7
-SHA1 (patch-Modules___ctypes_ctypes.h) = bfa5574db6be78f71584e6b0b92965804cb469ba
-SHA1 (patch-Modules___ctypes_malloc__closure.c) = eadb811e15c4b821790480d7c4a4908753773e0f
-SHA1 (patch-Modules___decimal_libmpdec_mpdecimal.h) = 3710f2e524a8786470d01e7b2fc812600f0ec169
-SHA1 (patch-Modules_getpath.c) = c6930e41e57e31e3f46b4b9e0d0f5fcc8a0e5163
 SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
 SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
 SHA1 (patch-Modules_posixmodule.c) = ea24a1aa19b596b5d4457a4eff761e516406145f
@@ -35,6 +20,6 @@
 SHA1 (patch-Python_bootstrap__hash.c) = 2e7d24ded1369624b2983b15784988517a9697a5
 SHA1 (patch-Python_pytime.c) = 41981f821e0b420abcb0334312148deb9a9fed5e
 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = 09999ef507c89a53df5106e08d436e7c439286fb
-SHA1 (patch-pyconfig.h.in) = 6e24f401286768641c7d69dd75cfe18f1d8df1e7
-SHA1 (patch-setup.py) = f5cd4ec25c8a5725a39970a097ddfb7068370db8
+SHA1 (patch-configure) = 5607f103279127b4465294af1f9601a3c1e3e89e
+SHA1 (patch-pyconfig.h.in) = dc98ffe351623df2e8453e9350c30d705f4e99bd
+SHA1 (patch-setup.py) = 0b05bdc61289ee75758dcf8e422b988ff2067cba
diff -r a531975c651d -r 014ae97a18b1 lang/python38/patches/patch-Lib___osx__support.py
--- a/lang/python38/patches/patch-Lib___osx__support.py Tue May 04 02:38:19 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-$NetBSD: patch-Lib___osx__support.py,v 1.1 2020/11/17 19:33:15 sjmulder Exp $
-
-Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
-https://github.com/python/cpython/pull/22855
-
---- Lib/_osx_support.py.orig   2020-09-23 12:36:32.000000000 +0000
-+++ Lib/_osx_support.py
-@@ -110,6 +110,25 @@ def _get_system_version():
- 
-     return _SYSTEM_VERSION
- 
-+_SYSTEM_VERSION_TUPLE = None
-+def _get_system_version_tuple():
-+    """
-+    Return the macOS system version as a tuple
-+
-+    The return value is safe to use to compare
-+    two version numbers.
-+    """
-+    global _SYSTEM_VERSION_TUPLE
-+    if _SYSTEM_VERSION_TUPLE is None:
-+        osx_version = _get_system_version()
-+        if osx_version:
-+            try:
-+                _SYSTEM_VERSION_TUPLE = tuple(int(i) for i in osx_version.split('.'))
-+            except ValueError:
-+                _SYSTEM_VERSION_TUPLE = ()
-+
-+    return _SYSTEM_VERSION_TUPLE
-+
- def _remove_original_values(_config_vars):
-     """Remove original unmodified values for testing"""
-     # This is needed for higher-level cross-platform tests of get_platform.
-@@ -132,14 +151,18 @@ def _supports_universal_builds():
-     # builds, in particular -isysroot and -arch arguments to the compiler. This
-     # is in support of allowing 10.4 universal builds to run on 10.3.x systems.
- 
--    osx_version = _get_system_version()
--    if osx_version:
--        try:
--            osx_version = tuple(int(i) for i in osx_version.split('.'))
--        except ValueError:
--            osx_version = ''
-+    osx_version = _get_system_version_tuple()
-     return bool(osx_version >= (10, 4)) if osx_version else False
- 
-+def _supports_arm64_builds():
-+    """Returns True if arm64 builds are supported on this system"""
-+    # There are two sets of systems supporting macOS/arm64 builds:
-+    # 1. macOS 11 and later, unconditionally
-+    # 2. macOS 10.15 with Xcode 12.2 or later
-+    # For now the second category is ignored.
-+    osx_version = _get_system_version_tuple()
-+    return osx_version >= (11, 0) if osx_version else False
-+
- 
- def _find_appropriate_compiler(_config_vars):
-     """Find appropriate C compiler for extension module builds"""
-@@ -331,6 +354,12 @@ def compiler_fixup(compiler_so, cc_args)
-             except ValueError:
-                 break
- 
-+    elif not _supports_arm64_builds():
-+        # Look for "-arch arm64" and drop that
-+        for idx in range(len(compiler_so)):
-+            if compiler_so[idx] == '-arch' and compiler_so[idx+1] == "arm64":
-+                del compiler_so[idx:idx+2]
-+
-     if 'ARCHFLAGS' in os.environ and not stripArch:
-         # User specified different -arch flags in the environ,
-         # see also distutils.sysconfig
-@@ -481,6 +510,8 @@ def get_platform_osx(_config_vars, osnam
- 
-             if len(archs) == 1:
-                 machine = archs[0]
-+            elif archs == ('arm64', 'x86_64'):
-+                machine = 'universal2'
-             elif archs == ('i386', 'ppc'):
-                 machine = 'fat'
-             elif archs == ('i386', 'x86_64'):
diff -r a531975c651d -r 014ae97a18b1 lang/python38/patches/patch-Lib_ctypes_macholib_dyld.py
--- a/lang/python38/patches/patch-Lib_ctypes_macholib_dyld.py   Tue May 04 02:38:19 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2020/11/17 19:33:15 sjmulder Exp $
-
-Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
-https://github.com/python/cpython/pull/22855
-
---- Lib/ctypes/macholib/dyld.py.orig   2020-09-23 12:36:32.000000000 +0000
-+++ Lib/ctypes/macholib/dyld.py
-@@ -6,6 +6,11 @@ import os
- from ctypes.macholib.framework import framework_info
- from ctypes.macholib.dylib import dylib_info
- from itertools import *
-+try:
-+    from _ctypes import _dyld_shared_cache_contains_path
-+except ImportError:
-+    def _dyld_shared_cache_contains_path(*args):
-+        raise NotImplementedError
- 
- __all__ = [
-     'dyld_find', 'framework_find',
-@@ -122,8 +127,15 @@ def dyld_find(name, executable_path=None
-                 dyld_executable_path_search(name, executable_path),
-                 dyld_default_search(name, env),
-             ), env):
-+
-         if os.path.isfile(path):
-             return path
-+        try:
-+            if _dyld_shared_cache_contains_path(path):
-+                return path
-+        except NotImplementedError:
-+            pass
-+
-     raise ValueError("dylib %s could not be found" % (name,))
- 
- def framework_find(fn, executable_path=None, env=None):
diff -r a531975c651d -r 014ae97a18b1 lang/python38/patches/patch-Lib_ctypes_test_test__macholib.py
--- a/lang/python38/patches/patch-Lib_ctypes_test_test__macholib.py     Tue May 04 02:38:19 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-$NetBSD: patch-Lib_ctypes_test_test__macholib.py,v 1.1 2020/11/17 19:33:15 sjmulder Exp $
-
-Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
-https://github.com/python/cpython/pull/22855
-
---- Lib/ctypes/test/test_macholib.py.orig      2020-09-23 12:36:32.000000000 +0000
-+++ Lib/ctypes/test/test_macholib.py
-@@ -45,19 +45,22 @@ def find_lib(name):
- class MachOTest(unittest.TestCase):
-     @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test')
-     def test_find(self):
--
--        self.assertEqual(find_lib('pthread'),
--                             '/usr/lib/libSystem.B.dylib')
-+        # On Mac OS 11, system dylibs are only present in the shared cache,
-+        # so symlinks like libpthread.dylib -> libSystem.B.dylib will not
-+        # be resolved by dyld_find
-+        self.assertIn(find_lib('pthread'),
-+                              ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib'))
- 
-         result = find_lib('z')
-         # Issue #21093: dyld default search path includes $HOME/lib and
-         # /usr/local/lib before /usr/lib, which caused test failures if
-         # a local copy of libz exists in one of them. Now ignore the head
-         # of the path.
--        self.assertRegex(result, r".*/lib/libz\..*.*\.dylib")
-+        self.assertRegex(result, r".*/lib/libz.*\.dylib")
- 
--        self.assertEqual(find_lib('IOKit'),
--                             '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit')
-+        self.assertIn(find_lib('IOKit'),
-+                              ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit',
-+                              '/System/Library/Frameworks/IOKit.framework/IOKit'))
- 
- if __name__ == "__main__":
-     unittest.main()
diff -r a531975c651d -r 014ae97a18b1 lang/python38/patches/patch-Lib_distutils_tests_test__build__ext.py
--- a/lang/python38/patches/patch-Lib_distutils_tests_test__build__ext.py       Tue May 04 02:38:19 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-Lib_distutils_tests_test__build__ext.py,v 1.1 2020/11/17 19:33:15 sjmulder Exp $
-
-Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
-https://github.com/python/cpython/pull/22855
-
---- Lib/distutils/tests/test_build_ext.py.orig 2020-09-23 12:36:32.000000000 +0000
-+++ Lib/distutils/tests/test_build_ext.py
-@@ -492,7 +492,7 @@ class BuildExtTestCase(TempdirManager,
-         # format the target value as defined in the Apple
-         # Availability Macros.  We can't use the macro names since
-         # at least one value we test with will not exist yet.
--        if target[1] < 10:
-+        if target[:2] < (10, 10):
-             # for 10.1 through 10.9.x -> "10n0"
-             target = '%02d%01d0' % target
-         else:


Home | Main Index | Thread Index | Old Index