[Python-modules-commits] r25356 - in packages/sqlobject/trunk/debian (12 files)

drnlmza-guest at users.alioth.debian.org drnlmza-guest at users.alioth.debian.org
Sat Aug 3 14:16:16 UTC 2013


    Date: Saturday, August 3, 2013 @ 14:16:14
  Author: drnlmza-guest
Revision: 25356


Update sqlobject to the current upstream release (1.4.1)

  * Replace python-support with dh_python2
  * Add a NEWS file detailing major API changes since 0.12
  * Add manpage for new sqlobject-convertOldURI script
  * Remove obselete patches

Added:
  packages/sqlobject/trunk/debian/NEWS
  packages/sqlobject/trunk/debian/sqlobject-convertOldURI.1
Modified:
  packages/sqlobject/trunk/debian/changelog
  packages/sqlobject/trunk/debian/control
  packages/sqlobject/trunk/debian/manpages
  packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools
  packages/sqlobject/trunk/debian/patches/series
  packages/sqlobject/trunk/debian/rules
Deleted:
  packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4
  packages/sqlobject/trunk/debian/patches/psycopg2-autocommit
  packages/sqlobject/trunk/debian/patches/pythonpath
  packages/sqlobject/trunk/debian/pycompat

Added: packages/sqlobject/trunk/debian/NEWS
===================================================================
--- packages/sqlobject/trunk/debian/NEWS	                        (rev 0)
+++ packages/sqlobject/trunk/debian/NEWS	2013-08-03 14:16:14 UTC (rev 25356)
@@ -0,0 +1,25 @@
+sqlobject (1.4.1-1) UNRELEASED; urgency=low
+
+  Due to the large gap between updates to the sqlobject package, there
+  are a number of significant changes in this version.
+
+  All database signals are now sent with the instance or class as the first
+  parameter. The following signals were changed: RowCreateSignal,
+  RowCreatedSignal, DeleteColumnSignal
+
+  Post-processing functions for all signals are called now called with
+  the instance as the first parameter. The following signals were
+  changed: RowUpdatedSignal, RowDestroySignal, RowDestroyedSignal.
+
+  The DB URI parser was reworked to use urllib.split*() and unquote().
+  This means that any username/password/path are allowed in DB
+  URIs if they are properly %-encoded, and DB URIs are automatically
+  unquoted. The sqlobject-convertOldURI script can be used to correctly
+  quote an old DB URI.
+
+  The backend parameter in the DB URI was renamed to driver.
+
+  The dirty attribute has been moved from the SQLOBject base class to the
+  sqlmeta class
+
+ -- Neil Muller <drnlmuller+debian at gmail.com>  Sat, 03 Aug 2013 14:55:07 +0200

