[Python-modules-commits] r25016 - in packages/sqlobject/trunk/debian (8 files)
drnlmza-guest at users.alioth.debian.org
drnlmza-guest at users.alioth.debian.org
Fri Jun 28 17:19:10 UTC 2013
Date: Friday, June 28, 2013 @ 17:19:08
Author: drnlmza-guest
Revision: 25016
Sync repo state with the current package
* Abandon work towards 0.15, as it's obselete
* Acknowledge NMU's
* Include fix for #605183 (Insecure use of PYTHONPATH) from upstream
* Add myself to uploaders
Added:
packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4
packages/sqlobject/trunk/debian/patches/psycopg2-autocommit
packages/sqlobject/trunk/debian/patches/pythonpath
Modified:
packages/sqlobject/trunk/debian/changelog
packages/sqlobject/trunk/debian/control
packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools
packages/sqlobject/trunk/debian/patches/series
packages/sqlobject/trunk/debian/rules
Modified: packages/sqlobject/trunk/debian/changelog
===================================================================
--- packages/sqlobject/trunk/debian/changelog 2013-06-28 14:34:20 UTC (rev 25015)
+++ packages/sqlobject/trunk/debian/changelog 2013-06-28 17:19:08 UTC (rev 25016)
@@ -1,30 +1,38 @@
-sqlobject (0.15.1-2) UNRELEASED; urgency=low
+sqlobject (0.12.4-3) unstable; urgency=low
- * Use canonical URIs for Vcs-* fields.
+ * Acknowledge NMUs (Closes: #695233, #633843)
+ * Use canonical URIs for Vcs-* fields (fix by Jakub Wilk)
+ * Apply patch from upstream for insecure use of PYTHONPATH (Closes: #605183)
+ * Add myself to the Uploaders
+ * debian/copyright
+ - Replaced (C) bye © in the copyright mention (Fix by Carl Chenet)
+ * debian/watch
+ - Changed the regex to skip beta version in the remote repository
+ (Fix by Carl Chenet)
+ * Bump standards version to 3.9.4 (no changes needed)
- -- Jakub Wilk <jwilk at debian.org> Sun, 05 May 2013 16:04:03 +0200
+ -- Neil Muller <drnlmuller+debian at gmail.com> Thu, 27 Jun 2013 21:46:04 +0200
-sqlobject (0.15.1-1) unstable; urgency=low
- * New upstream version
- * debian/control
- - Removed python-support from Build-Depends
- - Removed quilt from Build-Depends
- - Bump python-all to 2.6.6-3
- - Bump Standards-Version to 3.9.1.0. No change needed
- - Switched XS-Python-Version to X-Python-Version >= 2.5
- - Removed XB-Python-Version: ${python:Versions}
- * debian/rules
- - added --with python2 to dh $@
- * debian/patches/get_rid_of_setuptools
- - Rewrote the patch for the new upstream version
- * debian/watch
- - Changed the regex to skip beta version in the remote repository
- * debian/copyright
- - Replaced (C) bye © in the copyright mention
+sqlobject (0.12.4-2.2) unstable; urgency=low
- -- Carl Chenet <chaica at ohmytux.com> Wed, 13 Apr 2011 01:25:16 +0200
+ * Non-maintainer upload.
+ * Fix "SQLObject doesn't escape strings correctly for postgresql 9.1":
+ new patch postgres_escape_0.12.4 backported from upstream (1.2.0).
+ (Closes: #695233)
+ -- Neil Muller <drnlmuller+debian at gmail.com> Mon, 11 Feb 2013 13:03:04 +0200
+
+
+sqlobject (0.12.4-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fix "autocommit issue with psycopg2":
+ new patch psycopg2-autocommit from upstream.
+ (Closes: #633843)
+
+ -- gregor herrmann <gregoa at debian.org> Sat, 14 Jan 2012 15:11:56 +0100
+
sqlobject (0.12.4-2) unstable; urgency=low
* Remove dh_auto ovverrides to ensure setup.py is used to build the package.
Modified: packages/sqlobject/trunk/debian/control
===================================================================
--- packages/sqlobject/trunk/debian/control 2013-06-28 14:34:20 UTC (rev 25015)
+++ packages/sqlobject/trunk/debian/control 2013-06-28 17:19:08 UTC (rev 25016)
@@ -1,11 +1,12 @@
Source: sqlobject
Section: python
Priority: optional
-Build-Depends: debhelper (>= 7.3.5), python-all (>= 2.6.6-3)
+Build-Depends: debhelper (>= 7.3.5), python-all (>= 2.5.4), quilt
+Build-Depends-Indep: python-support
Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Carl Chenet <chaica at ohmytux.com>
-Standards-Version: 3.9.1.0
-X-Python-Version: >= 2.5
+Uploaders: Neil Muller <drnlmuller+debian at gmail.com>
+Standards-Version: 3.9.4
+XS-Python-Version: all
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/sqlobject/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/sqlobject/trunk/
Homepage: http://www.sqlobject.org
@@ -14,6 +15,7 @@
Architecture: all
Depends: ${python:Depends}, python-pkg-resources (>=0.6c8), python-formencode, ${misc:Depends}
Suggests: python-mysqldb, python-sqlite, python-psycopg2, python-kinterbasdb, python-maxdb
+XB-Python-Version: ${python:Versions}
Description: object relational manager providing an object interface to your database
SQLObject is an object-relational mapper. It allows you to translate RDBMS
table rows into Python objects, and manipulate those objects to transparently
Modified: packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools
===================================================================
--- packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools 2013-06-28 14:34:20 UTC (rev 25015)
+++ packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools 2013-06-28 17:19:08 UTC (rev 25016)
@@ -1,12 +1,8 @@
-# Description: deactivate setuptools
-# Author: Carl Chenet <chaica at ohmytux.com>
-Index: SQLObject-0.15.0/setup.py
-===================================================================
---- SQLObject-0.15.0.orig/setup.py 2010-10-12 00:01:10.000000000 +0200
-+++ SQLObject-0.15.0/setup.py 2010-10-12 00:02:02.000000000 +0200
-@@ -1,13 +1,13 @@
- # ez_setup doesn't work with Python 2.2, so we use distutils
- # in that case:
+--- a/setup.py
++++ b/setup.py
+@@ -1,13 +1,5 @@
+-# ez_setup doesn't work with Python 2.2, so we use distutils
+-# in that case:
-try:
- from ez_setup import use_setuptools
- use_setuptools()
@@ -15,14 +11,8 @@
-except ImportError:
- from distutils.core import setup
- is_setuptools = False
-+#try:
-+# from ez_setup import use_setuptools
-+# use_setuptools()
-+# from setuptools import setup
-+# is_setuptools = True
-+#except ImportError:
+from distutils.core import setup
+is_setuptools = False
subpackages = ['firebird', 'include', 'include.pydispatch', 'inheritance',
- 'manager', 'maxdb', 'mysql', 'mssql', 'postgres', 'rdbhost',
+ 'manager', 'maxdb', 'mysql', 'mssql', 'postgres', 'sqlite',
Added: packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4
===================================================================
--- packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4 (rev 0)
+++ packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4 2013-06-28 17:19:08 UTC (rev 25016)
@@ -0,0 +1,169 @@
+Description: Postgresql 9.1 changed the default value of standard_conforming_strings to on. SQLObject only added support for the E'' escape syntax in version 1.2.0
+Origin: upstream, Version 1.2.0
+Bug-Debian: http://bugs.debian.org/695233
+Author: phd
+Last-Update: 2013-02-11
+
+--- a/sqlobject/converters.py (revision 4567)
++++ b/sqlobject/converters.py (working copy)
+@@ -1,6 +1,11 @@
++from array import array
++import datetime
++from decimal import Decimal
+ import sys
+-from array import array
++import time
++from types import ClassType, InstanceType, NoneType
+
++
+ try:
+ import mx.DateTime.ISO
+ origISOStr = mx.DateTime.ISO.strGMT
+@@ -15,17 +20,12 @@
+ DateTimeType = None
+ DateTimeDeltaType = None
+
+-import time
+-import datetime
+-
+ try:
+ import Sybase
+ NumericType=Sybase.NumericType
+ except ImportError:
+ NumericType = None
+
+-from decimal import Decimal
+-from types import ClassType, InstanceType, NoneType
+
+ ########################################
+ ## Quoting
+@@ -90,6 +90,8 @@
+ value = value.replace("'", "''")
+ else:
+ assert 0, "Database %s unknown" % db
++ if db in ('postgres', 'rdbhost') and ('\\' in value):
++ return "E'%s'" % value
+ return "'%s'" % value
+
+ registerConverter(str, StringLikeConverter)
+@@ -198,3 +200,17 @@
+ return converter(obj, db)
+ else:
+ return reprFunc(db)
++
++
++def quote_str(s, db):
++ if db in ('postgres', 'rdbhost') and ('\\' in s):
++ return "E'%s'" % s
++ return "'%s'" % s
++
++def unquote_str(s):
++ if s.upper().startswith("E'") and s.endswith("'"):
++ return s[2:-1]
++ elif s.startswith("'") and s.endswith("'"):
++ return s[1:-1]
++ else:
++ return s
+Index: sqlobject/sqlbuilder.py
+===================================================================
+--- a/sqlobject/sqlbuilder.py (revision 4567)
++++ b/sqlobject/sqlbuilder.py (working copy)
+@@ -70,7 +70,7 @@
+ import weakref
+
+ import classregistry
+-from converters import sqlrepr, registerConverter
++from converters import registerConverter, sqlrepr, quote_str, unquote_str
+
+
+ class VersionError(Exception):
+@@ -896,18 +896,18 @@
+ if isinstance(s, SQLExpression):
+ values = []
+ if self.prefix:
+- values.append("'%s'" % self.prefix)
++ values.append(quote_str(self.prefix, db))
+ s = _quote_like_special(sqlrepr(s, db), db)
+ values.append(s)
+ if self.postfix:
+- values.append("'%s'" % self.postfix)
++ values.append(quote_str(self.postfix, db))
+ if db == "mysql":
+ return "CONCAT(%s)" % ", ".join(values)
+ else:
+ return " || ".join(values)
+ elif isinstance(s, basestring):
+- s = _quote_like_special(sqlrepr(s, db)[1:-1], db)
+- return "'%s%s%s'" % (self.prefix, s, self.postfix)
++ s = _quote_like_special(unquote_str(sqlrepr(s, db)), db)
++ return quote_str("%s%s%s" % (self.prefix, s, self.postfix), db)
+ else:
+ raise TypeError, "expected str, unicode or SQLExpression, got %s" % type(s)
+
+Index: sqlobject/tests/test_converters.py
+===================================================================
+--- a/sqlobject/tests/test_converters.py (revision 4567)
++++ b/sqlobject/tests/test_converters.py (working copy)
+@@ -1,9 +1,11 @@
+ import sys
+ from sqlobject.sqlbuilder import sqlrepr
++from sqlobject.converters import registerConverter, sqlrepr, \
++ quote_str, unquote_str
+ from sqlobject.sqlbuilder import SQLExpression, SQLObjectField, \
+ Select, Insert, Update, Delete, Replace, \
+- SQLTrueClauseClass, SQLConstant, SQLPrefix, SQLCall, SQLOp
+-from sqlobject.converters import registerConverter
++ SQLTrueClauseClass, SQLConstant, SQLPrefix, SQLCall, SQLOp, \
++ _LikeQuoted
+
+ class TestClass:
+
+@@ -40,23 +42,23 @@
+ assert sqlrepr('A String', 'firebird') == "'A String'"
+
+ def test_string_newline():
+- assert sqlrepr('A String\nAnother', 'postgres') == "'A String\\nAnother'"
++ assert sqlrepr('A String\nAnother', 'postgres') == "E'A String\\nAnother'"
+ assert sqlrepr('A String\nAnother', 'sqlite') == "'A String\nAnother'"
+
+ def test_string_tab():
+- assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
++ assert sqlrepr('A String\tAnother', 'postgres') == "E'A String\\tAnother'"
+
+ def test_string_r():
+- assert sqlrepr('A String\rAnother', 'postgres') == "'A String\\rAnother'"
++ assert sqlrepr('A String\rAnother', 'postgres') == "E'A String\\rAnother'"
+
+ def test_string_b():
+- assert sqlrepr('A String\bAnother', 'postgres') == "'A String\\bAnother'"
++ assert sqlrepr('A String\bAnother', 'postgres') == "E'A String\\bAnother'"
+
+ def test_string_000():
+- assert sqlrepr('A String\000Another', 'postgres') == "'A String\\0Another'"
++ assert sqlrepr('A String\000Another', 'postgres') == "E'A String\\0Another'"
+
+ def test_string_():
+- assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
++ assert sqlrepr('A String\tAnother', 'postgres') == "E'A String\\tAnother'"
+ assert sqlrepr('A String\'Another', 'firebird') == "'A String''Another'"
+
+ def test_simple_unicode():
+@@ -195,3 +197,18 @@
+ pass
+ else:
+ assert sqlrepr(Set([1])) == "(1)"
++
++def test_quote_unquote_str():
++ assert quote_str('test%', 'postgres') == "'test%'"
++ assert quote_str('test%', 'sqlite') == "'test%'"
++ assert quote_str('test\%', 'postgres') == "E'test\\%'"
++ assert quote_str('test\\%', 'sqlite') == "'test\%'"
++ assert unquote_str("'test%'") == 'test%'
++ assert unquote_str("'test\\%'") == 'test\\%'
++ assert unquote_str("E'test\\%'") == 'test\\%'
++
++def test_like_quoted():
++ assert sqlrepr(_LikeQuoted('test'), 'postgres') == "'test'"
++ assert sqlrepr(_LikeQuoted('test'), 'sqlite') == "'test'"
++ assert sqlrepr(_LikeQuoted('test%'), 'postgres') == r"E'test\\%'"
++ assert sqlrepr(_LikeQuoted('test%'), 'sqlite') == r"'test\%'"
Added: packages/sqlobject/trunk/debian/patches/psycopg2-autocommit
===================================================================
--- packages/sqlobject/trunk/debian/patches/psycopg2-autocommit (rev 0)
+++ packages/sqlobject/trunk/debian/patches/psycopg2-autocommit 2013-06-28 17:19:08 UTC (rev 25016)
@@ -0,0 +1,32 @@
+Description: A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed.
+Origin: upstream, http://sourceforge.net/mailarchive/message.php?msg_id=27799824
+Bug-Debian: http://bugs.debian.org/633843
+Author: phd
+Last-Update: 2012-01-14
+
+--- a/sqlobject/postgres/pgconnection.py
++++ b/sqlobject/postgres/pgconnection.py
+@@ -117,7 +117,10 @@
+ def _setAutoCommit(self, conn, auto):
+ # psycopg2 does not have an autocommit method.
+ if hasattr(conn, 'autocommit'):
+- conn.autocommit(auto)
++ try:
++ conn.autocommit(auto)
++ except TypeError:
++ conn.autocommit = auto
+
+ def makeConnection(self):
+ try:
+@@ -127,10 +130,7 @@
+ conn = self.module.connect(**self.dsn_dict)
+ except self.module.OperationalError, e:
+ raise self.module.OperationalError("%s; used connection string %r" % (e, self.dsn))
+- if self.autoCommit:
+- # psycopg2 does not have an autocommit method.
+- if hasattr(conn, 'autocommit'):
+- conn.autocommit(1)
++ if self.autoCommit: self._setAutoCommit(conn, 1)
+ c = conn.cursor()
+ if self.schema:
+ c.execute("SET search_path TO " + self.schema)
Added: packages/sqlobject/trunk/debian/patches/pythonpath
===================================================================
--- packages/sqlobject/trunk/debian/patches/pythonpath (rev 0)
+++ packages/sqlobject/trunk/debian/patches/pythonpath 2013-06-28 17:19:08 UTC (rev 25016)
@@ -0,0 +1,17 @@
+Description: Versions prior to 1.2.0 used the PYTHONPATH enviroment variable in an insecure manner in the documentation.
+Origin: upstream, Version 1.2.0
+Bug-Debian: http://bugs.debian.org/605183
+Author: phd
+Last-Update: 2013-06-27
+
+--- a/docs/rebuild (r4465)
++++ b/docs/rebuild (r4466)
+@@ -3,7 +3,7 @@
+ here=`pwd`
+ parent=`dirname $here`
+ echo "Adding $parent to \$PYTHONPATH"
+-export PYTHONPATH=$parent:$PYTHONPATH
++export PYTHONPATH=$parent${PYTHONPATH:+:$PYTHONPATH}
+
+ NORMAL="Authors DeveloperGuide FAQ Inheritance News
+ SQLBuilder SQLObject SelectResults TODO Versioning Views
Modified: packages/sqlobject/trunk/debian/patches/series
===================================================================
--- packages/sqlobject/trunk/debian/patches/series 2013-06-28 14:34:20 UTC (rev 25015)
+++ packages/sqlobject/trunk/debian/patches/series 2013-06-28 17:19:08 UTC (rev 25016)
@@ -1 +1,4 @@
get_rid_of_setuptools
+psycopg2-autocommit
+postgres_escape_0.12.4
+pythonpath
Modified: packages/sqlobject/trunk/debian/rules
===================================================================
--- packages/sqlobject/trunk/debian/rules 2013-06-28 14:34:20 UTC (rev 25015)
+++ packages/sqlobject/trunk/debian/rules 2013-06-28 17:19:08 UTC (rev 25016)
@@ -3,7 +3,7 @@
export DH_ALWAYS_EXCLUDE=tests:examples:presentation-2004-11:europython
%:
- dh $@ --with python2
+ dh $@
override_dh_installdocs:
dh_installdocs
More information about the Python-modules-commits
mailing list