diff options
author | 2016-07-21 19:45:14 -0400 | |
---|---|---|
committer | 2016-07-21 19:45:14 -0400 | |
commit | eb6970f477d40b64f0b30fa1b0e13cb73b5b7a7d (patch) | |
tree | ee43119f0cf1670eac3a19e9a98c7949ee6122c8 | |
parent | Version bump to 2.7.11, from Arfrever (diff) | |
download | python-gentoo-patches-2.7.12.tar.gz python-gentoo-patches-2.7.12.tar.bz2 python-gentoo-patches-2.7.12.zip |
-rw-r--r-- | patches/01_all_static_library_location.patch | 4 | ||||
-rw-r--r-- | patches/02_all_disable_modules_and_ssl.patch | 10 | ||||
-rw-r--r-- | patches/03_all_libdir.patch | 20 | ||||
-rw-r--r-- | patches/04_all_non-zero_exit_status_on_failure.patch | 4 | ||||
-rw-r--r-- | patches/05_all_loadable_sqlite_extensions.patch | 4 | ||||
-rw-r--r-- | patches/06_all_regenerate_platform-specific_modules.patch | 10 | ||||
-rw-r--r-- | patches/21_all_distutils_c++.patch | 6 | ||||
-rw-r--r-- | patches/22_all_turkish_locale.patch | 120 | ||||
-rw-r--r-- | patches/24_all_tests_environment.patch | 4 | ||||
-rw-r--r-- | patches/25_all_expat-2.2.patch | 19 |
10 files changed, 149 insertions, 52 deletions
diff --git a/patches/01_all_static_library_location.patch b/patches/01_all_static_library_location.patch index 60cd481..f394740 100644 --- a/patches/01_all_static_library_location.patch +++ b/patches/01_all_static_library_location.patch @@ -4,7 +4,7 @@ https://bugs.python.org/issue6103 --- Makefile.pre.in +++ Makefile.pre.in -@@ -954,6 +954,19 @@ +@@ -1014,6 +1014,19 @@ fi; \ else true; \ fi @@ -24,7 +24,7 @@ https://bugs.python.org/issue6103 # Install the versioned manual page altmaninstall: -@@ -1151,18 +1164,6 @@ +@@ -1211,18 +1224,6 @@ else true; \ fi; \ done diff --git a/patches/02_all_disable_modules_and_ssl.patch b/patches/02_all_disable_modules_and_ssl.patch index 1e76063..87b9bde 100644 --- a/patches/02_all_disable_modules_and_ssl.patch +++ b/patches/02_all_disable_modules_and_ssl.patch @@ -20,7 +20,7 @@ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -438,6 +449,7 @@ +@@ -454,6 +465,7 @@ os.unlink(tmpfile) def detect_modules(self): @@ -28,7 +28,7 @@ # Ensure that /usr/local is always used if not cross_compiling: add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -@@ -795,7 +807,7 @@ +@@ -815,7 +827,7 @@ ssl_incs = find_file('openssl/ssl.h', inc_dirs, search_for_ssl_incs_in ) @@ -37,7 +37,7 @@ krb5_h = find_file('krb5.h', inc_dirs, ['/usr/kerberos/include']) if krb5_h: -@@ -806,7 +818,8 @@ +@@ -826,7 +838,8 @@ ] ) if (ssl_incs is not None and @@ -47,7 +47,7 @@ exts.append( Extension('_ssl', ['_ssl.c'], include_dirs = ssl_incs, library_dirs = ssl_libs, -@@ -838,7 +851,7 @@ +@@ -858,7 +871,7 @@ pass min_openssl_ver = 0x00907000 @@ -56,7 +56,7 @@ have_usable_openssl = (have_any_openssl and openssl_ver >= min_openssl_ver) -@@ -854,21 +867,20 @@ +@@ -874,21 +887,20 @@ print ("warning: openssl 0x%08x is too old for _hashlib" % openssl_ver) missing.append('_hashlib') diff --git a/patches/03_all_libdir.patch b/patches/03_all_libdir.patch index dfafeb2..de82e44 100644 --- a/patches/03_all_libdir.patch +++ b/patches/03_all_libdir.patch @@ -71,7 +71,7 @@ 'data' : '{userbase}', --- Lib/test/test_site.py +++ Lib/test/test_site.py -@@ -242,10 +242,10 @@ +@@ -247,10 +247,10 @@ elif os.sep == '/': # OS X non-framwework builds, Linux, FreeBSD, etc self.assertEqual(len(dirs), 2) @@ -108,7 +108,7 @@ # --- Modules/getpath.c +++ Modules/getpath.c -@@ -129,7 +129,7 @@ +@@ -108,7 +108,7 @@ static char exec_prefix[MAXPATHLEN+1]; static char progpath[MAXPATHLEN+1]; static char *module_search_path = NULL; @@ -117,7 +117,7 @@ static void reduce(char *dir) -@@ -543,7 +543,7 @@ +@@ -522,7 +522,7 @@ } else strncpy(zip_path, PREFIX, MAXPATHLEN); @@ -126,7 +126,7 @@ bufsz = strlen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2]; -@@ -553,7 +553,7 @@ +@@ -532,7 +532,7 @@ fprintf(stderr, "Could not find platform dependent libraries <exec_prefix>\n"); strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); @@ -137,7 +137,7 @@ --- setup.py +++ setup.py -@@ -452,7 +452,7 @@ +@@ -468,7 +468,7 @@ global disable_ssl # Ensure that /usr/local is always used if not cross_compiling: @@ -146,7 +146,7 @@ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') if cross_compiling: self.add_gcc_paths() -@@ -519,8 +519,7 @@ +@@ -535,8 +535,7 @@ ): add_dir_to_list(inc_dirs, d) for d in ( @@ -156,7 +156,7 @@ ): add_dir_to_list(lib_dirs, d) exts = [] -@@ -774,11 +773,11 @@ +@@ -794,11 +793,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -170,7 +170,7 @@ extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -@@ -1044,8 +1043,7 @@ +@@ -1064,8 +1063,7 @@ # check lib directories parallel to the location of the header db_dirs_to_check = [ @@ -180,7 +180,7 @@ ] if host_platform != 'darwin': -@@ -1158,10 +1156,8 @@ +@@ -1178,10 +1176,8 @@ if sqlite_incdir: sqlite_dirs_to_check = [ @@ -193,7 +193,7 @@ ] sqlite_libfile = self.compiler.find_library_file( sqlite_dirs_to_check + lib_dirs, 'sqlite3') -@@ -1933,15 +1929,14 @@ +@@ -1953,15 +1949,14 @@ added_lib_dirs.append('/usr/openwin/lib') elif os.path.exists('/usr/X11R6/include'): include_dirs.append('/usr/X11R6/include') diff --git a/patches/04_all_non-zero_exit_status_on_failure.patch b/patches/04_all_non-zero_exit_status_on_failure.patch index 738701e..e823ce0 100644 --- a/patches/04_all_non-zero_exit_status_on_failure.patch +++ b/patches/04_all_non-zero_exit_status_on_failure.patch @@ -12,7 +12,7 @@ https://bugs.python.org/issue6731 def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if 1) 'dir' is not already in 'dirlist' -@@ -285,7 +287,10 @@ +@@ -301,7 +303,10 @@ " detect_modules() for the module's name.") print @@ -23,7 +23,7 @@ https://bugs.python.org/issue6731 failed = self.failed[:] print print "Failed to build these modules:" -@@ -2241,6 +2246,7 @@ +@@ -2261,6 +2266,7 @@ 'Tools/scripts/2to3', 'Lib/smtpd.py'] ) diff --git a/patches/05_all_loadable_sqlite_extensions.patch b/patches/05_all_loadable_sqlite_extensions.patch index 28756cb..0ca4c8c 100644 --- a/patches/05_all_loadable_sqlite_extensions.patch +++ b/patches/05_all_loadable_sqlite_extensions.patch @@ -3,7 +3,7 @@ https://bugs.python.org/issue10268 --- configure.ac +++ configure.ac -@@ -2377,6 +2377,15 @@ +@@ -2441,6 +2441,15 @@ TCLTK_LIBS="$with_tcltk_libs" fi @@ -21,7 +21,7 @@ https://bugs.python.org/issue10268 AC_ARG_WITH(dbmliborder, --- setup.py +++ setup.py -@@ -1186,8 +1186,10 @@ +@@ -1206,8 +1206,10 @@ else: sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) diff --git a/patches/06_all_regenerate_platform-specific_modules.patch b/patches/06_all_regenerate_platform-specific_modules.patch index 848c055..614b09c 100644 --- a/patches/06_all_regenerate_platform-specific_modules.patch +++ b/patches/06_all_regenerate_platform-specific_modules.patch @@ -37,7 +37,7 @@ https://bugs.python.org/issue12619 +python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h --- Makefile.pre.in +++ Makefile.pre.in -@@ -422,7 +422,7 @@ +@@ -430,7 +430,7 @@ # Default target all: build_all @@ -46,7 +46,7 @@ https://bugs.python.org/issue12619 # Compile a binary with profile guided optimization. profile-opt: -@@ -501,6 +501,32 @@ +@@ -548,6 +548,32 @@ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build @@ -79,7 +79,7 @@ https://bugs.python.org/issue12619 # Build static library # avoid long command lines, same as LIBRARY_OBJS $(LIBRARY): $(LIBRARY_OBJS) -@@ -1025,7 +1051,7 @@ +@@ -1085,7 +1111,7 @@ unittest unittest/test \ lib-old \ curses pydoc_data $(MACHDEPS) @@ -88,7 +88,7 @@ https://bugs.python.org/issue12619 @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ -@@ -1108,23 +1134,6 @@ +@@ -1168,23 +1194,6 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt @@ -112,7 +112,7 @@ https://bugs.python.org/issue12619 python-config: $(srcdir)/Misc/python-config.in # Substitution happens here, as the completely-expanded BINDIR # is not available in configure -@@ -1420,7 +1429,7 @@ +@@ -1481,7 +1490,7 @@ Python/thread.o: @THREADHEADERS@ # Declare targets that aren't real files diff --git a/patches/21_all_distutils_c++.patch b/patches/21_all_distutils_c++.patch index b30b2eb..873f745 100644 --- a/patches/21_all_distutils_c++.patch +++ b/patches/21_all_distutils_c++.patch @@ -205,7 +205,7 @@ https://bugs.python.org/issue1222585 } if sys.platform[:6] == "darwin": -@@ -112,12 +115,19 @@ +@@ -114,12 +117,19 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so @@ -227,7 +227,7 @@ https://bugs.python.org/issue1222585 except DistutilsExecError, msg: raise CompileError, msg -@@ -174,23 +184,16 @@ +@@ -176,23 +186,16 @@ ld_args.extend(extra_postargs) self.mkpath(os.path.dirname(output_filename)) try: @@ -262,7 +262,7 @@ https://bugs.python.org/issue1222585 linker = _osx_support.compiler_fixup(linker, ld_args) --- Makefile.pre.in +++ Makefile.pre.in -@@ -497,7 +497,7 @@ +@@ -544,7 +544,7 @@ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ esac; \ diff --git a/patches/22_all_turkish_locale.patch b/patches/22_all_turkish_locale.patch index 5d8bc6a..b41c4c9 100644 --- a/patches/22_all_turkish_locale.patch +++ b/patches/22_all_turkish_locale.patch @@ -1,24 +1,102 @@ ---- Lib/email/__init__.py -+++ Lib/email/__init__.py -@@ -109,15 +109,19 @@ - 'Text', - ] +--- Objects/stringobject.c ++++ Objects/stringobject.c +@@ -1975,10 +1975,14 @@ + \n\ + Return a copy of the string S converted to lowercase."); -+import string -+lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase) -+ -+ - for _name in _LOWERNAMES: -- importer = LazyImporter(_name.lower()) -+ importer = LazyImporter(_name.translate(lower_map)) - sys.modules['email.' + _name] = importer - setattr(sys.modules['email'], _name, importer) +-/* _tolower and _toupper are defined by SUSv2, but they're not ISO C */ +-#ifndef _tolower +-#define _tolower tolower +-#endif ++static int ++tolower_C_locale(int c) ++{ ++ if (c >= 'A' && c <= 'Z') ++ return c + 0x20; ++ else ++ return c; ++} + static PyObject * + string_lower(PyStringObject *self) +@@ -1998,7 +2002,7 @@ + for (i = 0; i < n; i++) { + int c = Py_CHARMASK(s[i]); + if (isupper(c)) +- s[i] = _tolower(c); ++ s[i] = tolower_C_locale(c); + } - import email.mime - for _name in _MIMENAMES: -- importer = LazyImporter('mime.' + _name.lower()) -+ importer = LazyImporter('mime.' + _name.translate(lower_map)) - sys.modules['email.MIME' + _name] = importer - setattr(sys.modules['email'], 'MIME' + _name, importer) - setattr(sys.modules['email.mime'], _name, importer) + return newobj; +@@ -2009,9 +2013,14 @@ + \n\ + Return a copy of the string S converted to uppercase."); + +-#ifndef _toupper +-#define _toupper toupper +-#endif ++static int ++toupper_C_locale(int c) ++{ ++ if (c >= 'a' && c <= 'z') ++ return c - 0x20; ++ else ++ return c; ++} + + static PyObject * + string_upper(PyStringObject *self) +@@ -2031,7 +2040,7 @@ + for (i = 0; i < n; i++) { + int c = Py_CHARMASK(s[i]); + if (islower(c)) +- s[i] = _toupper(c); ++ s[i] = toupper_C_locale(c); + } + + return newobj; +@@ -2059,11 +2068,11 @@ + int c = Py_CHARMASK(*s++); + if (islower(c)) { + if (!previous_is_cased) +- c = toupper(c); ++ c = toupper_C_locale(c); + previous_is_cased = 1; + } else if (isupper(c)) { + if (previous_is_cased) +- c = tolower(c); ++ c = tolower_C_locale(c); + previous_is_cased = 1; + } else + previous_is_cased = 0; +@@ -2092,7 +2101,7 @@ + if (0 < n) { + int c = Py_CHARMASK(*s++); + if (islower(c)) +- *s_new = toupper(c); ++ *s_new = toupper_C_locale(c); + else + *s_new = c; + s_new++; +@@ -2100,7 +2109,7 @@ + for (i = 1; i < n; i++) { + int c = Py_CHARMASK(*s++); + if (isupper(c)) +- *s_new = tolower(c); ++ *s_new = tolower_C_locale(c); + else + *s_new = c; + s_new++; +@@ -2171,10 +2180,10 @@ + for (i = 0; i < n; i++) { + int c = Py_CHARMASK(*s++); + if (islower(c)) { +- *s_new = toupper(c); ++ *s_new = toupper_C_locale(c); + } + else if (isupper(c)) { +- *s_new = tolower(c); ++ *s_new = tolower_C_locale(c); + } + else + *s_new = c; diff --git a/patches/24_all_tests_environment.patch b/patches/24_all_tests_environment.patch index d1a8fbc..53c50f8 100644 --- a/patches/24_all_tests_environment.patch +++ b/patches/24_all_tests_environment.patch @@ -29,7 +29,7 @@ https://bugs.python.org/issue1674555 # Some times __path__ and __file__ are not absolute (e.g. while running from @@ -464,9 +465,62 @@ test_support.use_resources = use_resources - save_modules = sys.modules.keys() + save_modules = set(sys.modules) + opt_args = test_support.args_from_interpreter_flags() + base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest'] @@ -180,7 +180,7 @@ https://bugs.python.org/issue1674555 --- Makefile.pre.in +++ Makefile.pre.in -@@ -837,7 +837,7 @@ +@@ -893,7 +893,7 @@ TESTOPTS= -l $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py diff --git a/patches/25_all_expat-2.2.patch b/patches/25_all_expat-2.2.patch new file mode 100644 index 0000000..1ff9cf4 --- /dev/null +++ b/patches/25_all_expat-2.2.patch @@ -0,0 +1,19 @@ +https://bugs.python.org/issue27369 +https://hg.python.org/cpython/rev/2d6e6600c210 + +--- Lib/test/test_pyexpat.py ++++ Lib/test/test_pyexpat.py +@@ -610,11 +610,9 @@ + def test2(self): + xml = "<?xml version\xc2\x85='1.0'?>\r\n" + parser = expat.ParserCreate() +- try: ++ err_pattern = r'XML declaration not well-formed: line 1, column \d+' ++ with self.assertRaisesRegexp(expat.ExpatError, err_pattern): + parser.Parse(xml, True) +- self.fail() +- except expat.ExpatError as e: +- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14') + + class ForeignDTDTests(unittest.TestCase): + """ |