summaryrefslogtreecommitdiff
path: root/lang/python33/files
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2017-09-03 10:33:56 +0000
committerRene Ladan <rene@FreeBSD.org>2017-09-03 10:33:56 +0000
commit42fbd0dcae80321b0a92fc4e5ecdadcf1cb16be3 (patch)
tree80e18c9119a221be6ae122615f16cc21b25d74a5 /lang/python33/files
parentsecurity/py-cryptography: remove support for expired Python 3.3 (diff)
Remove Python 3.3 and related ports, it expired today:
2017-09-01 lang/python33: No longer receives bug fixes, only security updates. Please update to Python 3.6 databases/py33-gdbm databases/py33-sqlite3 devel/py33-setuptools x11-toolkits/py33-tkinter devel/py3-enum34
Notes
Notes: svn path=/head/; revision=449196
Diffstat (limited to 'lang/python33/files')
-rw-r--r--lang/python33/files/patch-Include__pyport.h13
-rw-r--r--lang/python33/files/patch-Lib_distutils_command_install__lib.py34
-rw-r--r--lang/python33/files/patch-Lib_distutils_unixccompiler.py15
-rw-r--r--lang/python33/files/patch-Lib_http_client.py76
-rw-r--r--lang/python33/files/patch-Lib_test_test__httplib.py80
-rw-r--r--lang/python33/files/patch-Makefile.pre.in107
-rw-r--r--lang/python33/files/patch-Misc_python-config.in32
-rw-r--r--lang/python33/files/patch-Modules___ctypes__libffi__src__arm__ffi.c36
-rw-r--r--lang/python33/files/patch-Modules__fcntlmodule.c53
-rw-r--r--lang/python33/files/patch-Modules_zipimport.c17
-rw-r--r--lang/python33/files/patch-PR195511166
-rw-r--r--lang/python33/files/patch-issue2116674
-rw-r--r--lang/python33/files/patch-setup.py20
-rw-r--r--lang/python33/files/pkg-message.in10
14 files changed, 0 insertions, 733 deletions
diff --git a/lang/python33/files/patch-Include__pyport.h b/lang/python33/files/patch-Include__pyport.h
deleted file mode 100644
index 3b2389ae12ae..000000000000
--- a/lang/python33/files/patch-Include__pyport.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- Include/pyport.h.orig 2014-10-12 09:03:52.000000000 +0200
-+++ Include/pyport.h 2016-04-03 19:26:20.938539000 +0200
-@@ -686,7 +686,9 @@
-
- #ifdef __FreeBSD__
- #include <osreldate.h>
--#if __FreeBSD_version > 500039
-+#if (__FreeBSD_version >= 500040 && __FreeBSD_version < 602113) || \
-+ (__FreeBSD_version >= 700000 && __FreeBSD_version < 700054) || \
-+ (__FreeBSD_version >= 800000 && __FreeBSD_version < 800001)
- # define _PY_PORT_CTYPE_UTF8_ISSUE
- #endif
- #endif
diff --git a/lang/python33/files/patch-Lib_distutils_command_install__lib.py b/lang/python33/files/patch-Lib_distutils_command_install__lib.py
deleted file mode 100644
index 816395cbf2a7..000000000000
--- a/lang/python33/files/patch-Lib_distutils_command_install__lib.py
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
-From: Brendan Molloy <brendan@bbqsrc.net>
-Date: Mon, 4 Jan 2016 23:14:06 +1100
-Subject: [PATCH] Check bytecode file actually exists and tests
-
-Should solve issue 20397, where using the --record argument results
-in files that failed to generate bytecode files are added to the
-record file nonetheless.
-
---- Lib/distutils/command/install_lib.py.orig 2014-10-12 06:52:02 UTC
-+++ Lib/distutils/command/install_lib.py
-@@ -165,11 +165,18 @@ class install_lib(Command):
- if ext != PYTHON_SOURCE_EXTENSION:
- continue
- if self.compile:
-- bytecode_files.append(imp.cache_from_source(
-- py_file, debug_override=True))
-+ candidate = imp.cache_from_source(
-+ py_file, debug_override=True)
-+
-+ if os.path.isfile(candidate):
-+ bytecode_files.append(candidate)
-+
- if self.optimize > 0:
-- bytecode_files.append(imp.cache_from_source(
-- py_file, debug_override=False))
-+ candidate = imp.cache_from_source(
-+ py_file, debug_override=False)
-+
-+ if os.path.isfile(candidate):
-+ bytecode_files.append(candidate)
-
- return bytecode_files
-
diff --git a/lang/python33/files/patch-Lib_distutils_unixccompiler.py b/lang/python33/files/patch-Lib_distutils_unixccompiler.py
deleted file mode 100644
index ce566408bd79..000000000000
--- a/lang/python33/files/patch-Lib_distutils_unixccompiler.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Description: Some python extensions can't be compiled with clang 3.4
-# Issue ID: http://bugs.python.org/issue20767
-# Submitted by: antoine
-
---- Lib/distutils/unixccompiler.py.orig 2014-10-12 07:03:52 UTC
-+++ Lib/distutils/unixccompiler.py
-@@ -225,6 +225,8 @@ class UnixCCompiler(CCompiler):
- if sys.platform[:6] == "darwin":
- # MacOSX's linker doesn't understand the -R flag at all
- return "-L" + dir
-+ elif sys.platform[:7] == "freebsd":
-+ return "-Wl,-rpath=" + dir
- elif sys.platform[:5] == "hp-ux":
- if self._is_gcc(compiler):
- return ["-Wl,+s", "-L" + dir]
diff --git a/lang/python33/files/patch-Lib_http_client.py b/lang/python33/files/patch-Lib_http_client.py
deleted file mode 100644
index 1869780ea280..000000000000
--- a/lang/python33/files/patch-Lib_http_client.py
+++ /dev/null
@@ -1,76 +0,0 @@
-Based on and adapted for Python 3.3: https://hg.python.org/cpython/rev/bf3e1c9b80e9
-# HG changeset patch
-# User Serhiy Storchaka <storchaka@gmail.com>
-# Date 1426151616 -7200
-# Node ID bf3e1c9b80e995311ba932e42200f076e03034c0
-# Parent 2b4a04c3681b1210529eb8a224cc007a0b92a890
-Issue #22928: Disabled HTTP header injections in http.client.
-Original patch by Demian Brecht.
-
---- Lib/http/client.py.orig 2016-06-30 21:29:02 UTC
-+++ Lib/http/client.py
-@@ -70,6 +70,7 @@ import email.parser
- import email.message
- import io
- import os
-+import re
- import socket
- import collections
- from urllib.parse import urlsplit
-@@ -216,6 +217,35 @@ MAXAMOUNT = 1048576
- _MAXLINE = 65536
- _MAXHEADERS = 100
-
-+# Header name/value ABNF (http://tools.ietf.org/html/rfc7230#section-3.2)
-+#
-+# VCHAR = %x21-7E
-+# obs-text = %x80-FF
-+# header-field = field-name ":" OWS field-value OWS
-+# field-name = token
-+# field-value = *( field-content / obs-fold )
-+# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
-+# field-vchar = VCHAR / obs-text
-+#
-+# obs-fold = CRLF 1*( SP / HTAB )
-+# ; obsolete line folding
-+# ; see Section 3.2.4
-+
-+# token = 1*tchar
-+#
-+# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
-+# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
-+# / DIGIT / ALPHA
-+# ; any VCHAR, except delimiters
-+#
-+# VCHAR defined in http://tools.ietf.org/html/rfc5234#appendix-B.1
-+
-+# the patterns for both name and value are more leniant than RFC
-+# definitions to allow for backwards compatibility
-+_is_legal_header_name = re.compile(rb'^[^:\s][^:\r\n]*$').match
-+_is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search
-+
-+
-
- class HTTPMessage(email.message.Message):
- # XXX The only usage of this method is in
-@@ -1035,12 +1065,20 @@ class HTTPConnection:
-
- if hasattr(header, 'encode'):
- header = header.encode('ascii')
-+
-+ if not _is_legal_header_name(header):
-+ raise ValueError('Invalid header name %r' % (header,))
-+
- values = list(values)
- for i, one_value in enumerate(values):
- if hasattr(one_value, 'encode'):
- values[i] = one_value.encode('latin-1')
- elif isinstance(one_value, int):
- values[i] = str(one_value).encode('ascii')
-+
-+ if _is_illegal_header_value(values[i]):
-+ raise ValueError('Invalid header value %r' % (values[i],))
-+
- value = b'\r\n\t'.join(values)
- header = header + b': ' + value
- self._output(header)
diff --git a/lang/python33/files/patch-Lib_test_test__httplib.py b/lang/python33/files/patch-Lib_test_test__httplib.py
deleted file mode 100644
index bef045a5fafa..000000000000
--- a/lang/python33/files/patch-Lib_test_test__httplib.py
+++ /dev/null
@@ -1,80 +0,0 @@
-Based on and adapted for Python 3.3: https://hg.python.org/cpython/rev/bf3e1c9b80e9
-# HG changeset patch
-# User Serhiy Storchaka <storchaka@gmail.com>
-# Date 1426151616 -7200
-# Node ID bf3e1c9b80e995311ba932e42200f076e03034c0
-# Parent 2b4a04c3681b1210529eb8a224cc007a0b92a890
-Issue #22928: Disabled HTTP header injections in http.client.
-Original patch by Demian Brecht.
-
---- Lib/test/test_httplib.py.orig 2016-06-30 21:31:29 UTC
-+++ Lib/test/test_httplib.py
-@@ -134,6 +134,33 @@ class HeaderTests(TestCase):
- conn.putheader('Content-length', 42)
- self.assertIn(b'Content-length: 42', conn._buffer)
-
-+ conn.putheader('Foo', ' bar ')
-+ self.assertIn(b'Foo: bar ', conn._buffer)
-+ conn.putheader('Bar', '\tbaz\t')
-+ self.assertIn(b'Bar: \tbaz\t', conn._buffer)
-+ conn.putheader('Authorization', 'Bearer mytoken')
-+ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer)
-+ conn.putheader('IterHeader', 'IterA', 'IterB')
-+ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer)
-+ conn.putheader('LatinHeader', b'\xFF')
-+ self.assertIn(b'LatinHeader: \xFF', conn._buffer)
-+ conn.putheader('Utf8Header', b'\xc3\x80')
-+ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer)
-+ conn.putheader('C1-Control', b'next\x85line')
-+ self.assertIn(b'C1-Control: next\x85line', conn._buffer)
-+ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed')
-+ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer)
-+ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed')
-+ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer)
-+ conn.putheader('Key Space', 'value')
-+ self.assertIn(b'Key Space: value', conn._buffer)
-+ conn.putheader('KeySpace ', 'value')
-+ self.assertIn(b'KeySpace : value', conn._buffer)
-+ conn.putheader(b'Nonbreak\xa0Space', 'value')
-+ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer)
-+ conn.putheader(b'\xa0NonbreakSpace', 'value')
-+ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer)
-+
- def test_ipv6host_header(self):
- # Default host header on IPv6 transaction should wrapped by [] if
- # its actual IPv6 address
-@@ -153,6 +180,34 @@ class HeaderTests(TestCase):
- conn.request('GET', '/foo')
- self.assertTrue(sock.data.startswith(expected))
-
-+ def test_invalid_headers(self):
-+ conn = client.HTTPConnection('example.com')
-+ conn.sock = FakeSocket('')
-+ conn.putrequest('GET', '/')
-+
-+ # http://tools.ietf.org/html/rfc7230#section-3.2.4, whitespace is no
-+ # longer allowed in header names
-+ cases = (
-+ (b'Invalid\r\nName', b'ValidValue'),
-+ (b'Invalid\rName', b'ValidValue'),
-+ (b'Invalid\nName', b'ValidValue'),
-+ (b'\r\nInvalidName', b'ValidValue'),
-+ (b'\rInvalidName', b'ValidValue'),
-+ (b'\nInvalidName', b'ValidValue'),
-+ (b' InvalidName', b'ValidValue'),
-+ (b'\tInvalidName', b'ValidValue'),
-+ (b'Invalid:Name', b'ValidValue'),
-+ (b':InvalidName', b'ValidValue'),
-+ (b'ValidName', b'Invalid\r\nValue'),
-+ (b'ValidName', b'Invalid\rValue'),
-+ (b'ValidName', b'Invalid\nValue'),
-+ (b'ValidName', b'InvalidValue\r\n'),
-+ (b'ValidName', b'InvalidValue\r'),
-+ (b'ValidName', b'InvalidValue\n'),
-+ )
-+ for name, value in cases:
-+ with self.assertRaisesRegex(ValueError, 'Invalid header'):
-+ conn.putheader(name, value)
-
- class BasicTest(TestCase):
- def test_status_lines(self):
diff --git a/lang/python33/files/patch-Makefile.pre.in b/lang/python33/files/patch-Makefile.pre.in
deleted file mode 100644
index 1c2bfa4c4ade..000000000000
--- a/lang/python33/files/patch-Makefile.pre.in
+++ /dev/null
@@ -1,107 +0,0 @@
-# Patch based on lang/python34/files/patch-Makefile.pre.in
-
-# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
-# Submitted by: koobs (r326729)
-# TODO: Upstream
-
-# Description: Create symlinks for non-ABI-suffixed python*-config and ABI-suffixed python-*.pc
-# Submitted by: antoine@ (r358029)
-# TODO: Upstream
-
---- Makefile.pre.in.orig 2014-03-09 09:40:23.000000000 +0100
-+++ Makefile.pre.in 2014-07-15 08:23:56.000000000 +0200
-@@ -70,18 +70,18 @@
- OPT= @OPT@
- BASECFLAGS= @BASECFLAGS@
- BASECPPFLAGS= @BASECPPFLAGS@
--CONFIGURE_CFLAGS= @CFLAGS@
--CONFIGURE_CPPFLAGS= @CPPFLAGS@
--CONFIGURE_LDFLAGS= @LDFLAGS@
-+CFLAGS= @CFLAGS@
-+CPPFLAGS= @CPPFLAGS@
-+LDFLAGS= @LDFLAGS@
- # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
- # command line to append to these values without stomping the pre-set
- # values.
--PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
-+PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CFLAGS) $(EXTRA_CFLAGS)
- # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
- # be able to build extension modules using the directories specified in the
- # environment variables
--PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
--PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
-+PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS)
-+PY_LDFLAGS= $(LDFLAGS)
- NO_AS_NEEDED= @NO_AS_NEEDED@
- LDLAST= @LDLAST@
- SGI_ABI= @SGI_ABI@
-@@ -310,21 +310,21 @@
-
- ##########################################################################
- # AST
--AST_H_DIR= Include
-+AST_H_DIR= $(srcdir)/Include
- AST_H= $(AST_H_DIR)/Python-ast.h
--AST_C_DIR= Python
-+AST_C_DIR= $(srcdir)/Python
- AST_C= $(AST_C_DIR)/Python-ast.c
- AST_ASDL= $(srcdir)/Parser/Python.asdl
-
- ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
- # XXX Note that a build now requires Python exist before the build starts
--ASDLGEN= @ASDLGEN@ $(srcdir)/Parser/asdl_c.py
-+ASDLGEN= @DISABLE_ASDLGEN@ $(srcdir)/Parser/asdl_c.py
-
- ##########################################################################
- # Python
-
- OPCODETARGETS_H= \
-- Python/opcode_targets.h
-+ $(srcdir)/Python/opcode_targets.h
-
- OPCODETARGETGEN= \
- $(srcdir)/Python/makeopcodetargets.py
-@@ -747,7 +747,7 @@
- Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
-
- $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
-- $(OPCODETARGETGEN) $(OPCODETARGETS_H)
-+# $(OPCODETARGETGEN) $(OPCODETARGETS_H)
-
- Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
-
-@@ -758,7 +758,7 @@
-
- Objects/typeobject.o: Objects/typeslots.inc
- Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
-- $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
-+# $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
-
- ############################################################################
- # Header files
-@@ -972,12 +972,6 @@
- else true; \
- fi
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE))
-- -if test "$(VERSION)" != "$(LDVERSION)"; then \
-- rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
-- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
-- rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
-- (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
-- fi
- -rm -f $(DESTDIR)$(BINDIR)/python3-config
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
- -rm -f $(DESTDIR)$(LIBPC)/python3.pc
-@@ -1223,6 +1217,12 @@
- $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
- $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
- $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
-+ -if test "$(VERSION)" != "$(LDVERSION)"; then \
-+ rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
-+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
-+ rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
-+ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
-+ fi
- rm python-config
- @if [ -s Modules/python.exp -a \
- "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
diff --git a/lang/python33/files/patch-Misc_python-config.in b/lang/python33/files/patch-Misc_python-config.in
deleted file mode 100644
index 75fe152e619b..000000000000
--- a/lang/python33/files/patch-Misc_python-config.in
+++ /dev/null
@@ -1,32 +0,0 @@
-# pythonx.y-config --ldflags out of /usr and missing -L<install_lib_dir>
-# https://bugs.python.org/issue7352
-
-# Fix library order returned by python-config. [#18096]
-# bugs.python.org/18096
-
---- Misc/python-config.in.orig 2015-10-18 09:00:25 UTC
-+++ Misc/python-config.in
-@@ -22,6 +22,7 @@ except getopt.error:
- if not opts:
- exit_with_usage()
-
-+libdir = sysconfig.get_config_var('exec_prefix') + '/lib'
- pyver = sysconfig.get_config_var('VERSION')
- getvar = sysconfig.get_config_var
-
-@@ -45,11 +46,13 @@ for opt in opt_flags:
- print(' '.join(flags))
-
- elif opt in ('--libs', '--ldflags'):
-- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
-- libs.append('-lpython' + pyver + sys.abiflags)
-+ libs = ['-lpython' + pyver + sys.abiflags]
-+ libs += getvar('LIBS').split()
-+ libs += getvar('SYSLIBS').split()
- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
- # shared library in prefix/lib/.
- if opt == '--ldflags':
-+ libs.insert(0, '-L' + libdir)
- if not getvar('Py_ENABLE_SHARED'):
- libs.insert(0, '-L' + getvar('LIBPL'))
- if not getvar('PYTHONFRAMEWORK'):
diff --git a/lang/python33/files/patch-Modules___ctypes__libffi__src__arm__ffi.c b/lang/python33/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
deleted file mode 100644
index 56e434277fe8..000000000000
--- a/lang/python33/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
+++ /dev/null
@@ -1,36 +0,0 @@
-# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
-# for anything !apple that is using the libcompiler_rt provided by clang on arm
-# PR: ports/149167 ports/184517
-# Patch by: cognet@ (to be upstreamed @ LLVM)
-
---- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-11-17 18:22:57.000000000 +1100
-+++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-03 19:23:24.521993369 +1100
-@@ -33,6 +33,11 @@
-
- #include <stdlib.h>
-
-+#if defined(__FreeBSD__) && defined(__arm__)
-+#include <sys/types.h>
-+#include <machine/sysarch.h>
-+#endif
-+
- /* Forward declares. */
- static int vfp_type_p (ffi_type *);
- static void layout_vfp_args (ffi_cif *);
-@@ -582,6 +587,16 @@
-
- #else
-
-+#if defined(__FreeBSD__) && defined(__arm__)
-+#define __clear_cache(start, end) do { \
-+ struct arm_sync_icache_args ua; \
-+ \
-+ ua.addr = (uintptr_t)(start); \
-+ ua.len = (char *)(end) - (char *)start; \
-+ sysarch(ARM_SYNC_ICACHE, &ua); \
-+ } while (0);
-+#endif
-+
- #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
- ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
- unsigned int __fun = (unsigned int)(FUN); \
diff --git a/lang/python33/files/patch-Modules__fcntlmodule.c b/lang/python33/files/patch-Modules__fcntlmodule.c
deleted file mode 100644
index 39fdb250730e..000000000000
--- a/lang/python33/files/patch-Modules__fcntlmodule.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- ./Modules/fcntlmodule.c.orig 2014-03-04 20:15:17.641117835 +1100
-+++ ./Modules/fcntlmodule.c 2014-03-04 20:19:36.141145958 +1100
-@@ -98,20 +98,15 @@
- {
- #define IOCTL_BUFSZ 1024
- int fd;
-- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
-+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
- format for the 'code' parameter because Python turns 0x8000000
- into either a large positive number (PyLong or PyInt on 64-bit
- platforms) or a negative number on others (32-bit PyInt)
- whereas the system expects it to be a 32bit bit field value
- regardless of it being passed as an int or unsigned long on
-- various platforms. See the termios.TIOCSWINSZ constant across
-- platforms for an example of this.
--
-- If any of the 64bit platforms ever decide to use more than 32bits
-- in their unsigned long ioctl codes this will break and need
-- special casing based on the platform being built on.
-+ various platforms.
- */
-- unsigned int code;
-+ unsigned long code;
- int arg;
- int ret;
- Py_buffer pstr;
-@@ -120,7 +115,7 @@
- int mutate_arg = 1;
- char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
-
-- if (PyArg_ParseTuple(args, "O&Iw*|i:ioctl",
-+ if (PyArg_ParseTuple(args, "O&kw*|i:ioctl",
- conv_descriptor, &fd, &code,
- &pstr, &mutate_arg)) {
- char *arg;
-@@ -175,7 +170,7 @@
- }
-
- PyErr_Clear();
-- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
-+ if (PyArg_ParseTuple(args, "O&ks*:ioctl",
- conv_descriptor, &fd, &code, &pstr)) {
- str = pstr.buf;
- len = pstr.len;
-@@ -202,7 +197,7 @@
- PyErr_Clear();
- arg = 0;
- if (!PyArg_ParseTuple(args,
-- "O&I|i;ioctl requires a file or file descriptor,"
-+ "O&k|i;ioctl requires a file or file descriptor,"
- " an integer and optionally an integer or buffer argument",
- conv_descriptor, &fd, &code, &arg)) {
- return NULL;
diff --git a/lang/python33/files/patch-Modules_zipimport.c b/lang/python33/files/patch-Modules_zipimport.c
deleted file mode 100644
index 66b635ebb4d4..000000000000
--- a/lang/python33/files/patch-Modules_zipimport.c
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Bug: http://bugs.python.org/issue26171
-
---- Modules/zipimport.c.orig 2014-10-12 07:03:53 UTC
-+++ Modules/zipimport.c
-@@ -1089,6 +1089,11 @@ get_data(PyObject *archive, PyObject *to
- PyMarshal_ReadShortFromFile(fp); /* local header size */
- file_offset += l; /* Start of file data */
-
-+ if (data_size > LONG_MAX - 1) {
-+ fclose(fp);
-+ PyErr_NoMemory();
-+ return NULL;
-+ }
- bytes_size = compress == 0 ? data_size : data_size + 1;
- if (bytes_size == 0)
- bytes_size++;
diff --git a/lang/python33/files/patch-PR195511 b/lang/python33/files/patch-PR195511
deleted file mode 100644
index a5bec787ecf3..000000000000
--- a/lang/python33/files/patch-PR195511
+++ /dev/null
@@ -1,166 +0,0 @@
---- Modules/_ssl.c.orig 2014-03-09 09:40:26.000000000 +0100
-+++ Modules/_ssl.c 2015-09-26 15:53:49.266985391 +0200
-@@ -1746,8 +1746,10 @@ context_new(PyTypeObject *type, PyObject
- PySSL_BEGIN_ALLOW_THREADS
- if (proto_version == PY_SSL_VERSION_TLS1)
- ctx = SSL_CTX_new(TLSv1_method());
-+#ifndef OPENSSL_NO_SSL3
- else if (proto_version == PY_SSL_VERSION_SSL3)
- ctx = SSL_CTX_new(SSLv3_method());
-+#endif
- #ifndef OPENSSL_NO_SSL2
- else if (proto_version == PY_SSL_VERSION_SSL2)
- ctx = SSL_CTX_new(SSLv2_method());
-@@ -2559,6 +2561,9 @@ Returns 1 if the OpenSSL PRNG has been s
- It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
- using the ssl() function.");
-
-+/* ### Fix build with LibreSSL (does not have RAND_egd)
-+ ### PR195511, http://bugs.python.org/issue21356 */
-+#ifndef OPENSSL_NO_EGD
- static PyObject *
- PySSL_RAND_egd(PyObject *self, PyObject *args)
- {
-@@ -2586,6 +2591,8 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
- Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
- Returns number of bytes read. Raises SSLError if connection to EGD\n\
- fails or if it does not provide enough data to seed PRNG.");
-+#endif /* OPENSSL_NO_EGD */
-+/* ### End PR195511 */
-
- #endif /* HAVE_OPENSSL_RAND */
-
-@@ -2604,8 +2611,13 @@ static PyMethodDef PySSL_methods[] = {
- PySSL_RAND_bytes_doc},
- {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS,
- PySSL_RAND_pseudo_bytes_doc},
-+/* ### Fix build with LibreSSL (does not have RAND_egd)
-+ ### PR195511, http://bugs.python.org/issue21356 */
-+#ifndef OPENSSL_NO_EGD
- {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
- PySSL_RAND_egd_doc},
-+#endif /* OPENSSL_NO_EGD */
-+/* ### End PR195511 */
- {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
- PySSL_RAND_status_doc},
- #endif
-@@ -2842,8 +2854,10 @@ PyInit__ssl(void)
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
- PY_SSL_VERSION_SSL2);
- #endif
-+#ifndef OPENSSL_NO_SSL3
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
- PY_SSL_VERSION_SSL3);
-+#endif
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
- PY_SSL_VERSION_SSL23);
- PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
---- Lib/ssl.py.orig 2014-03-09 09:40:13.000000000 +0100
-+++ Lib/ssl.py 2015-09-26 15:55:40.209981202 +0200
-@@ -78,7 +78,15 @@ try:
- from _ssl import OP_SINGLE_ECDH_USE
- except ImportError:
- pass
--from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
-+### Fix build with LibreSSL (does not have RAND_egd)
-+### PR195511, http://bugs.python.org/issue21356
-+from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
-+try:
-+ from _ssl import RAND_egd
-+except ImportError:
-+ # LibreSSL does not provide RAND_egd
-+ pass
-+### End PR195511
- from _ssl import (
- SSL_ERROR_ZERO_RETURN,
- SSL_ERROR_WANT_READ,
-@@ -91,14 +99,13 @@ from _ssl import (
- SSL_ERROR_INVALID_ERROR_CODE,
- )
- from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN
--from _ssl import (PROTOCOL_SSLv3, PROTOCOL_SSLv23,
-+from _ssl import (PROTOCOL_SSLv23,
- PROTOCOL_TLSv1)
- from _ssl import _OPENSSL_API_VERSION
-
- _PROTOCOL_NAMES = {
- PROTOCOL_TLSv1: "TLSv1",
- PROTOCOL_SSLv23: "SSLv23",
-- PROTOCOL_SSLv3: "SSLv3",
- }
- try:
- from _ssl import PROTOCOL_SSLv2
-@@ -107,6 +114,13 @@ except ImportError:
- _SSLv2_IF_EXISTS = None
- else:
- _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
-+try:
-+ from _ssl import PROTOCOL_SSLv3
-+ _SSLv3_IF_EXISTS = PROTOCOL_SSLv3
-+except ImportError:
-+ _SSLv3_IF_EXISTS = None
-+else:
-+ _PROTOCOL_NAMES[PROTOCOL_SSLv3] = "SSLv3"
-
- from socket import getnameinfo as _getnameinfo
- from socket import error as socket_error
-@@ -664,7 +678,7 @@ def PEM_cert_to_DER_cert(pem_cert_string
- d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
- return base64.decodebytes(d.encode('ASCII', 'strict'))
-
--def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
-+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
- """Retrieve the certificate from the server at the specified address,
- and return it as a PEM-encoded string.
- If 'ca_certs' is specified, validate the server cert against it.
---- Lib/test/test_ssl.py.orig 2014-03-09 09:40:19.000000000 +0100
-+++ Lib/test/test_ssl.py 2015-09-26 15:58:58.264964564 +0200
-@@ -21,11 +21,12 @@ import functools
- ssl = support.import_module("ssl")
-
- PROTOCOLS = [
-- ssl.PROTOCOL_SSLv3,
- ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
- ]
- if hasattr(ssl, 'PROTOCOL_SSLv2'):
- PROTOCOLS.append(ssl.PROTOCOL_SSLv2)
-+if hasattr(ssl, 'PROTOCOL_SSLv3'):
-+ PROTOCOLS.append(ssl.PROTOCOL_SSLv3)
-
- HOST = support.HOST
-
-@@ -96,7 +97,8 @@ class BasicSocketTests(unittest.TestCase
- def test_constants(self):
- #ssl.PROTOCOL_SSLv2
- ssl.PROTOCOL_SSLv23
-- ssl.PROTOCOL_SSLv3
-+ if hasattr(ssl, 'PROTOCOL_SSLv3'):
-+ ssl.PROTOCOL_SSLv3
- ssl.PROTOCOL_TLSv1
- ssl.CERT_NONE
- ssl.CERT_OPTIONAL
-@@ -130,8 +132,12 @@ class BasicSocketTests(unittest.TestCase
- self.assertRaises(ValueError, ssl.RAND_bytes, -5)
- self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
-
-- self.assertRaises(TypeError, ssl.RAND_egd, 1)
-- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
-+### Fix build with LibreSSL (does not have RAND_egd)
-+### PR195511, http://bugs.python.org/issue21356
-+ if hasattr(ssl, 'RAND_egd'):
-+ self.assertRaises(TypeError, ssl.RAND_egd, 1)
-+ self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
-+### End PR195511
- ssl.RAND_add("this is a random string", 75.0)
-
- @unittest.skipUnless(os.name == 'posix', 'requires posix')
-@@ -512,7 +518,8 @@ class ContextTests(unittest.TestCase):
- if hasattr(ssl, 'PROTOCOL_SSLv2'):
- ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv2)
- ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
-- ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
-+ if hasattr(ssl, 'PROTOCOL_SSLv3'):
-+ ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
- ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
- self.assertRaises(TypeError, ssl.SSLContext)
- self.assertRaises(ValueError, ssl.SSLContext, -1)
diff --git a/lang/python33/files/patch-issue21166 b/lang/python33/files/patch-issue21166
deleted file mode 100644
index 04bcd0406048..000000000000
--- a/lang/python33/files/patch-issue21166
+++ /dev/null
@@ -1,74 +0,0 @@
-# HG changeset patch
-# User Ned Deily <nad@acm.org>
-# Date 1408739569 25200
-# Node ID e52d85f2e2846453dd0503613d28cf6967f113d7
-# Parent d99014320220951707f79d114ae33f8c5a372a87
-Issue #21166: Prevent possible segfaults and other random failures of
-python --generate-posix-vars in pybuilddir.txt build target by ensuring
-that pybuilddir.txt is always regenerated when configure is run and
-that the newly built skeleton python does not inadvertently import
-modules from previously installed instances.
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -546,8 +546,18 @@ platform: $(BUILDPYTHON) pybuilddir.txt
- # Create build directory and generate the sysconfig build-time data there.
- # pybuilddir.txt contains the name of the build dir and is used for
- # sys.path fixup -- see Modules/getpath.c.
-+# Since this step runs before shared modules are built, try to avoid bootstrap
-+# problems by creating a dummy pybuildstr.txt just to allow interpreter
-+# initialization to succeed. It will be overwritten by generate-posix-vars
-+# or removed in case of failure.
- pybuilddir.txt: $(BUILDPYTHON)
-- $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
-+ @echo "none" > ./pybuilddir.txt
-+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
-+ if test $$? -ne 0 ; then \
-+ echo "generate-posix-vars failed" ; \
-+ rm -f ./pybuilddir.txt ; \
-+ exit 1 ; \
-+ fi
-
- # Build the shared modules
- # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
-diff --git a/Misc/NEWS b/Misc/NEWS
---- Misc/NEWS
-+++ Misc/NEWS
-@@ -242,6 +242,9 @@ Build
-
- - Issue #21811: Anticipated fixes to support OS X versions > 10.9.
-
-+- Issue #21166: Prevent possible segfaults and other random failures of
-+ python --generate-posix-vars in pybuilddir.txt build target.
-+
- IDLE
- ----
-
-diff --git a/configure b/configure
---- configure
-+++ configure
-@@ -2950,6 +2950,9 @@ case $host_os in *\ *) host_os=`echo "$h
-
-
-
-+# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
-+rm -f pybuilddir.txt
-+
- if test "$cross_compiling" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
- $as_echo_n "checking for python interpreter for cross build... " >&6; }
-diff --git a/configure.ac b/configure.ac
---- configure.ac
-+++ configure.ac
-@@ -53,6 +53,9 @@ AC_CANONICAL_HOST
- AC_SUBST(build)
- AC_SUBST(host)
-
-+# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
-+rm -f pybuilddir.txt
-+
- if test "$cross_compiling" = yes; then
- AC_MSG_CHECKING([for python interpreter for cross build])
- if test -z "$PYTHON_FOR_BUILD"; then
-
diff --git a/lang/python33/files/patch-setup.py b/lang/python33/files/patch-setup.py
deleted file mode 100644
index ff985a2efd08..000000000000
--- a/lang/python33/files/patch-setup.py
+++ /dev/null
@@ -1,20 +0,0 @@
---- setup.py.orig 2014-03-09 09:40:35.000000000 +0100
-+++ setup.py 2014-07-15 08:17:17.000000000 +0200
-@@ -31,7 +31,7 @@
- COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+disabled_module_list = ["_sqlite3", "_tkinter", "_gdbm"]
-
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -1463,7 +1463,7 @@
- macros = dict()
- libraries = []
-
-- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
-+ elif host_platform in ('freebsd7', 'freebsd8', 'freebsd9', 'freebsd10', 'freebsd11'):
- # FreeBSD's P1003.1b semaphore support is very experimental
- # and has many known problems. (as of June 2008)
- macros = dict()
diff --git a/lang/python33/files/pkg-message.in b/lang/python33/files/pkg-message.in
deleted file mode 100644
index c2325386f571..000000000000
--- a/lang/python33/files/pkg-message.in
+++ /dev/null
@@ -1,10 +0,0 @@
-===========================================================================
-
-Note that some standard Python modules are provided as separate ports
-as they require additional dependencies. They are available as:
-
-py%%PYTHON_SUFFIX%%-gdbm databases/py%%PYTHON_SUFFIX%%-gdbm
-py%%PYTHON_SUFFIX%%-sqlite3 databases/py%%PYTHON_SUFFIX%%-sqlite3
-py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py%%PYTHON_SUFFIX%%-tkinter
-
-===========================================================================