[Python-modules-commits] r16131 - in packages/configobj/trunk/debian (4 files)

jelmer at users.alioth.debian.org jelmer at users.alioth.debian.org
Wed Mar 16 12:09:31 UTC 2011


    Date: Wednesday, March 16, 2011 @ 12:09:12
  Author: jelmer
Revision: 16131

releasing version 4.7.2+ds-2

Added:
  packages/configobj/trunk/debian/patches/triplequotes.diff
Modified:
  packages/configobj/trunk/debian/changelog
  packages/configobj/trunk/debian/control
  packages/configobj/trunk/debian/patches/series

Modified: packages/configobj/trunk/debian/changelog
===================================================================
--- packages/configobj/trunk/debian/changelog	2011-03-15 02:19:45 UTC (rev 16130)
+++ packages/configobj/trunk/debian/changelog	2011-03-16 12:09:12 UTC (rev 16131)
@@ -1,5 +1,6 @@
-configobj (4.7.2+ds-2) UNRELEASED; urgency=low
+configobj (4.7.2+ds-2) unstable; urgency=low
 
+  [ Stefano Rivera ]
   * Don't leak uid and umask into source tarball and set -e.
   * Bumped Standards-Version to 3.9.1 (no changes needed).
   * Enable test suites.
@@ -15,8 +16,12 @@
   * Update my e-mail address.
   * Use DEP5 format in debian/copyright.
 
- -- Stefano Rivera <stefanor at debian.org>  Sat, 05 Feb 2011 12:14:08 +0200
+  [ Jelmer Vernooij ]
+  * Properly handle triple quotes. Closes: #618349, LP: #710410
+  * Add myself to uploaders.
 
+ -- Jelmer Vernooij <jelmer at debian.org>  Wed, 16 Mar 2011 11:17:14 +0100
+
 configobj (4.7.2+ds-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/configobj/trunk/debian/control
===================================================================
--- packages/configobj/trunk/debian/control	2011-03-15 02:19:45 UTC (rev 16130)
+++ packages/configobj/trunk/debian/control	2011-03-16 12:09:12 UTC (rev 16131)
@@ -4,7 +4,8 @@
 Maintainer: Daniel Watkins <daniel at daniel-watkins.co.uk>
 Uploaders:
  Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>,
- Stefano Rivera <stefanor at debian.org>
+ Stefano Rivera <stefanor at debian.org>,
+ Jelmer Vernooij <jelmer at debian.org>
 Build-Depends:
  debhelper (>= 7.0.50~),
  python-all (>= 2.6.5-13~),

Modified: packages/configobj/trunk/debian/patches/series
===================================================================
--- packages/configobj/trunk/debian/patches/series	2011-03-15 02:19:45 UTC (rev 16130)
+++ packages/configobj/trunk/debian/patches/series	2011-03-16 12:09:12 UTC (rev 16131)
@@ -1,3 +1,4 @@
 eggify.diff
 report-doctest-failure.diff
 py27-test.diff
+triplequotes.diff

Added: packages/configobj/trunk/debian/patches/triplequotes.diff
===================================================================
--- packages/configobj/trunk/debian/patches/triplequotes.diff	                        (rev 0)
+++ packages/configobj/trunk/debian/patches/triplequotes.diff	2011-03-16 12:09:12 UTC (rev 16131)
@@ -0,0 +1,65 @@
+Description: write out the right kind of triple quotes
+Author: Alexander Belchenko
+Origin: cherrypicked from Bazaar's trunk, commit:bialix at ukr.net-20110220150125-740pnd2s46ovhler
+Bug: http://code.google.com/p/configobj/issues?detail?id=31
+Bug-Debian: http://bugs.debian.org/618349
+
+diff -ur configobj-4.7.2/configobj.py configobj-4.7.2.new/configobj.py
+--- configobj-4.7.2/configobj.py	2011-03-14 17:09:10.000000000 +0100
++++ configobj-4.7.2.new/configobj.py	2011-03-14 17:09:53.000000000 +0100
+@@ -1817,9 +1817,9 @@
+         if (value.find('"""') != -1) and (value.find("'''") != -1):
+             raise ConfigObjError('Value "%s" cannot be safely quoted.' % value)
+         if value.find('"""') == -1:
+-            quot = tdquot
++            quot = tsquot
+         else:
+-            quot = tsquot 
++            quot = tdquot
+         return quot
+ 
+ 
+diff -ur configobj-4.7.2/tests/functionaltests/test_configobj.py configobj-4.7.2.new/tests/functionaltests/test_configobj.py
+--- configobj-4.7.2/tests/functionaltests/test_configobj.py	2011-03-14 17:09:10.000000000 +0100
++++ configobj-4.7.2.new/tests/functionaltests/test_configobj.py	2011-03-14 17:10:09.000000000 +0100
+@@ -7,6 +7,7 @@
+     import unittest
+ 
+ from configobj import ConfigObj
++from StringIO import StringIO
+ 
+ try:
+     # Python 2.6 only
+@@ -99,6 +100,19 @@
+         # This raises a MissingInterpolationOption exception in 4.7.1 and earlier
+         repr(c)
+ 
++    def test_triple_quotes(self):
++        triple_quotes_value = '''spam
++""" that's my spam """
++eggs'''
++        co = ConfigObj()
++        co['test'] = triple_quotes_value
++        outfile = StringIO()
++        co.write(outfile=outfile)
++        lines = outfile.getvalue().splitlines()
++        # now we're trying to read it back
++        co2 = ConfigObj(lines)
++        self.assertEquals(triple_quotes_value, co2['test'])
++
+     def test_as_functions(self):
+         a = ConfigObj()
+         a['a'] = 'fish'
+--- configobj-4.7.2/tests/test_configobj.py	2011-03-14 17:09:19.000000000 +0100
++++ configobj-4.7.2.new/tests/test_configobj.py	2011-03-14 17:16:18.000000000 +0100
+@@ -374,7 +374,6 @@ def _doctest():
+     >>> cfg.write()
+-    ["key1 = '''Multiline\\nValue'''", 'key2 = "Value" with \\'quotes\\' !']
++    ['key1 = \"\"\"Multiline\\nValue\"\"\"', 'key2 = "Value" with \\'quotes\\' !']
+     >>> cfg.list_values = True
+-    >>> cfg.write() == ["key1 = '''Multiline\\nValue'''",
+-    ... 'key2 = \\'\\'\\'"Value" with \\'quotes\\' !\\'\\'\\'']
+-    1
++    >>> cfg.write()
++    ['key1 = \"\"\"Multiline\\nValue\"\"\"', 'key2 = \"\"\""Value" with \\'quotes\\' !\"\"\"']
+     




More information about the Python-modules-commits mailing list