[Python-modules-commits] r9470 - in packages/python-mysqldb/trunk/debian (4 files)

mejo at users.alioth.debian.org mejo at users.alioth.debian.org
Tue Aug 25 23:50:56 UTC 2009


    Date: Tuesday, August 25, 2009 @ 23:50:55
  Author: mejo
Revision: 9470

fix patches

Added:
  packages/python-mysqldb/trunk/debian/patches/02_python_2.6.dpatch
    (from rev 9466, packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch)
Modified:
  packages/python-mysqldb/trunk/debian/changelog
  packages/python-mysqldb/trunk/debian/patches/03_converters_set2str.dpatch
Deleted:
  packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch

Modified: packages/python-mysqldb/trunk/debian/changelog
===================================================================
--- packages/python-mysqldb/trunk/debian/changelog	2009-08-25 23:38:34 UTC (rev 9469)
+++ packages/python-mysqldb/trunk/debian/changelog	2009-08-25 23:50:55 UTC (rev 9470)
@@ -1,11 +1,10 @@
 python-mysqldb (1.2.2-9) unstable; urgency=low
 
-  * Add 07_python_2.6.dpatch to fix python 2.6 related warnings. Thanks to
+  * Add 02_python_2.6.dpatch to fix python 2.6 related warnings. Thanks to
     Mario Limonciello <superm1 at ubuntu.com> for the patch. (closes: #541719)
-  * don't apply 03_converters_set2str.dpatch anymore.
   * bump standards-version to 3.8.3, no changes required.
 
- -- Jonas Meurer <mejo at debian.org>  Wed, 26 Aug 2009 01:36:05 +0200
+ -- Jonas Meurer <mejo at debian.org>  Wed, 26 Aug 2009 01:50:35 +0200
 
 python-mysqldb (1.2.2-8) unstable; urgency=low
 

Copied: packages/python-mysqldb/trunk/debian/patches/02_python_2.6.dpatch (from rev 9466, packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch)
===================================================================
--- packages/python-mysqldb/trunk/debian/patches/02_python_2.6.dpatch	                        (rev 0)
+++ packages/python-mysqldb/trunk/debian/patches/02_python_2.6.dpatch	2009-08-25 23:50:55 UTC (rev 9470)
@@ -0,0 +1,98 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_python_2.6.dpatch by  <superm1 at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Cherry pick upstream 554 & 603 to fix python 2.6 support
+
+ at DPATCH@
+--- a/MySQLdb/__init__.py
++++ b/MySQLdb/__init__.py
+@@ -19,8 +19,8 @@
+ import _mysql
+ 
+ if version_info != _mysql.version_info:
+-    raise ImportError, "this is MySQLdb version %s, but _mysql is version %r" %\
+-          (version_info, _mysql.version_info)
++    raise ImportError("this is MySQLdb version %s, but _mysql is version %r" %
++                      (version_info, _mysql.version_info))
+ 
+ threadsafety = 1
+ apilevel = "2.0"
+@@ -31,25 +31,20 @@
+ from MySQLdb.times import Date, Time, Timestamp, \
+     DateFromTicks, TimeFromTicks, TimestampFromTicks
+ 
+-from sets import ImmutableSet
+-class DBAPISet(ImmutableSet):
++try:
++    frozenset
++except NameError:
++    from sets import ImmutableSet as frozenset
++
++class DBAPISet(frozenset):
+ 
+     """A special type of set for which A == x is true if A is a
+     DBAPISet and x is a member of that set."""
+ 
+-    def __ne__(self, other):
+-        from sets import BaseSet
+-        if isinstance(other, BaseSet):
+-            return super(DBAPISet.self).__ne__(self, other)
+-        else:
+-            return other not in self
+-
+     def __eq__(self, other):
+-        from sets import BaseSet
+-        if isinstance(other, BaseSet):
+-            return super(DBAPISet, self).__eq__(self, other)
+-        else:
+-            return other in self
++        if isinstance(other, DBAPISet):
++            return not self.difference(other)
++        return other in self
+ 
+ 
+ STRING    = DBAPISet([FIELD_TYPE.ENUM, FIELD_TYPE.STRING,
+@@ -65,6 +60,18 @@
+ DATETIME  = TIMESTAMP
+ ROWID     = DBAPISet()
+ 
++def test_DBAPISet_set_equality():
++    assert STRING == STRING
++
++def test_DBAPISet_set_inequality():
++    assert STRING != NUMBER
++
++def test_DBAPISet_set_equality_membership():
++    assert FIELD_TYPE.VAR_STRING == STRING
++
++def test_DBAPISet_set_inequality_membership():
++    assert FIELD_TYPE.DATE != STRING
++
+ def Binary(x):
+     return str(x)
+ 
+--- a/MySQLdb/converters.py
++++ b/MySQLdb/converters.py
+@@ -34,15 +34,19 @@
+ 
+ from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL
+ from constants import FIELD_TYPE, FLAG
+-from sets import BaseSet, Set
+ from times import *
+ import types
+ import array
+ 
++try:
++    set
++except NameError:
++    from sets import Set as set
++
+ def Bool2Str(s, d): return str(int(s))
+ 
+ def Str2Set(s):
+-    return Set([ i for i in s.split(',') if i ])
++    return set([ i for i in s.split(',') if i ])
+ 
+ def Set2Str(s, d):
+     return string_literal(','.join(s), d)

Modified: packages/python-mysqldb/trunk/debian/patches/03_converters_set2str.dpatch
===================================================================
--- packages/python-mysqldb/trunk/debian/patches/03_converters_set2str.dpatch	2009-08-25 23:38:34 UTC (rev 9469)
+++ packages/python-mysqldb/trunk/debian/patches/03_converters_set2str.dpatch	2009-08-25 23:50:55 UTC (rev 9470)
@@ -9,11 +9,11 @@
 
 --- python-mysqldb-1.2.2/MySQLdb/converters.py
 +++ python-mysqldb-1.2.2/MySQLdb/converters.py
-@@ -42,7 +42,8 @@
+@@ -46,7 +46,8 @@
  def Bool2Str(s, d): return str(int(s))
  
  def Str2Set(s):
--    return Set([ i for i in s.split(',') if i ])
+-    return set([ i for i in s.split(',') if i ])
 +    values = s.split(',')
 +    return map(str, tuple(values))
  

Deleted: packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch
===================================================================
--- packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch	2009-08-25 23:38:34 UTC (rev 9469)
+++ packages/python-mysqldb/trunk/debian/patches/07_python_2.6.dpatch	2009-08-25 23:50:55 UTC (rev 9470)
@@ -1,98 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 07_python_2.6.dpatch by  <superm1 at ubuntu.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cherry pick upstream 554 & 603 to fix python 2.6 support
-
- at DPATCH@
---- a/MySQLdb/__init__.py
-+++ b/MySQLdb/__init__.py
-@@ -19,8 +19,8 @@
- import _mysql
- 
- if version_info != _mysql.version_info:
--    raise ImportError, "this is MySQLdb version %s, but _mysql is version %r" %\
--          (version_info, _mysql.version_info)
-+    raise ImportError("this is MySQLdb version %s, but _mysql is version %r" %
-+                      (version_info, _mysql.version_info))
- 
- threadsafety = 1
- apilevel = "2.0"
-@@ -31,25 +31,20 @@
- from MySQLdb.times import Date, Time, Timestamp, \
-     DateFromTicks, TimeFromTicks, TimestampFromTicks
- 
--from sets import ImmutableSet
--class DBAPISet(ImmutableSet):
-+try:
-+    frozenset
-+except NameError:
-+    from sets import ImmutableSet as frozenset
-+
-+class DBAPISet(frozenset):
- 
-     """A special type of set for which A == x is true if A is a
-     DBAPISet and x is a member of that set."""
- 
--    def __ne__(self, other):
--        from sets import BaseSet
--        if isinstance(other, BaseSet):
--            return super(DBAPISet.self).__ne__(self, other)
--        else:
--            return other not in self
--
-     def __eq__(self, other):
--        from sets import BaseSet
--        if isinstance(other, BaseSet):
--            return super(DBAPISet, self).__eq__(self, other)
--        else:
--            return other in self
-+        if isinstance(other, DBAPISet):
-+            return not self.difference(other)
-+        return other in self
- 
- 
- STRING    = DBAPISet([FIELD_TYPE.ENUM, FIELD_TYPE.STRING,
-@@ -65,6 +60,18 @@
- DATETIME  = TIMESTAMP
- ROWID     = DBAPISet()
- 
-+def test_DBAPISet_set_equality():
-+    assert STRING == STRING
-+
-+def test_DBAPISet_set_inequality():
-+    assert STRING != NUMBER
-+
-+def test_DBAPISet_set_equality_membership():
-+    assert FIELD_TYPE.VAR_STRING == STRING
-+
-+def test_DBAPISet_set_inequality_membership():
-+    assert FIELD_TYPE.DATE != STRING
-+
- def Binary(x):
-     return str(x)
- 
---- a/MySQLdb/converters.py
-+++ b/MySQLdb/converters.py
-@@ -34,15 +34,19 @@
- 
- from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL
- from constants import FIELD_TYPE, FLAG
--from sets import BaseSet, Set
- from times import *
- import types
- import array
- 
-+try:
-+    set
-+except NameError:
-+    from sets import Set as set
-+
- def Bool2Str(s, d): return str(int(s))
- 
- def Str2Set(s):
--    return Set([ i for i in s.split(',') if i ])
-+    return set([ i for i in s.split(',') if i ])
- 
- def Set2Str(s, d):
-     return string_literal(','.join(s), d)




More information about the Python-modules-commits mailing list