dev-lang/python: remove unused patches.

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/10869
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
Michael Mair-Keimberger
2019-01-19 10:25:27 +01:00
committed by Patrice Clement
parent 80396435b9
commit 256371d3c2
2 changed files with 0 additions and 113 deletions

View File

@@ -1,21 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -1346,17 +1346,7 @@ class PyBuildExt(build_ext):
else:
missing.append('resource')
- # Sun yellow pages. Some systems have the functions in libc.
- if (host_platform not in ['cygwin', 'atheos', 'qnx6'] and
- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
- libs = ['nsl']
- else:
- libs = []
- exts.append( Extension('nis', ['nismodule.c'],
- libraries = libs) )
- else:
- missing.append('nis')
+ missing.append('nis')
else:
missing.extend(['nis', 'resource', 'termios'])

View File

@@ -1,92 +0,0 @@
# From https://github.com/python/cpython/pull/6215
# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
# LibreSSL < 2.7.
# Documentation updates and fixes for failing tests will be provided in
# another patch set.
# Signed-off-by: Christian Heimes christian@python.org.
# (cherry picked from commit 4ca0739)
#Co-authored-by: Christian Heimes christian@python.org
--- a/Modules/_ssl.c 2017-09-16 17:38:35.000000000 +0000
+++ b/Modules/_ssl.c 2018-04-13 15:55:10.919424126 +0000
@@ -97,6 +102,12 @@
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
# define OPENSSL_VERSION_1_1 1
+# define PY_OPENSSL_1_1_API 1
+#endif
+
+/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
+# define PY_OPENSSL_1_1_API 1
#endif
/* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
@@ -118,24 +129,44 @@
#endif
/* ALPN added in OpenSSL 1.0.2 */
-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT)
-# define HAVE_ALPN
+#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
+# define HAVE_ALPN 1
+#else
+# define HAVE_ALPN 0
+#endif
+
+/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped
+ * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility
+ * reasons. The check for TLSEXT_TYPE_next_proto_neg works with
+ * OpenSSL 1.0.1+ and LibreSSL.
+ * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg.
+ */
+#ifdef OPENSSL_NO_NEXTPROTONEG
+# define HAVE_NPN 0
+#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
+# define HAVE_NPN 0
+#elif defined(TLSEXT_TYPE_next_proto_neg)
+# define HAVE_NPN 1
+#else
+# define HAVE_NPN 0
#endif
#ifndef INVALID_SOCKET /* MS defines this */
#define INVALID_SOCKET (-1)
#endif
-#ifdef OPENSSL_VERSION_1_1
-/* OpenSSL 1.1.0+ */
-#ifndef OPENSSL_NO_SSL2
-#define OPENSSL_NO_SSL2
-#endif
-#else /* OpenSSL < 1.1.0 */
-#if defined(WITH_THREAD)
+/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
+#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
#define HAVE_OPENSSL_CRYPTO_LOCK
#endif
+#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
+#define OPENSSL_NO_SSL2
+#endif
+
+#ifndef PY_OPENSSL_1_1_API
+/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
+
#define TLS_method SSLv23_method
static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
@@ -178,7 +209,7 @@
{
return store->param;
}
-#endif /* OpenSSL < 1.1.0 or LibreSSL */
+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
enum py_ssl_error {