Modified: packages/sqlobject/trunk/debian/changelog
===================================================================
--- packages/sqlobject/trunk/debian/changelog	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/changelog	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,3 +1,15 @@
+sqlobject (1.4.1-1) UNRELEASED; urgency=low
+
+  * Update to current upstream.
+  * Drop no longer relevant patches (PYTHONPATH fix, postgresql escaping and
+    pyscopg-autocommit) as these are included upstream.
+  * Update setuptools patch to current upstream.
+  * Replace python-support with dh_python2.
+  * Add manpage for sqlobject-convertOldURI helper.
+  * Add NEWS.Debian file describing the major changes between 0.12 and 1.4.
+
+ -- Neil Muller <drnlmuller+debian at gmail.com>  Sat, 03 Aug 2013 14:55:07 +0200
+
 sqlobject (0.12.4-3) unstable; urgency=low
 
   * Acknowledge NMUs (Closes: #695233, #633843)

Modified: packages/sqlobject/trunk/debian/control
===================================================================
--- packages/sqlobject/trunk/debian/control	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/control	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,12 +1,11 @@
 Source: sqlobject
 Section: python
 Priority: optional
-Build-Depends: debhelper (>= 8.1), python-all (>= 2.5.4)
-Build-Depends-Indep: python-support
+Build-Depends: debhelper (>= 8.1), python-all (>= 2.7.3-4)
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Neil Muller <drnlmuller+debian at gmail.com>
 Standards-Version: 3.9.4
-XS-Python-Version: all
+X-Python-Version: >= 2.4
 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
@@ -15,7 +14,6 @@
 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/manpages
===================================================================
--- packages/sqlobject/trunk/debian/manpages	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/manpages	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1 +1,2 @@
 debian/sqlobject-admin.1
+debian/sqlobject-convertOldURI.1

Modified: packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools
===================================================================
--- packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/patches/get_rid_of_setuptools	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,8 +1,9 @@
 --- 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:
+@@ -3,14 +3,8 @@
+ from imp import load_source
+ from os.path import abspath, dirname, isfile, join
+ 
 -try:
 -    from ez_setup import use_setuptools
 -    use_setuptools()
@@ -14,5 +15,5 @@
 +from distutils.core import setup
 +is_setuptools = False
  
- subpackages = ['firebird', 'include', 'include.pydispatch', 'inheritance',
-                'manager', 'maxdb', 'mysql', 'mssql', 'postgres', 'sqlite',
+ versionpath = join(abspath(dirname(__file__)), "sqlobject", "__version__.py")
+ load_source("sqlobject_version", versionpath)

Deleted: packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4
===================================================================
--- packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/patches/postgres_escape_0.12.4	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,169 +0,0 @@
-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\%'"

Deleted: packages/sqlobject/trunk/debian/patches/psycopg2-autocommit
===================================================================
--- packages/sqlobject/trunk/debian/patches/psycopg2-autocommit	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/patches/psycopg2-autocommit	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,32 +0,0 @@
-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)

Deleted: packages/sqlobject/trunk/debian/patches/pythonpath
===================================================================
--- packages/sqlobject/trunk/debian/patches/pythonpath	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/patches/pythonpath	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,17 +0,0 @@
-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-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/patches/series	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1,4 +1 @@
 get_rid_of_setuptools
-psycopg2-autocommit
-postgres_escape_0.12.4
-pythonpath

Deleted: packages/sqlobject/trunk/debian/pycompat
===================================================================
--- packages/sqlobject/trunk/debian/pycompat	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/pycompat	2013-08-03 14:16:14 UTC (rev 25356)
@@ -1 +0,0 @@
-2

Modified: packages/sqlobject/trunk/debian/rules
===================================================================
--- packages/sqlobject/trunk/debian/rules	2013-08-02 19:14:46 UTC (rev 25355)
+++ packages/sqlobject/trunk/debian/rules	2013-08-03 14:16:14 UTC (rev 25356)
@@ -3,7 +3,7 @@
 export DH_ALWAYS_EXCLUDE=tests:examples:presentation-2004-11:europython
 
 %:
-	dh $@
+	dh $@ --with python2
 
 override_dh_installdocs:
 	dh_installdocs

Added: packages/sqlobject/trunk/debian/sqlobject-convertOldURI.1
===================================================================
--- packages/sqlobject/trunk/debian/sqlobject-convertOldURI.1	                        (rev 0)
+++ packages/sqlobject/trunk/debian/sqlobject-convertOldURI.1	2013-08-03 14:16:14 UTC (rev 25356)
@@ -0,0 +1,36 @@
+'\" t
+.\"     Title: sqlobject-convertOldURI
+.\"    Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
+.\"      Date: 01/08/2013
+.\"  Language: English
+.\"
+.TH "SQLOBJECT\-CONVERTOLDURI" "1" "01/08/2013"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sqlobject-convertOldURI \- convert a old-style sqlobject DB URI to the correctly quoted version.
+.SH "SYNOPSIS"
+.sp
+\fBsqlobject\-convertOldURI\fR \fIold-style-URI\fR
+.SH "DESCRIPTION"
+.sp
+The sqlobject\-convertOldURI script included with SQLObject simpilfies updating old DB URI's to the correctly quoted version for use with SQLObject 1.0 or later\&.
+.sp
+It will print the equivilant URI for the provided old-syle URI.
+.SH "AUTHORS"
+.sp
+This manual page was written by Neil Muller <drnlmuller+debian at gmail\&.com>\&.
+.SH "LICENSE"
+.sp
+This package is licensed under the GNU Lesser General Public License\&. You can
+find the full text of the LGPL in /usr/share/common\-licenses/LGPL in your
+Debian system\&.




More information about the Python-modules-commits mailing list