diff --git a/00174-upstream-issue16754-so-extension.patch b/00174-upstream-issue16754-so-extension.patch new file mode 100644 index 0000000..4af618a --- /dev/null +++ b/00174-upstream-issue16754-so-extension.patch @@ -0,0 +1,11 @@ +--- Python-3.3.0/Lib/distutils/sysconfig.py 2012-09-29 10:00:28.000000000 +0200 ++++ Python-3.3.0/Lib/distutils/sysconfig.py 2012-12-22 20:14:49.661337174 +0100 +@@ -228,7 +228,7 @@ def customize_compiler(compiler): + linker_exe=cc, + archiver=archiver) + +- compiler.shared_lib_extension = so_ext ++ #compiler.shared_lib_extension = so_ext + + + def get_config_h_filename(): diff --git a/00175-platform-unicode.patch b/00175-platform-unicode.patch new file mode 100644 index 0000000..7d847e1 --- /dev/null +++ b/00175-platform-unicode.patch @@ -0,0 +1,13 @@ +Index: Python-3.3.0/Lib/platform.py +=================================================================== +--- Python-3.3.0.orig/Lib/platform.py ++++ Python-3.3.0/Lib/platform.py +@@ -331,7 +331,7 @@ def linux_distribution(distname='', vers + return _dist_try_harder(distname,version,id) + + # Read the first line +- with open('/etc/'+file, 'r') as f: ++ with open('/etc/'+file, 'r', encoding='utf-8', errors='surrogateescape') as f: + firstline = f.readline() + _distname, _version, _id = _parse_release_file(firstline) + diff --git a/python3-upstream-issue16754-so-extension.patch b/python3-upstream-issue16754-so-extension.patch deleted file mode 100644 index 4af618a..0000000 --- a/python3-upstream-issue16754-so-extension.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.3.0/Lib/distutils/sysconfig.py 2012-09-29 10:00:28.000000000 +0200 -+++ Python-3.3.0/Lib/distutils/sysconfig.py 2012-12-22 20:14:49.661337174 +0100 -@@ -228,7 +228,7 @@ def customize_compiler(compiler): - linker_exe=cc, - archiver=archiver) - -- compiler.shared_lib_extension = so_ext -+ #compiler.shared_lib_extension = so_ext - - - def get_config_h_filename(): diff --git a/python3.spec b/python3.spec index 4c74e0c..78e558d 100644 --- a/python3.spec +++ b/python3.spec @@ -545,7 +545,15 @@ Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch # Potential patch for so extensions being wrong since SOABI in upstream python3. # http://bugs.python.org/issue16754 # (rhbz#889784) -Patch174: python3-upstream-issue16754-so-extension.patch +# Does not affect python2 (python2 does not have compiled extensions with the +# problematic information) +Patch174: 00174-upstream-issue16754-so-extension.patch + +# Patch for potential unicode error when determining OS release names +# http://bugs.python.org/issue17429 +# (rhbz#922149) +# Does not affect python2 (python2 uses a byte string so it doesn't need to decode) +Patch175: 00175-platform-unicode.patch # (New patches go here ^^^) # @@ -794,6 +802,7 @@ done #00172: TODO %patch173 -p1 %patch174 -p1 +%patch175 -p1 # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # are many differences between 2.6 and the Python 3 library. @@ -1650,7 +1659,11 @@ rm -fr %{buildroot} # ====================================================== %changelog -* Thu Mar 14 2013 Toshio Kuratomi - .0-7 +* Fri Mar 15 2013 Toshio Kuratomi - 3.3.0-8 +- Fix error in platform.platform() when non-ascii byte strings are decoded to + unicode (rhbz#922149) + +* Thu Mar 14 2013 Toshio Kuratomi - 3.3.0-7 - Fix up shared library extension (rhbz#889784) * Thu Mar 07 2013 Karsten Hopp 3.3.0-6