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

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Jun 27 22:36:07 UTC 2011


    Date: Monday, June 27, 2011 @ 22:36:06
  Author: jwilk
Revision: 17644

Add two patches to fix incompatibilities with Python 3.2.
Don't ignore test suite errors anymore.

Added:
  packages/python-docutils/trunk/debian/patches/python3.2-configparser.diff
  packages/python-docutils/trunk/debian/patches/python3.2-elementtree.diff
Modified:
  packages/python-docutils/trunk/debian/changelog
  packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff
  packages/python-docutils/trunk/debian/patches/series
  packages/python-docutils/trunk/debian/rules

Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog	2011-06-27 22:07:35 UTC (rev 17643)
+++ packages/python-docutils/trunk/debian/changelog	2011-06-27 22:36:06 UTC (rev 17644)
@@ -29,6 +29,8 @@
       can replace one with the other. Add lintian override.
   * New binary package: python3-docutils (closes: #577725).
     + Build-depend on python3-all.
+    + Add two patches to fix incompatibilities with Python 3.2
+      (python3.2-configparser.diff, python3.2-elementtree.diff).
     + Both python-docutils and python3-docutils provides rst* scripts, managed
       by alternatives.
     + Conflict with other packages shipping /usr/bin/rst2* binaries, so that
@@ -44,7 +46,7 @@
   * Simplify debian/rules.
   * Update list of package maintainer in debian/*.copyright.
 
- -- Jakub Wilk <jwilk at debian.org>  Tue, 28 Jun 2011 00:05:54 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Tue, 28 Jun 2011 00:27:47 +0200
 
 python-docutils (0.7-2) unstable; urgency=low
 

Modified: packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff	2011-06-27 22:07:35 UTC (rev 17643)
+++ packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff	2011-06-27 22:36:06 UTC (rev 17644)
@@ -81,7 +81,7 @@
          'LaTeX-Specific Options',
 --- a/docutils/writers/odf_odt/__init__.py
 +++ b/docutils/writers/odf_odt/__init__.py
-@@ -369,13 +369,13 @@
+@@ -372,13 +372,13 @@
  
      default_stylesheet_path = utils.relative_path(
          os.path.join(os.getcwd(), 'dummy'),

Added: packages/python-docutils/trunk/debian/patches/python3.2-configparser.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/python3.2-configparser.diff	                        (rev 0)
+++ packages/python-docutils/trunk/debian/patches/python3.2-configparser.diff	2011-06-27 22:36:06 UTC (rev 17644)
@@ -0,0 +1,52 @@
+Description: Fix incompatibility with Python 3.2 ConfigParser.
+Origin: upstream, http://svn.berlios.de/viewvc/docutils/trunk/docutils/docutils/frontend.py?r1=7027&r2=7029
+Bug: http://sourceforge.net/tracker/?func=detail&atid=422030&aid=3149845&group_id=38414
+Last-Update: 2011-06-28
+
+--- a/docutils/frontend.py
++++ b/docutils/frontend.py
+@@ -671,7 +671,7 @@
+         raise KeyError('No option with dest == %r.' % dest)
+ 
+ 
+-class ConfigParser(CP.ConfigParser):
++class ConfigParser(CP.RawConfigParser):
+ 
+     old_settings = {
+         'pep_stylesheet': ('pep_html writer', 'stylesheet'),
+@@ -693,7 +693,7 @@
+ """
+ 
+     def __init__(self, *args, **kwargs):
+-        CP.ConfigParser.__init__(self, *args, **kwargs)
++        CP.RawConfigParser.__init__(self, *args, **kwargs)
+ 
+         self._files = []
+         """List of paths of configuration files read."""
+@@ -708,7 +708,7 @@
+             except IOError:
+                 continue
+             try:
+-                CP.ConfigParser.readfp(self, fp, filename)
++                CP.RawConfigParser.readfp(self, fp, filename)
+             except UnicodeDecodeError:
+                 sys.stderr.write(self.not_utf8_error % (filename, filename))
+                 fp.close()
+@@ -749,7 +749,7 @@
+                 except KeyError:
+                     continue
+                 if option.validator:
+-                    value = self.get(section, setting, raw=1)
++                    value = self.get(section, setting)
+                     try:
+                         new_value = option.validator(
+                             setting, value, option_parser,
+@@ -778,7 +778,7 @@
+         section_dict = {}
+         if self.has_section(section):
+             for option in self.options(section):
+-                section_dict[option] = self.get(section, option, raw=1)
++                section_dict[option] = self.get(section, option)
+         return section_dict
+ 
+ 

Added: packages/python-docutils/trunk/debian/patches/python3.2-elementtree.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/python3.2-elementtree.diff	                        (rev 0)
+++ packages/python-docutils/trunk/debian/patches/python3.2-elementtree.diff	2011-06-27 22:36:06 UTC (rev 17644)
@@ -0,0 +1,18 @@
+Description: Fix incompatibility with Python 3.2 ElementTree.
+Origin: upstream, http://svn.berlios.de/viewvc/docutils/trunk/docutils/docutils/writers/odf_odt/__init__.py?r1=6988&r2=7013
+Last-Update: 2011-06-28
+
+--- a/docutils/writers/odf_odt/__init__.py
++++ b/docutils/writers/odf_odt/__init__.py
+@@ -300,7 +300,10 @@
+ 
+ def ToString(et):
+     outstream = StringIO.StringIO()
+-    et.write(outstream)
++    if sys.version_info >= (3, 2):
++        et.write(outstream, encoding="unicode")
++    else:
++        et.write(outstream)
+     s1 = outstream.getvalue()
+     outstream.close()
+     return s1

Modified: packages/python-docutils/trunk/debian/patches/series
===================================================================
--- packages/python-docutils/trunk/debian/patches/series	2011-06-27 22:07:35 UTC (rev 17643)
+++ packages/python-docutils/trunk/debian/patches/series	2011-06-27 22:36:06 UTC (rev 17644)
@@ -7,4 +7,6 @@
 15_emacs_debian_paths.diff
 16_disable_picins.diff
 buildhtml-local.diff
+python3.2-configparser.diff
+python3.2-elementtree.diff
 move-data-to-usr-share.diff

Modified: packages/python-docutils/trunk/debian/rules
===================================================================
--- packages/python-docutils/trunk/debian/rules	2011-06-27 22:07:35 UTC (rev 17643)
+++ packages/python-docutils/trunk/debian/rules	2011-06-27 22:36:06 UTC (rev 17644)
@@ -63,7 +63,7 @@
 		$$python ../../test/alltests.py; \
 	done
 	# Run test suite for Python 3.X:
-	-set -e && cd py3k/build/lib*/ && \
+	set -e && cd py3k/build/lib*/ && \
 	for python in $(shell py3versions -r); do \
 		$$python test/alltests.py; \
 	done




More information about the Python-modules-commits mailing list