sqlobject-cvs Mailing List for SQLObject (Page 51)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: <sub...@co...> - 2010-01-22 17:54:40
|
Author: phd Date: 2010-01-22 10:54:29 -0700 (Fri, 22 Jan 2010) New Revision: 4089 Modified: SQLObject/trunk/sqlobject/main.py Log: SQLObject requires Python 2.4.0 or later. Modified: SQLObject/trunk/sqlobject/main.py =================================================================== --- SQLObject/trunk/sqlobject/main.py 2010-01-15 16:11:54 UTC (rev 4088) +++ SQLObject/trunk/sqlobject/main.py 2010-01-22 17:54:29 UTC (rev 4089) @@ -44,8 +44,8 @@ from util.threadinglocal import local import sys -if sys.version_info[:3] < (2, 2, 0): - raise ImportError, "SQLObject requires Python 2.2.0 or later" +if sys.version_info[:3] < (2, 4, 0): + raise ImportError, "SQLObject requires Python 2.4.0 or later" """ This thread-local storage is needed for RowCreatedSignals. It gathers |
|
From: <sub...@co...> - 2010-01-15 16:12:12
|
Author: phd
Date: 2010-01-15 09:11:54 -0700 (Fri, 15 Jan 2010)
New Revision: 4088
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/converters.py
SQLObject/trunk/sqlobject/tests/test_converters.py
Log:
Added TimedeltaCol; currently it's only implemented on PostgreSQL as an INTERVAL type.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2010-01-08 21:26:15 UTC (rev 4087)
+++ SQLObject/trunk/docs/News.txt 2010-01-15 16:11:54 UTC (rev 4088)
@@ -10,6 +10,12 @@
SQLObject (trunk)
=================
+Features & Interface
+--------------------
+
+* Added TimedeltaCol; currently it's only implemented on PostgreSQL as an
+ INTERVAL type.
+
SQLObject 0.12.1
================
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2010-01-08 21:26:15 UTC (rev 4087)
+++ SQLObject/trunk/sqlobject/col.py 2010-01-15 16:11:54 UTC (rev 4088)
@@ -1283,6 +1283,25 @@
baseClass = SOTimestampCol
+class TimedeltaValidator(validators.Validator):
+ def to_python(self, value, state):
+ return value
+
+ def from_python(self, value, state):
+ return value
+
+class SOTimedeltaCol(SOCol):
+ def _postgresType(self):
+ return 'INTERVAL'
+
+ def createValidators(self):
+ return [TimedeltaValidator(name=self.name)] + \
+ super(SOTimedeltaCol, self).createValidators()
+
+class TimedeltaCol(Col):
+ baseClass = SOTimedeltaCol
+
+
from decimal import Decimal
class DecimalValidator(validators.Validator):
Modified: SQLObject/trunk/sqlobject/converters.py
===================================================================
--- SQLObject/trunk/sqlobject/converters.py 2010-01-08 21:26:15 UTC (rev 4087)
+++ SQLObject/trunk/sqlobject/converters.py 2010-01-15 16:11:54 UTC (rev 4088)
@@ -187,6 +187,14 @@
registerConverter(Decimal, DecimalConverter)
+def TimedeltaConverter(value, db):
+
+ return """INTERVAL '%d days %d seconds'""" % \
+ (value.days, value.seconds)
+
+registerConverter(datetime.timedelta, TimedeltaConverter)
+
+
def sqlrepr(obj, db=None):
try:
reprFunc = obj.__sqlrepr__
Modified: SQLObject/trunk/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_converters.py 2010-01-08 21:26:15 UTC (rev 4087)
+++ SQLObject/trunk/sqlobject/tests/test_converters.py 2010-01-15 16:11:54 UTC (rev 4088)
@@ -1,4 +1,5 @@
import sys
+from datetime import timedelta
from sqlobject.sqlbuilder import sqlrepr
from sqlobject.sqlbuilder import SQLExpression, SQLObjectField, \
Select, Insert, Update, Delete, Replace, \
@@ -195,3 +196,7 @@
pass
else:
assert sqlrepr(Set([1])) == "(1)"
+
+def test_timedelta():
+ assert sqlrepr(timedelta(seconds=30*60)) == \
+ "INTERVAL '0 days 1800 seconds'"
|
|
From: <sub...@co...> - 2010-01-08 21:26:22
|
Author: phd Date: 2010-01-08 14:26:15 -0700 (Fri, 08 Jan 2010) New Revision: 4087 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.11.3 and 0.12.1 were released 8 Jan 2010. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2010-01-08 21:25:33 UTC (rev 4086) +++ SQLObject/trunk/docs/News.txt 2010-01-08 21:26:15 UTC (rev 4087) @@ -13,6 +13,8 @@ SQLObject 0.12.1 ================ +Released 8 Jan 2010. + * Fixed three bugs in PostgresConnection. * A number of changes ported from `SQLObject 0.11.3`_. @@ -70,6 +72,8 @@ SQLObject 0.11.3 ================ +Released 8 Jan 2010. + * Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose it's 'ascii'. |
|
From: <sub...@co...> - 2010-01-08 21:25:39
|
Author: phd Date: 2010-01-08 14:25:33 -0700 (Fri, 08 Jan 2010) New Revision: 4086 Modified: SQLObject/branches/0.12/docs/News.txt Log: SQLObject 0.11.3 and 0.12.1 were released 8 Jan 2010. Modified: SQLObject/branches/0.12/docs/News.txt =================================================================== --- SQLObject/branches/0.12/docs/News.txt 2010-01-08 21:23:52 UTC (rev 4085) +++ SQLObject/branches/0.12/docs/News.txt 2010-01-08 21:25:33 UTC (rev 4086) @@ -10,6 +10,8 @@ SQLObject 0.12.1 ================ +Released 8 Jan 2010. + * Fixed three bugs in PostgresConnection. * A number of changes ported from `SQLObject 0.11.3`_. @@ -67,6 +69,8 @@ SQLObject 0.11.3 ================ +Released 8 Jan 2010. + * Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose it's 'ascii'. |
|
From: <sub...@co...> - 2010-01-08 21:24:00
|
Author: phd Date: 2010-01-08 14:23:52 -0700 (Fri, 08 Jan 2010) New Revision: 4085 Modified: SQLObject/branches/0.11/docs/News.txt Log: SQLObject 0.11.3 was released 8 Jan 2010. Modified: SQLObject/branches/0.11/docs/News.txt =================================================================== --- SQLObject/branches/0.11/docs/News.txt 2010-01-08 12:27:09 UTC (rev 4084) +++ SQLObject/branches/0.11/docs/News.txt 2010-01-08 21:23:52 UTC (rev 4085) @@ -10,6 +10,8 @@ SQLObject 0.11.3 ================ +Released 8 Jan 2010. + * Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose it's 'ascii'. |
|
From: <sub...@co...> - 2010-01-08 13:42:10
|
Author: phd Date: 2010-01-08 05:23:53 -0700 (Fri, 08 Jan 2010) New Revision: 4082 Added: SQLObject/tags/0.12.1/ Log: Tagging 0.12.1 Copied: SQLObject/tags/0.12.1 (from rev 4081, SQLObject/branches/0.12) |
|
From: <sub...@co...> - 2010-01-08 13:32:37
|
Author: phd Date: 2010-01-08 05:18:02 -0700 (Fri, 08 Jan 2010) New Revision: 4078 Added: SQLObject/tags/0.11.3/ Log: Tagging 0.11.3 Copied: SQLObject/tags/0.11.3 (from rev 4077, SQLObject/branches/0.11) |
|
From: <sub...@co...> - 2010-01-08 13:10:52
|
Author: phd
Date: 2010-01-08 05:19:49 -0700 (Fri, 08 Jan 2010)
New Revision: 4079
Modified:
SQLObject/branches/0.11/setup.py
Log:
Stable branch.
Modified: SQLObject/branches/0.11/setup.py
===================================================================
--- SQLObject/branches/0.11/setup.py 2010-01-08 12:18:02 UTC (rev 4078)
+++ SQLObject/branches/0.11/setup.py 2010-01-08 12:19:49 UTC (rev 4079)
@@ -48,7 +48,7 @@
],
author="Ian Bicking",
author_email="ia...@co...",
- url="http://sqlobject.org/devel/",
+ url="http://sqlobject.org/",
download_url="http://cheeseshop.python.org/pypi/SQLObject/0.11",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
|
|
From: <sub...@co...> - 2010-01-08 13:10:32
|
Author: phd
Date: 2010-01-08 05:21:11 -0700 (Fri, 08 Jan 2010)
New Revision: 4081
Modified:
SQLObject/tags/0.11.3/setup.cfg
SQLObject/tags/0.11.3/setup.py
SQLObject/tags/0.11.3/sqlobject/__init__.py
SQLObject/tags/0.11.3/sqlobject/main.py
Log:
Stable version 0.11.3.
Modified: SQLObject/tags/0.11.3/setup.cfg
===================================================================
--- SQLObject/tags/0.11.3/setup.cfg 2010-01-08 12:20:31 UTC (rev 4080)
+++ SQLObject/tags/0.11.3/setup.cfg 2010-01-08 12:21:11 UTC (rev 4081)
@@ -2,13 +2,6 @@
command_packages = buildutils.pudge_command,
buildutils.publish_command
-[easy_install]
-#find_links = http://svn.pythonpaste.org/package_index.html
-
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
-
[pudge]
theme = pythonpaste.org
docs = docs/index.txt docs/Authors.txt docs/DeveloperGuide.txt docs/FAQ.txt
Modified: SQLObject/tags/0.11.3/setup.py
===================================================================
--- SQLObject/tags/0.11.3/setup.py 2010-01-08 12:20:31 UTC (rev 4080)
+++ SQLObject/tags/0.11.3/setup.py 2010-01-08 12:21:11 UTC (rev 4081)
@@ -21,7 +21,7 @@
"""
setup(name="SQLObject",
- version="0.11",
+ version="0.11.3",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
@@ -48,8 +48,8 @@
],
author="Ian Bicking",
author_email="ia...@co...",
- url="http://sqlobject.org/devel/",
- download_url="http://cheeseshop.python.org/pypi/SQLObject/0.11",
+ url="http://sqlobject.org/",
+ download_url="http://cheeseshop.python.org/pypi/SQLObject/0.11.3",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin"],
Modified: SQLObject/tags/0.11.3/sqlobject/__init__.py
===================================================================
--- SQLObject/tags/0.11.3/sqlobject/__init__.py 2010-01-08 12:20:31 UTC (rev 4080)
+++ SQLObject/tags/0.11.3/sqlobject/__init__.py 2010-01-08 12:21:11 UTC (rev 4081)
@@ -1,5 +1,5 @@
"""
-SQLObject 0.11
+SQLObject 0.11.3
"""
from main import *
Modified: SQLObject/tags/0.11.3/sqlobject/main.py
===================================================================
--- SQLObject/tags/0.11.3/sqlobject/main.py 2010-01-08 12:20:31 UTC (rev 4080)
+++ SQLObject/tags/0.11.3/sqlobject/main.py 2010-01-08 12:21:11 UTC (rev 4081)
@@ -1,6 +1,6 @@
"""
-SQLObject 0.11
---------------
+SQLObject 0.11.3
+----------------
:author: Ian Bicking <ia...@co...>
|
|
From: <sub...@co...> - 2010-01-08 13:08:28
|
Author: phd
Date: 2010-01-08 05:27:09 -0700 (Fri, 08 Jan 2010)
New Revision: 4084
Modified:
SQLObject/tags/0.12.1/setup.cfg
SQLObject/tags/0.12.1/setup.py
SQLObject/tags/0.12.1/sqlobject/__init__.py
SQLObject/tags/0.12.1/sqlobject/main.py
Log:
Stable version 0.12.1.
Modified: SQLObject/tags/0.12.1/setup.cfg
===================================================================
--- SQLObject/tags/0.12.1/setup.cfg 2010-01-08 12:25:53 UTC (rev 4083)
+++ SQLObject/tags/0.12.1/setup.cfg 2010-01-08 12:27:09 UTC (rev 4084)
@@ -2,13 +2,6 @@
command_packages = buildutils.pudge_command,
buildutils.publish_command
-[easy_install]
-#find_links = http://svn.pythonpaste.org/package_index.html
-
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
-
[pudge]
theme = pythonpaste.org
docs = docs/index.txt docs/Authors.txt docs/DeveloperGuide.txt docs/FAQ.txt
Modified: SQLObject/tags/0.12.1/setup.py
===================================================================
--- SQLObject/tags/0.12.1/setup.py 2010-01-08 12:25:53 UTC (rev 4083)
+++ SQLObject/tags/0.12.1/setup.py 2010-01-08 12:27:09 UTC (rev 4084)
@@ -21,7 +21,7 @@
"""
setup(name="SQLObject",
- version="0.12",
+ version="0.12.1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
@@ -35,7 +35,7 @@
Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, MSSQL and MaxDB (SAPDB).
For development see the `subversion repository
-<http://svn.colorstudy.com/SQLObject/trunk#egg=SQLObject-0.12dev>`_
+<http://svn.colorstudy.com/SQLObject/trunk#egg=SQLObject-0.12>`_
""",
classifiers=[
"Development Status :: 5 - Production/Stable",
@@ -49,7 +49,7 @@
author="Ian Bicking",
author_email="ia...@co...",
url="http://sqlobject.org/",
- download_url="http://cheeseshop.python.org/pypi/SQLObject/",
+ download_url="http://cheeseshop.python.org/pypi/SQLObject/0.12.1",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin"],
Modified: SQLObject/tags/0.12.1/sqlobject/__init__.py
===================================================================
--- SQLObject/tags/0.12.1/sqlobject/__init__.py 2010-01-08 12:25:53 UTC (rev 4083)
+++ SQLObject/tags/0.12.1/sqlobject/__init__.py 2010-01-08 12:27:09 UTC (rev 4084)
@@ -1,5 +1,5 @@
"""
-SQLObject 0.12
+SQLObject 0.12.1
"""
from col import *
Modified: SQLObject/tags/0.12.1/sqlobject/main.py
===================================================================
--- SQLObject/tags/0.12.1/sqlobject/main.py 2010-01-08 12:25:53 UTC (rev 4083)
+++ SQLObject/tags/0.12.1/sqlobject/main.py 2010-01-08 12:27:09 UTC (rev 4084)
@@ -1,6 +1,6 @@
"""
-SQLObject 0.12
---------------
+SQLObject 0.12.1
+----------------
:author: Ian Bicking <ia...@co...>
|
|
From: <sub...@co...> - 2010-01-08 13:01:06
|
Author: phd
Date: 2010-01-08 05:20:31 -0700 (Fri, 08 Jan 2010)
New Revision: 4080
Modified:
SQLObject/branches/0.12/setup.py
Log:
Stable branch.
Modified: SQLObject/branches/0.12/setup.py
===================================================================
--- SQLObject/branches/0.12/setup.py 2010-01-08 12:19:49 UTC (rev 4079)
+++ SQLObject/branches/0.12/setup.py 2010-01-08 12:20:31 UTC (rev 4080)
@@ -48,7 +48,7 @@
],
author="Ian Bicking",
author_email="ia...@co...",
- url="http://sqlobject.org/devel/",
+ url="http://sqlobject.org/",
download_url="http://cheeseshop.python.org/pypi/SQLObject/",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
|
|
From: <sub...@co...> - 2010-01-08 12:39:07
|
Author: phd Date: 2010-01-08 05:25:53 -0700 (Fri, 08 Jan 2010) New Revision: 4083 Modified: SQLObject/branches/0.12/setup.py Log: Fixed download URL. Modified: SQLObject/branches/0.12/setup.py =================================================================== --- SQLObject/branches/0.12/setup.py 2010-01-08 12:23:53 UTC (rev 4082) +++ SQLObject/branches/0.12/setup.py 2010-01-08 12:25:53 UTC (rev 4083) @@ -35,7 +35,7 @@ Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, MSSQL and MaxDB (SAPDB). For development see the `subversion repository -<http://svn.colorstudy.com/SQLObject/trunk#egg=SQLObject-0.12dev>`_ +<http://svn.colorstudy.com/SQLObject/trunk#egg=SQLObject-0.12>`_ """, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -49,7 +49,7 @@ author="Ian Bicking", author_email="ia...@co...", url="http://sqlobject.org/", - download_url="http://cheeseshop.python.org/pypi/SQLObject/", + download_url="http://cheeseshop.python.org/pypi/SQLObject/0.12", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], |
|
From: <sub...@co...> - 2010-01-08 12:08:10
|
Author: phd
Date: 2010-01-08 04:39:19 -0700 (Fri, 08 Jan 2010)
New Revision: 4077
Modified:
SQLObject/trunk/sqlobject/tests/test_comparison.py
Log:
Merged a bugfix from r4075.
Modified: SQLObject/trunk/sqlobject/tests/test_comparison.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_comparison.py 2010-01-08 11:39:02 UTC (rev 4076)
+++ SQLObject/trunk/sqlobject/tests/test_comparison.py 2010-01-08 11:39:19 UTC (rev 4077)
@@ -20,5 +20,3 @@
assert t1 == t3
assert t2 == t4
assert t1 <> t2
- assert t1 < t2
- assert not (t1 >= t2)
|
|
From: <sub...@co...> - 2010-01-08 12:08:08
|
Author: phd
Date: 2010-01-08 04:39:02 -0700 (Fri, 08 Jan 2010)
New Revision: 4076
Modified:
SQLObject/branches/0.12/sqlobject/tests/test_comparison.py
Log:
Merged a bugfix from r4075.
Modified: SQLObject/branches/0.12/sqlobject/tests/test_comparison.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/tests/test_comparison.py 2010-01-08 11:37:58 UTC (rev 4075)
+++ SQLObject/branches/0.12/sqlobject/tests/test_comparison.py 2010-01-08 11:39:02 UTC (rev 4076)
@@ -20,5 +20,3 @@
assert t1 == t3
assert t2 == t4
assert t1 <> t2
- assert t1 < t2
- assert not (t1 >= t2)
|
|
From: <sub...@co...> - 2010-01-08 11:38:11
|
Author: phd
Date: 2010-01-08 04:18:25 -0700 (Fri, 08 Jan 2010)
New Revision: 4072
Modified:
SQLObject/branches/0.11/sqlobject/col.py
SQLObject/branches/0.11/sqlobject/dbconnection.py
Log:
Default for getattr is None.
Modified: SQLObject/branches/0.11/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.11/sqlobject/col.py 2010-01-06 16:00:51 UTC (rev 4071)
+++ SQLObject/branches/0.11/sqlobject/col.py 2010-01-08 11:18:25 UTC (rev 4072)
@@ -513,7 +513,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -524,7 +524,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -1482,7 +1482,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/branches/0.11/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-01-06 16:00:51 UTC (rev 4071)
+++ SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-01-08 11:18:25 UTC (rev 4072)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ self.dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: <sub...@co...> - 2010-01-08 11:38:10
|
Author: phd
Date: 2010-01-08 04:19:21 -0700 (Fri, 08 Jan 2010)
New Revision: 4073
Modified:
SQLObject/branches/0.12/sqlobject/col.py
SQLObject/branches/0.12/sqlobject/dbconnection.py
Log:
Merged a bugfix from r4072.
Modified: SQLObject/branches/0.12/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/col.py 2010-01-08 11:18:25 UTC (rev 4072)
+++ SQLObject/branches/0.12/sqlobject/col.py 2010-01-08 11:19:21 UTC (rev 4073)
@@ -514,7 +514,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -525,7 +525,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -1485,7 +1485,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/branches/0.12/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-01-08 11:18:25 UTC (rev 4072)
+++ SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-01-08 11:19:21 UTC (rev 4073)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ self.dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: <sub...@co...> - 2010-01-08 11:38:07
|
Author: phd
Date: 2010-01-08 04:20:08 -0700 (Fri, 08 Jan 2010)
New Revision: 4074
Modified:
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/dbconnection.py
Log:
Merged a bugfix from r4072.
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2010-01-08 11:19:21 UTC (rev 4073)
+++ SQLObject/trunk/sqlobject/col.py 2010-01-08 11:20:08 UTC (rev 4074)
@@ -514,7 +514,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -525,7 +525,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
return value.encode(dbEncoding)
return value
@@ -1485,7 +1485,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2010-01-08 11:19:21 UTC (rev 4073)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2010-01-08 11:20:08 UTC (rev 4074)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
+ self.dbEncoding = getattr(connection, "dbEncoding", None) or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: <sub...@co...> - 2010-01-08 11:38:05
|
Author: phd
Date: 2010-01-08 04:37:58 -0700 (Fri, 08 Jan 2010)
New Revision: 4075
Modified:
SQLObject/branches/0.11/sqlobject/tests/test_comparison.py
Log:
Removed lt/gt/le/ge comparison - they are undefined.
Modified: SQLObject/branches/0.11/sqlobject/tests/test_comparison.py
===================================================================
--- SQLObject/branches/0.11/sqlobject/tests/test_comparison.py 2010-01-08 11:20:08 UTC (rev 4074)
+++ SQLObject/branches/0.11/sqlobject/tests/test_comparison.py 2010-01-08 11:37:58 UTC (rev 4075)
@@ -20,5 +20,3 @@
assert t1 == t3
assert t2 == t4
assert t1 <> t2
- assert t1 < t2
- assert not (t1 >= t2)
|
|
From: SourceForge.net <no...@so...> - 2010-01-06 16:01:41
|
Bugs item #2924991, was opened at 2010-01-02 22:12 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2924991&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: General Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytman (phd) Summary: Fails in col.py if DBMS does not specify encoding Initial Comment: If the DBMS does not have an encoding specified then SQLObject fails in col.py complaining that the 2nd parameter must be a string not None. This situation could easily exist in databases migrated from MySQL 3.x. The solution seems to be to add a test in the 'from_python' method of StringValidator'. I put it after the call to getattr. if dbEncoding == None: dbEncoding = 'ascii' Code was added via SQLObject-0.12.0-py2.6.egg ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2010-01-06 19:01 Message: Fixed in the revisions 4069-4071 in the form dbEncoding = getattr(connection, "dbEncoding") or "ascii" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2924991&group_id=74338 |
|
From: <sub...@co...> - 2010-01-06 16:01:01
|
Author: phd
Date: 2010-01-06 09:00:51 -0700 (Wed, 06 Jan 2010)
New Revision: 4071
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/dbconnection.py
Log:
Merged a bugfix from revision 4069 - if dbEncoding is None suppose it's 'ascii'.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2010-01-06 15:59:10 UTC (rev 4070)
+++ SQLObject/trunk/docs/News.txt 2010-01-06 16:00:51 UTC (rev 4071)
@@ -15,7 +15,7 @@
* Fixed three bugs in PostgresConnection.
-* A change ported from `SQLObject 0.11.3`_.
+* A number of changes ported from `SQLObject 0.11.3`_.
SQLObject 0.12
==============
@@ -70,6 +70,9 @@
SQLObject 0.11.3
================
+* Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose
+ it's 'ascii'.
+
* Fixed a bug in FirebirdConnection.
* A change ported from `SQLObject 0.10.9`_.
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2010-01-06 15:59:10 UTC (rev 4070)
+++ SQLObject/trunk/sqlobject/col.py 2010-01-06 16:00:51 UTC (rev 4071)
@@ -514,7 +514,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -525,7 +525,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -1485,7 +1485,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2010-01-06 15:59:10 UTC (rev 4070)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2010-01-06 16:00:51 UTC (rev 4071)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: <sub...@co...> - 2010-01-06 15:59:16
|
Author: phd
Date: 2010-01-06 08:59:10 -0700 (Wed, 06 Jan 2010)
New Revision: 4070
Modified:
SQLObject/branches/0.12/docs/News.txt
SQLObject/branches/0.12/sqlobject/col.py
SQLObject/branches/0.12/sqlobject/dbconnection.py
Log:
Merged a bugfix from revision 4069 - if dbEncoding is None suppose it's 'ascii'.
Modified: SQLObject/branches/0.12/docs/News.txt
===================================================================
--- SQLObject/branches/0.12/docs/News.txt 2010-01-06 15:56:37 UTC (rev 4069)
+++ SQLObject/branches/0.12/docs/News.txt 2010-01-06 15:59:10 UTC (rev 4070)
@@ -12,7 +12,7 @@
* Fixed three bugs in PostgresConnection.
-* A change ported from `SQLObject 0.11.3`_.
+* A number of changes ported from `SQLObject 0.11.3`_.
SQLObject 0.12.0
================
@@ -67,6 +67,9 @@
SQLObject 0.11.3
================
+* Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose
+ it's 'ascii'.
+
* Fixed a bug in FirebirdConnection.
* A change ported from `SQLObject 0.10.9`_.
Modified: SQLObject/branches/0.12/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/col.py 2010-01-06 15:56:37 UTC (rev 4069)
+++ SQLObject/branches/0.12/sqlobject/col.py 2010-01-06 15:59:10 UTC (rev 4070)
@@ -514,7 +514,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -525,7 +525,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -1485,7 +1485,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/branches/0.12/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-01-06 15:56:37 UTC (rev 4069)
+++ SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-01-06 15:59:10 UTC (rev 4070)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: <sub...@co...> - 2010-01-06 15:56:45
|
Author: phd
Date: 2010-01-06 08:56:37 -0700 (Wed, 06 Jan 2010)
New Revision: 4069
Modified:
SQLObject/branches/0.11/docs/News.txt
SQLObject/branches/0.11/sqlobject/col.py
SQLObject/branches/0.11/sqlobject/dbconnection.py
Log:
Fixed a bug - if dbEncoding is None suppose it's 'ascii'.
Modified: SQLObject/branches/0.11/docs/News.txt
===================================================================
--- SQLObject/branches/0.11/docs/News.txt 2010-01-06 15:46:27 UTC (rev 4068)
+++ SQLObject/branches/0.11/docs/News.txt 2010-01-06 15:56:37 UTC (rev 4069)
@@ -10,6 +10,9 @@
SQLObject 0.11.3
================
+* Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose
+ it's 'ascii'.
+
* Fixed a bug in FirebirdConnection.
* A change ported from `SQLObject 0.10.9`_.
Modified: SQLObject/branches/0.11/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.11/sqlobject/col.py 2010-01-06 15:46:27 UTC (rev 4068)
+++ SQLObject/branches/0.11/sqlobject/col.py 2010-01-06 15:56:37 UTC (rev 4069)
@@ -513,7 +513,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -524,7 +524,7 @@
return value
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
return value.encode(dbEncoding)
return value
@@ -1482,7 +1482,7 @@
return None
if isinstance(value, unicode):
connection = state.soObject._connection
- dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ dbEncoding = getattr(connection, "dbEncoding") or "ascii"
value = value.encode(dbEncoding)
if isinstance(value, str):
return pickle.loads(value)
Modified: SQLObject/branches/0.11/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-01-06 15:46:27 UTC (rev 4068)
+++ SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-01-06 15:56:37 UTC (rev 4069)
@@ -31,7 +31,7 @@
def __init__(self, connection, loglevel):
# loglevel: None or empty string for stdout; or 'stderr'
self.loglevel = loglevel or "stdout"
- self.dbEncoding = getattr(connection, "dbEncoding", "ascii")
+ self.dbEncoding = getattr(connection, "dbEncoding") or "ascii"
def write(self, text):
logfile = getattr(sys, self.loglevel)
if isinstance(text, unicode):
|
|
From: SourceForge.net <no...@so...> - 2010-01-06 15:48:17
|
Bugs item #2923972, was opened at 2009-12-31 04:51 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2923972&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: dkeeney (dvkeeney) >Assigned to: Oleg Broytman (phd) Summary: query method on connection Initial Comment: In the end of makeConnection, in postgres/pg_connection.py, the method 'query' is called on the connection object. The connection object has just been created using a call to one or another DB API constructors, and the DB API spec does not have a 'query' method. As far as I know, the psycopg2 implementation does not have such a method either. I patched my copy by adding an hasattr call to verify the existence of 'query' method, but I suspect a better fix is to use method is .execute, so the end of makeConnection would be: dbEncoding = self.dbEncoding if dbEncoding: # and hasattr(conn,'query'): conn.execute("SET client_encoding TO %s",dbEncoding) return conn ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2010-01-06 18:48 Message: Fixed in the revisions 4067, 4068 (branch 0.12 and the trunk.) Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2923972&group_id=74338 |
|
From: <sub...@co...> - 2010-01-06 15:46:34
|
Author: phd
Date: 2010-01-06 08:46:27 -0700 (Wed, 06 Jan 2010)
New Revision: 4068
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/postgres/pgconnection.py
Log:
Merged a bugfix in PostgresConnection from revision 4067.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2010-01-06 15:44:05 UTC (rev 4067)
+++ SQLObject/trunk/docs/News.txt 2010-01-06 15:46:27 UTC (rev 4068)
@@ -13,7 +13,7 @@
SQLObject 0.12.1
================
-* Fixed two bugs in PostgresConnection.
+* Fixed three bugs in PostgresConnection.
* A change ported from `SQLObject 0.11.3`_.
Modified: SQLObject/trunk/sqlobject/postgres/pgconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/postgres/pgconnection.py 2010-01-06 15:44:05 UTC (rev 4067)
+++ SQLObject/trunk/sqlobject/postgres/pgconnection.py 2010-01-06 15:46:27 UTC (rev 4068)
@@ -131,12 +131,12 @@
# psycopg2 does not have an autocommit method.
if hasattr(conn, 'autocommit'):
conn.autocommit(1)
+ c = conn.cursor()
if self.schema:
- c = conn.cursor()
c.execute("SET search_path TO " + self.schema)
dbEncoding = self.dbEncoding
if dbEncoding:
- conn.query("SET client_encoding TO %s" % dbEncoding)
+ c.execute("SET client_encoding TO %s" % dbEncoding)
return conn
def _queryInsertID(self, conn, soInstance, id, names, values):
|
|
From: <sub...@co...> - 2010-01-06 15:44:14
|
Author: phd
Date: 2010-01-06 08:44:05 -0700 (Wed, 06 Jan 2010)
New Revision: 4067
Modified:
SQLObject/branches/0.12/docs/News.txt
SQLObject/branches/0.12/sqlobject/postgres/pgconnection.py
Log:
Fixed a bug in PostgresConnection.
Modified: SQLObject/branches/0.12/docs/News.txt
===================================================================
--- SQLObject/branches/0.12/docs/News.txt 2009-12-31 01:38:46 UTC (rev 4066)
+++ SQLObject/branches/0.12/docs/News.txt 2010-01-06 15:44:05 UTC (rev 4067)
@@ -10,7 +10,7 @@
SQLObject 0.12.1
================
-* Fixed two bugs in PostgresConnection.
+* Fixed three bugs in PostgresConnection.
* A change ported from `SQLObject 0.11.3`_.
Modified: SQLObject/branches/0.12/sqlobject/postgres/pgconnection.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/postgres/pgconnection.py 2009-12-31 01:38:46 UTC (rev 4066)
+++ SQLObject/branches/0.12/sqlobject/postgres/pgconnection.py 2010-01-06 15:44:05 UTC (rev 4067)
@@ -131,12 +131,12 @@
# psycopg2 does not have an autocommit method.
if hasattr(conn, 'autocommit'):
conn.autocommit(1)
+ c = conn.cursor()
if self.schema:
- c = conn.cursor()
c.execute("SET search_path TO " + self.schema)
dbEncoding = self.dbEncoding
if dbEncoding:
- conn.query("SET client_encoding TO %s" % dbEncoding)
+ c.execute("SET client_encoding TO %s" % dbEncoding)
return conn
def _queryInsertID(self, conn, soInstance, id, names, values):
|