mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
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
This commit is contained in:
parent
fe62dad6b0
commit
42fbd0dcae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449196
6
MOVED
6
MOVED
@ -9538,3 +9538,9 @@ mail/movemail||2017-09-03|Has expired: Out of date
|
||||
german/phone||2017-09-03|Has expired: Out of date
|
||||
ports-mgmt/fbsdmon||2017-09-03|Has expired: no longer maintained, web site it sends data to has been taken over by cybersquatters
|
||||
security/py-pyme|security/py-gpgme|2017-09-03|Has expired: Merged with GPGme project. Please use security/py-gpgme instead
|
||||
lang/python33||2017-09-03|Has expired: No longer receives bug fixes, only security updates. Please update to Python 3.6
|
||||
databases/py33-gdbm||2017-09-03|Removed, please update to Python 3.6
|
||||
databases/py33-sqlite3||2017-09-03|Removed, please update to Python 3.6
|
||||
devel/py33-setuptools||2017-09-03|Removed, please update to Python 3.6
|
||||
x11-toolkits/py33-tkinter||2017-09-03|Removed, please update to Python 3.6
|
||||
devel/py3-enum34||2017-09-03|Removed, Python 3.3 only
|
||||
|
@ -840,8 +840,6 @@
|
||||
SUBDIR += py3-bsddb3
|
||||
SUBDIR += py3-mysqlclient
|
||||
SUBDIR += py3-psycopg2
|
||||
SUBDIR += py33-gdbm
|
||||
SUBDIR += py33-sqlite3
|
||||
SUBDIR += py34-gdbm
|
||||
SUBDIR += py34-sqlite3
|
||||
SUBDIR += py35-gdbm
|
||||
|
@ -1,7 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../py-gdbm
|
||||
|
||||
PYTHON_VERSION= python3.3
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -1,7 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../py-sqlite3
|
||||
|
||||
PYTHON_VERSION= python3.3
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -5047,7 +5047,6 @@
|
||||
SUBDIR += py3-dbus
|
||||
SUBDIR += py3-defusedxml
|
||||
SUBDIR += py3-docopt
|
||||
SUBDIR += py3-enum34
|
||||
SUBDIR += py3-flake8
|
||||
SUBDIR += py3-flake8-builtins
|
||||
SUBDIR += py3-flake8-docstrings
|
||||
@ -5107,7 +5106,6 @@
|
||||
SUBDIR += py3-wcwidth
|
||||
SUBDIR += py3-xdg
|
||||
SUBDIR += py3-yaml
|
||||
SUBDIR += py33-setuptools
|
||||
SUBDIR += py34-setuptools
|
||||
SUBDIR += py35-setuptools
|
||||
SUBDIR += py36-setuptools
|
||||
|
@ -1,8 +0,0 @@
|
||||
# Created by: Ben Woods <woodsb02@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../py-enum34
|
||||
|
||||
USES= python:3.3
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -1,10 +0,0 @@
|
||||
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../py27-setuptools
|
||||
|
||||
PORTSCOUT= ignore:1
|
||||
|
||||
USES= python:3.3
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -284,7 +284,6 @@
|
||||
SUBDIR += python2
|
||||
SUBDIR += python27
|
||||
SUBDIR += python3
|
||||
SUBDIR += python33
|
||||
SUBDIR += python34
|
||||
SUBDIR += python35
|
||||
SUBDIR += python36
|
||||
|
@ -1,145 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= python33
|
||||
PORTVERSION= ${PYTHON_PORTVERSION}
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
|
||||
DISTNAME= Python-${PORTVERSION}
|
||||
DIST_SUBDIR= python
|
||||
|
||||
MAINTAINER= python@FreeBSD.org
|
||||
COMMENT= Interpreted object-oriented programming language
|
||||
|
||||
LICENSE= PSFL
|
||||
|
||||
DEPRECATED= No longer receives bug fixes, only security updates. Please update to Python 3.6
|
||||
EXPIRATION_DATE= 2017-09-01
|
||||
|
||||
USES= cpe ncurses pathfix pkgconfig readline:port ssl tar:xz shebangfix
|
||||
PATHFIX_MAKEFILEIN= Makefile.pre.in
|
||||
USE_LDCONFIG= yes
|
||||
GNU_CONFIGURE= yes
|
||||
python_CMD= ${PREFIX}/bin/python${PYTHON_PORTVERSION:R}
|
||||
SHEBANG_FILES= Lib/lib2to3/tests/data/*.py Lib/encodings/*.py
|
||||
|
||||
CPE_VENDOR= python
|
||||
CPE_PRODUCT= ${CPE_VENDOR}
|
||||
|
||||
CONFIGURE_ARGS+= --enable-shared
|
||||
CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations
|
||||
|
||||
INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files
|
||||
MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library
|
||||
MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974
|
||||
|
||||
TEST_TARGET= buildbottest
|
||||
TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER}
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= PYTHON_SUFFIX=${PORTVERSION:R:S/.//g}
|
||||
|
||||
PLIST_SUB= ABI=${ABIFLAGS} \
|
||||
OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554
|
||||
|
||||
OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC
|
||||
OPTIONS_DEFAULT= LIBFFI PYMALLOC THREADS
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
LIBFFI_DESC= Use libffi from ports instead of bundled version
|
||||
NLS_DESC= Enable gettext support for the locale module
|
||||
PYMALLOC_DESC= Enable specialized mallocs
|
||||
TSC_DESC= Enable rocessor timestamp counter profiling
|
||||
|
||||
DEBUG_CONFIGURE_WITH= pydebug
|
||||
IPV6_CONFIGURE_ENABLE= ipv6
|
||||
|
||||
LIBFFI_CONFIGURE_ON= --with-system-ffi
|
||||
LIBFFI_LIB_DEPENDS= libffi.so:devel/libffi
|
||||
|
||||
# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat
|
||||
# to break in Python 2.7, or preprocessor complaints in Python >= 3.3
|
||||
# Upstream Issue: http://bugs.python.org/issue6299
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CPPFLAGS= -I${LOCALBASE}/include
|
||||
NLS_LIBS= -L${LOCALBASE}/lib -lintl
|
||||
NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
|
||||
|
||||
PYMALLOC_CONFIGURE_WITH= pymalloc
|
||||
|
||||
THREADS_CONFIGURE_WITH= threads
|
||||
THREADS_LDFLAGS= -lpthread
|
||||
|
||||
TSC_CONFIGURE_WITH= tsc
|
||||
|
||||
.include "${.CURDIR}/Makefile.version"
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MPYMALLOC}
|
||||
ABIFLAGS:= m${ABIFLAGS}
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDEBUG}
|
||||
ABIFLAGS:= d${ABIFLAGS}
|
||||
.endif
|
||||
|
||||
.if !empty(ABIFLAGS)
|
||||
PLIST_FILES+= bin/python3.3%%ABI%%
|
||||
PLIST_FILES+= bin/python3.3%%ABI%%-config
|
||||
PLIST_FILES+= libdata/pkgconfig/python-3.3%%ABI%%.pc
|
||||
.endif
|
||||
|
||||
# http://bugs.python.org/issue22521
|
||||
# http://bugs.python.org/issue23042
|
||||
.if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI}
|
||||
BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == sparc64
|
||||
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
|
||||
.endif
|
||||
|
||||
# See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650
|
||||
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS)
|
||||
PLIST_SUB+= NO_NIS="@comment "
|
||||
.else
|
||||
PLIST_SUB+= NO_NIS=""
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
# readline shared library is present on base before FreeBSD 11 - r268461
|
||||
# force setup.py ignore base and use readline from ports
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000
|
||||
${REINPLACE_CMD} -e \
|
||||
"s|lib_dirs,\ \'readline\'|[\'${LOCALBASE}/lib\',\ \'.\'],\ \'readline\'|" \
|
||||
${WRKSRC}/setup.py
|
||||
.endif
|
||||
${REINPLACE_CMD} -e 's|/usr/local/bin/python|${python_CMD}|' \
|
||||
${WRKSRC}/Lib/cgi.py
|
||||
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS)
|
||||
@${REINPLACE_CMD} -e 's/disabled_module_list =[^]]*/&, "nis"/' \
|
||||
${WRKSRC}/setup.py
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.if ! ${PORT_OPTIONS:MDEBUG}
|
||||
${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: http://bugs.python.org/issue17975
|
||||
.endif
|
||||
for i in ${STAGEDIR}${PREFIX}/lib/python3.3/lib-dynload/*.so; do \
|
||||
${STRIP_CMD} $$i; done # Strip shared extensions
|
||||
# This code block exists for the qemu-user enabled cross build environment.
|
||||
# When using this environment in poudriere, CC is not set to the default
|
||||
# of /usr/bin/cc and a cross-compile toolchain is used. We need to hand
|
||||
# edit this so that the run time configuration for python matches what the
|
||||
# FreeBSD base system provides. sbruno 02Aug2017
|
||||
.if ${CC} == /nxb-bin/usr/bin/cc
|
||||
@${REINPLACE_CMD} -e 's=/nxb-bin==' \
|
||||
${STAGEDIR}${PREFIX}/lib/python3.3/_sysconfigdata.py
|
||||
@${REINPLACE_CMD} -e 's=/nxb-bin==' \
|
||||
${STAGEDIR}${PREFIX}/lib/python3.3/config-3.3m/Makefile
|
||||
.endif
|
||||
${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \
|
||||
${STAGEDIR}${PREFIX}/lib/libpython3.3${ABIFLAGS}.so.1-gdb.py
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,4 +0,0 @@
|
||||
# Mk/Uses/python.mk includes this file, don't remove it!
|
||||
# $FreeBSD$
|
||||
|
||||
PYTHON_PORTVERSION= 3.3.6
|
@ -1,2 +0,0 @@
|
||||
SHA256 (python/Python-3.3.6.tar.xz) = 5226e4bf7a530c3ff2bcde0c94e0e09e59a8bcde0114fe0268bc925bdabb5d3f
|
||||
SIZE (python/Python-3.3.6.tar.xz) = 12116460
|
@ -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
|
@ -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
|
||||
|
@ -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]
|
@ -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)
|
@ -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):
|
@ -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 \
|
@ -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'):
|
@ -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); \
|
@ -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;
|
@ -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++;
|
@ -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)
|
@ -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
|
||||
|
@ -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()
|
@ -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
|
||||
|
||||
===========================================================================
|
@ -1,4 +0,0 @@
|
||||
Python is an interpreted object-oriented programming language, and is
|
||||
often compared to Tcl, Perl or Scheme.
|
||||
|
||||
WWW: https://www.python.org/
|
File diff suppressed because it is too large
Load Diff
@ -218,7 +218,6 @@
|
||||
SUBDIR += py-wxPython28-common
|
||||
SUBDIR += py-wxPython30
|
||||
SUBDIR += py-xlib
|
||||
SUBDIR += py33-tkinter
|
||||
SUBDIR += py34-tkinter
|
||||
SUBDIR += py35-tkinter
|
||||
SUBDIR += py36-tkinter
|
||||
|
@ -1,7 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../py-tkinter
|
||||
|
||||
PYTHON_VERSION= python3.3
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
Loading…
Reference in New Issue
Block a user