diff -u python2.6-2.6.4/debian/rules python2.6-2.6.4/debian/rules --- python2.6-2.6.4/debian/rules +++ python2.6-2.6.4/debian/rules @@ -974,6 +974,7 @@ issue1113244 \ bdist-wininst-notfound \ setup-modules-ssl \ + locales-without-encoding \ # setup-modules \ # profiled-build \ diff -u python2.6-2.6.4/debian/changelog python2.6-2.6.4/debian/changelog --- python2.6-2.6.4/debian/changelog +++ python2.6-2.6.4/debian/changelog @@ -1,3 +1,10 @@ +python2.6 (2.6.4-1ubuntu2) lucid; urgency=low + + * debian/patches/locales-without-encoding.dpatch: + - Allow locales with no specified encoding. (Closes LP: #223281) + + -- Jonathan Marsden Thu, 26 Nov 2009 01:19:32 -0800 + python2.6 (2.6.4-1ubuntu1) lucid; urgency=low * Build _hashlib as an extension again. diff -u python2.6-2.6.4/debian/patches/series python2.6-2.6.4/debian/patches/series --- python2.6-2.6.4/debian/patches/series +++ python2.6-2.6.4/debian/patches/series @@ -14,6 +14,7 @@ webbrowser linecache doc-nodownload +locales-without-encoding # FIXME #arm-float, for arm only only in patch2: unchanged: --- python2.6-2.6.4.orig/debian/patches/locales-without-encoding.dpatch +++ python2.6-2.6.4/debian/patches/locales-without-encoding.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +# Description: Allow locales with no specified encoding +# Origin: http://bugs.python.org/file14881/locale.py-parselocale-patch.diff +# Bug: http://bugs.python.org/issue6895 +# Bug-Ubuntu: https://launchpad.net/bugs/223281 + +# DP: * Lib/locale.py: +# DP: - Allow locales with no specified encoding. (Closes LP: #223281) + +@DPATCH@ +diff -urNad python2.6-2.6.4~/Lib/locale.py python2.6-2.6.4/Lib/locale.py +--- python2.6-2.6.4~/Lib/locale.py 2009-05-06 06:21:17.000000000 -0700 ++++ python2.6-2.6.4/Lib/locale.py 2009-11-26 01:11:22.000000000 -0800 +@@ -402,11 +402,13 @@ + # since some systems may use other encodings for these + # locales. Also, we ignore other modifiers. + return code, 'iso-8859-15' +- ++ if code == 'C': ++ return None, None + if '.' in code: + return tuple(code.split('.')[:2]) +- elif code == 'C': +- return None, None ++ else: ++ # locale name value does not have encoding information ++ return code, None + raise ValueError, 'unknown locale: %s' % localename + + def _build_localename(localetuple):