[Python-modules-commits] r18569 - in packages/python-docutils/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Fri Sep 16 18:33:47 UTC 2011


    Date: Friday, September 16, 2011 @ 18:33:46
  Author: jwilk
Revision: 18569

Restore historical behavior of languages.get_language() taking only a single argument.

Added:
  packages/python-docutils/trunk/debian/patches/languages-get_language-2nd-arg-optional.diff
Modified:
  packages/python-docutils/trunk/debian/changelog
  packages/python-docutils/trunk/debian/patches/series

Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog	2011-09-16 18:04:31 UTC (rev 18568)
+++ packages/python-docutils/trunk/debian/changelog	2011-09-16 18:33:46 UTC (rev 18569)
@@ -3,8 +3,11 @@
   * Remove needless comments from debian/rules.
   * Export PYTHONWARNINGS=d in debian/rules to enable all warnings in Python
     code.
+  * Restore historical behavior of languages.get_language() taking only a
+    single argument (languages-get_language-2nd-arg-optional.diff). Thanks to
+    Sergio Talens-Oliag for the bug report.
 
- -- Jakub Wilk <jwilk at debian.org>  Thu, 15 Sep 2011 18:46:54 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Fri, 16 Sep 2011 20:32:28 +0200
 
 python-docutils (0.8.1-2) unstable; urgency=low
 

Added: packages/python-docutils/trunk/debian/patches/languages-get_language-2nd-arg-optional.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/languages-get_language-2nd-arg-optional.diff	                        (rev 0)
+++ packages/python-docutils/trunk/debian/patches/languages-get_language-2nd-arg-optional.diff	2011-09-16 18:33:46 UTC (rev 18569)
@@ -0,0 +1,34 @@
+Description: Restore historical behavior of languages.get_language() taking only a single argument.
+ In Docutils 0.8, a second argument was added to languages.get_language(). This
+ patch makes the function accept also only a single argument in order to
+ restore its historical behavior.
+Author: Jakub Wilk <jwilk at debian.org>
+Bug: http://sourceforge.net/tracker/?group_id=38414&atid=422030
+Bug-Debian: http://bugs.debian.org/641562
+Last-Update: 2011-09-16
+
+--- a/docutils/languages/__init__.py
++++ b/docutils/languages/__init__.py
+@@ -15,7 +15,7 @@
+ 
+ _languages = {}
+ 
+-def get_language(language_code, reporter):
++def get_language(language_code, reporter=None):
+     """Return module with language localizations.
+ 
+     `language_code` is a "BCP 47" language tag.
+@@ -31,9 +31,10 @@
+             continue
+         _languages[tag] = module
+         return module
+-    reporter.warning(
+-        'language "%s" not supported: ' % language_code +
+-        'Docutils-generated text will be in English.')
++    if reporter is not None:
++        reporter.warning(
++            'language "%s" not supported: ' % language_code +
++            'Docutils-generated text will be in English.')
+     module = __import__('en', globals(), locals())
+     _languages[tag] = module # warn only one time!
+     return module

Modified: packages/python-docutils/trunk/debian/patches/series
===================================================================
--- packages/python-docutils/trunk/debian/patches/series	2011-09-16 18:04:31 UTC (rev 18568)
+++ packages/python-docutils/trunk/debian/patches/series	2011-09-16 18:33:46 UTC (rev 18569)
@@ -4,4 +4,5 @@
 15_emacs_debian_paths.diff
 emacs-sensible-browser.diff
 readme-version.diff
+languages-get_language-2nd-arg-optional.diff
 move-data-to-usr-share.diff




More information about the Python-modules-commits mailing list