sqlobject-cvs Mailing List for SQLObject (Page 85)
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...> - 2007-07-26 14:26:25
|
Author: phd Date: 2007-07-26 08:26:16 -0600 (Thu, 26 Jul 2007) New Revision: 2812 Added: SQLObject/tags/0.8.5/ Log: Tagging 0.8.5 Copied: SQLObject/tags/0.8.5 (from rev 2811, SQLObject/branches/0.8) |
|
From: <sub...@co...> - 2007-07-26 14:26:12
|
Author: phd
Date: 2007-07-26 08:26:06 -0600 (Thu, 26 Jul 2007)
New Revision: 2811
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/setup.py
Log:
SQLObject 0.8.5 released 25 July 2007.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-07-26 14:15:44 UTC (rev 2810)
+++ SQLObject/branches/0.8/docs/News.txt 2007-07-26 14:26:06 UTC (rev 2811)
@@ -10,6 +10,8 @@
SQLObject 0.8.5
===============
+Released 25 July 2007.
+
Bug Fixes
---------
@@ -179,6 +181,8 @@
SQLObject 0.7.8
===============
+Released 25 July 2007.
+
Bug Fixes
---------
Modified: SQLObject/branches/0.8/setup.py
===================================================================
--- SQLObject/branches/0.8/setup.py 2007-07-26 14:15:44 UTC (rev 2810)
+++ SQLObject/branches/0.8/setup.py 2007-07-26 14:26:06 UTC (rev 2811)
@@ -28,7 +28,7 @@
"""
setup(name="SQLObject",
- version="0.8.4",
+ version="0.8.5",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
|
|
From: <sub...@co...> - 2007-07-26 14:15:50
|
Author: phd Date: 2007-07-26 08:15:44 -0600 (Thu, 26 Jul 2007) New Revision: 2810 Modified: SQLObject/tags/0.7.8/setup.cfg Log: This is a stable release. Modified: SQLObject/tags/0.7.8/setup.cfg =================================================================== --- SQLObject/tags/0.7.8/setup.cfg 2007-07-26 14:14:23 UTC (rev 2809) +++ SQLObject/tags/0.7.8/setup.cfg 2007-07-26 14:15:44 UTC (rev 2810) @@ -1,7 +1,3 @@ -[egg_info] -tag_build = a -tag_svn_revision = true - [pudge] title = SQLObject dest = docs/html |
|
From: <sub...@co...> - 2007-07-26 14:14:27
|
Author: phd Date: 2007-07-26 08:14:23 -0600 (Thu, 26 Jul 2007) New Revision: 2809 Added: SQLObject/tags/0.7.8/ Log: Tagging 0.7.8 Copied: SQLObject/tags/0.7.8 (from rev 2808, SQLObject/branches/0.7) |
|
From: <sub...@co...> - 2007-07-26 14:12:32
|
Author: phd
Date: 2007-07-26 08:12:24 -0600 (Thu, 26 Jul 2007)
New Revision: 2808
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/setup.py
Log:
SQLObject 0.7.8 released 25 July 2007.
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-07-26 13:42:22 UTC (rev 2807)
+++ SQLObject/branches/0.7/docs/News.txt 2007-07-26 14:12:24 UTC (rev 2808)
@@ -10,6 +10,8 @@
SQLObject 0.7.8
===============
+Released 25 July 2007.
+
Bug Fixes
---------
Modified: SQLObject/branches/0.7/setup.py
===================================================================
--- SQLObject/branches/0.7/setup.py 2007-07-26 13:42:22 UTC (rev 2807)
+++ SQLObject/branches/0.7/setup.py 2007-07-26 14:12:24 UTC (rev 2808)
@@ -19,7 +19,7 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7.7",
+ version="0.7.8",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
@@ -52,7 +52,7 @@
author="Ian Bicking",
author_email="ia...@co...",
url="http://sqlobject.org",
- download_url="http://cheeseshop.python.org/pypi/SQLObject/0.7.7",
+ download_url="http://cheeseshop.python.org/pypi/SQLObject/0.7.8",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin"],
|
|
From: <sub...@co...> - 2007-07-26 13:42:30
|
Author: phd Date: 2007-07-26 07:42:22 -0600 (Thu, 26 Jul 2007) New Revision: 2807 Modified: SQLObject/branches/0.9/docs/News.txt Log: A number of bugfixes ported from `SQLObject 0.7.8`_ and `SQLObject 0.8.5`_. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2007-07-26 13:41:56 UTC (rev 2806) +++ SQLObject/branches/0.9/docs/News.txt 2007-07-26 13:42:22 UTC (rev 2807) @@ -15,6 +15,8 @@ * Fixed misspelled methods in col.py. +* A number of bugfixes ported from `SQLObject 0.7.8`_ and `SQLObject 0.8.5`_. + SQLObject 0.9.0 =============== @@ -82,6 +84,8 @@ * Suppress the second RowUpdateSignal in .set() called from ._SO_setValue(). +* A number of bugfixes ported from `SQLObject 0.7.8`_. + SQLObject 0.8.4 =============== |
|
From: <sub...@co...> - 2007-07-26 13:42:04
|
Author: phd Date: 2007-07-26 07:41:56 -0600 (Thu, 26 Jul 2007) New Revision: 2806 Modified: SQLObject/branches/0.8/docs/News.txt Log: A number of bugfixes ported from `SQLObject 0.7.8`_. Modified: SQLObject/branches/0.8/docs/News.txt =================================================================== --- SQLObject/branches/0.8/docs/News.txt 2007-07-25 20:45:53 UTC (rev 2805) +++ SQLObject/branches/0.8/docs/News.txt 2007-07-26 13:41:56 UTC (rev 2806) @@ -17,6 +17,8 @@ * Suppress the second RowUpdateSignal in .set() called from ._SO_setValue(). +* A number of bugfixes ported from `SQLObject 0.7.8`_. + SQLObject 0.8.4 =============== |
|
From: Dylan S. <a-1...@66...> - 2007-07-26 12:14:15
|
Hello! I am tired this evening. I am nice girl that would like to chat with you. Email me at ku...@li... only, because I am writing not from my personal email. If you would like to see my pictures. |
|
From: <sub...@co...> - 2007-07-25 19:10:31
|
Author: phd
Date: 2007-07-25 13:10:27 -0600 (Wed, 25 Jul 2007)
New Revision: 2802
Modified:
SQLObject/trunk/sqlobject/main.py
Log:
Removed trailing spaces.
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2007-07-25 19:09:47 UTC (rev 2801)
+++ SQLObject/trunk/sqlobject/main.py 2007-07-25 19:10:27 UTC (rev 2802)
@@ -1277,7 +1277,6 @@
post_funcs = []
kw = dict([('class', self.__class__), ('id', id)])
self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs)
-
for func in post_funcs:
func(self)
|
|
From: <sub...@co...> - 2007-07-25 19:09:53
|
Author: phd
Date: 2007-07-25 13:09:47 -0600 (Wed, 25 Jul 2007)
New Revision: 2801
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/main.py
Log:
Run post_funcs after sending RowCreatedSignal.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-07-25 19:09:28 UTC (rev 2800)
+++ SQLObject/branches/0.9/docs/News.txt 2007-07-25 19:09:47 UTC (rev 2801)
@@ -78,6 +78,8 @@
Bug Fixes
---------
+* Run post_funcs after sending RowCreatedSignal.
+
* Suppress the second RowUpdateSignal in .set() called from ._SO_setValue().
SQLObject 0.8.4
Modified: SQLObject/branches/0.9/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/main.py 2007-07-25 19:09:28 UTC (rev 2800)
+++ SQLObject/branches/0.9/sqlobject/main.py 2007-07-25 19:09:47 UTC (rev 2801)
@@ -1277,8 +1277,9 @@
post_funcs = []
kw = dict([('class', self.__class__), ('id', id)])
self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs)
+ for func in post_funcs:
+ func(self)
-
def _SO_getID(self, obj):
return getID(obj)
|
|
From: <sub...@co...> - 2007-07-25 19:09:32
|
Author: phd
Date: 2007-07-25 13:09:28 -0600 (Wed, 25 Jul 2007)
New Revision: 2800
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/main.py
Log:
Run post_funcs after sending RowCreatedSignal.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-07-25 19:02:15 UTC (rev 2799)
+++ SQLObject/branches/0.8/docs/News.txt 2007-07-25 19:09:28 UTC (rev 2800)
@@ -13,6 +13,8 @@
Bug Fixes
---------
+* Run post_funcs after sending RowCreatedSignal.
+
* Suppress the second RowUpdateSignal in .set() called from ._SO_setValue().
SQLObject 0.8.4
Modified: SQLObject/branches/0.8/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/main.py 2007-07-25 19:02:15 UTC (rev 2799)
+++ SQLObject/branches/0.8/sqlobject/main.py 2007-07-25 19:09:28 UTC (rev 2800)
@@ -1293,8 +1293,9 @@
post_funcs = []
kw = dict([('class', self.__class__), ('id', id)])
self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs)
+ for func in post_funcs:
+ func(self)
-
def _SO_getID(self, obj):
return getID(obj)
|
|
From: SourceForge.net <no...@so...> - 2007-07-25 19:02:20
|
Bugs item #1759920, was opened at 2007-07-25 01:14 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&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: None >Status: Closed >Resolution: Fixed Priority: 3 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Oleg Broytmann (phd) Summary: SQLObject quotes improperly with PostgreSQL Initial Comment: Attempting to create a new object where a string field contains a single quote (') in a PostgreSQL 8.2.3 database fails due to improper quoting. PostgreSQL expects single quotes to be quoted using a single quote (e.g., 'Ba''r'), not a backslash. This problem occurred with both SQLObject 0.8.1 and 0.10dev_r2787. [mejis ~]$ uname -a Darwin mejis.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 [mejis ~]$ psql --version psql (PostgreSQL) 8.2.3 contains support for command-line editing [mejis ~]$ python -V Python 2.4.4 [mejis ~]$ python Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from sqlobject import * >>> conn = connectionForURI('postgres://postgres@localhost/scratch') >>> class Foo(SQLObject): ... name = StringCol() ... >>> Foo.createTable() [] >>> Foo(name='Bar') <Foo 1L name='Bar'> >>> Foo(name="Ba'r") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/declarative.py", line 98, in _wrapper return fn(self, *args, **kwargs) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1218, in __init__ self._create(id, **kw) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1249, in _create self._SO_finishCreate(id) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1273, in _SO_finishCreate id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 396, in queryInsertID return self._runWithConnection(self._queryInsertID, soInstance, id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 255, in _runWithConnection val = meth(conn, *args) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/postgres/pgconnection.py", line 136, in _queryInsertID c.execute(q) psycopg2.ProgrammingError: syntax error at or near "c" LINE 1: INSERT INTO foo (id, name) VALUES (7, 'Ba\'r') ^ >>> ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-07-25 23:02 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revisions 2795-2799 (branches 0.7, 0.8, the trunk and docs.) Will be in the next round of releases. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-07-25 18:49 Message: Logged In: YES user_id=4799 Originator: NO It is not a bug in SQLObject but a problem with PostgreSQL that at version 8.0 changed quoting style from \' to ''. It is impossible for SQLObject to support both old and new styles simultaneously. So you have to wait while SQLObject stops supporting Postgres 7. Meanwhile reconfigure PostgreSQL to support \' quoting style. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&group_id=74338 |
|
From: <sub...@co...> - 2007-07-25 19:02:18
|
Author: phd Date: 2007-07-25 13:02:15 -0600 (Wed, 25 Jul 2007) New Revision: 2799 Modified: SQLObject/docs/News.txt Log: Changed string quoting style for PostgreSQL and MySQL from \' to ''. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-25 19:01:44 UTC (rev 2798) +++ SQLObject/docs/News.txt 2007-07-25 19:02:15 UTC (rev 2799) @@ -295,6 +295,11 @@ * Fixed a bug in converting date/time for years < 1000 (time.strptime() requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded). +Other Changes +------------- + +* Changed string quoting style for PostgreSQL and MySQL from \' to ''. + SQLObject 0.7.7 =============== |
|
From: <sub...@co...> - 2007-07-25 19:01:49
|
Author: phd
Date: 2007-07-25 13:01:44 -0600 (Wed, 25 Jul 2007)
New Revision: 2798
Modified:
SQLObject/trunk/sqlobject/converters.py
SQLObject/trunk/sqlobject/tests/test_converters.py
Log:
Changed string quoting style for PostgreSQL and MySQL from \' to ''.
Modified: SQLObject/trunk/sqlobject/converters.py
===================================================================
--- SQLObject/trunk/sqlobject/converters.py 2007-07-25 19:00:59 UTC (rev 2797)
+++ SQLObject/trunk/sqlobject/converters.py 2007-07-25 19:01:44 UTC (rev 2798)
@@ -55,14 +55,14 @@
########################################
sqlStringReplace = [
+ ("'", "''"),
('\\', '\\\\'),
- ("'", "\\'"),
('\000', '\\0'),
('\b', '\\b'),
('\n', '\\n'),
('\r', '\\r'),
('\t', '\\t'),
- ]
+]
def isoStr(val):
"""
@@ -109,10 +109,10 @@
elif isinstance(value, buffer_type):
value = str(value)
- if db in ('mysql', 'postgres'):
+ if db == 'postgres':
for orig, repl in sqlStringReplace:
value = value.replace(orig, repl)
- elif db in ('sqlite', 'firebird', 'sybase', 'maxdb', 'mssql'):
+ elif db in ('sqlite', 'mysql', 'firebird', 'sybase', 'maxdb', 'mssql'):
value = value.replace("'", "''")
else:
assert 0, "Database %s unknown" % db
Modified: SQLObject/trunk/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_converters.py 2007-07-25 19:00:59 UTC (rev 2797)
+++ SQLObject/trunk/sqlobject/tests/test_converters.py 2007-07-25 19:01:44 UTC (rev 2798)
@@ -55,7 +55,7 @@
assert sqlrepr('A String\000Another', 'postgres') == "'A String\\0Another'"
def test_string_():
- assert sqlrepr('A String\'Another', 'postgres') == "'A String\\'Another'"
+ assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
assert sqlrepr('A String\'Another', 'firebird') == "'A String''Another'"
def test_simple_unicode():
|
|
From: <sub...@co...> - 2007-07-25 19:01:05
|
Author: phd
Date: 2007-07-25 13:00:59 -0600 (Wed, 25 Jul 2007)
New Revision: 2797
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/converters.py
SQLObject/branches/0.9/sqlobject/tests/test_converters.py
Log:
Changed string quoting style for PostgreSQL and MySQL from \' to ''.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-07-25 19:00:15 UTC (rev 2796)
+++ SQLObject/branches/0.9/docs/News.txt 2007-07-25 19:00:59 UTC (rev 2797)
@@ -263,6 +263,11 @@
* Fixed a bug in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+Other Changes
+-------------
+
+* Changed string quoting style for PostgreSQL and MySQL from \' to ''.
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.9/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/converters.py 2007-07-25 19:00:15 UTC (rev 2796)
+++ SQLObject/branches/0.9/sqlobject/converters.py 2007-07-25 19:00:59 UTC (rev 2797)
@@ -55,14 +55,14 @@
########################################
sqlStringReplace = [
+ ("'", "''"),
('\\', '\\\\'),
- ("'", "\\'"),
('\000', '\\0'),
('\b', '\\b'),
('\n', '\\n'),
('\r', '\\r'),
('\t', '\\t'),
- ]
+]
def isoStr(val):
"""
@@ -109,10 +109,10 @@
elif isinstance(value, buffer_type):
value = str(value)
- if db in ('mysql', 'postgres'):
+ if db == 'postgres':
for orig, repl in sqlStringReplace:
value = value.replace(orig, repl)
- elif db in ('sqlite', 'firebird', 'sybase', 'maxdb', 'mssql'):
+ elif db in ('sqlite', 'mysql', 'firebird', 'sybase', 'maxdb', 'mssql'):
value = value.replace("'", "''")
else:
assert 0, "Database %s unknown" % db
Modified: SQLObject/branches/0.9/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/tests/test_converters.py 2007-07-25 19:00:15 UTC (rev 2796)
+++ SQLObject/branches/0.9/sqlobject/tests/test_converters.py 2007-07-25 19:00:59 UTC (rev 2797)
@@ -55,7 +55,7 @@
assert sqlrepr('A String\000Another', 'postgres') == "'A String\\0Another'"
def test_string_():
- assert sqlrepr('A String\'Another', 'postgres') == "'A String\\'Another'"
+ assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
assert sqlrepr('A String\'Another', 'firebird') == "'A String''Another'"
def test_simple_unicode():
|
|
From: <sub...@co...> - 2007-07-25 19:00:21
|
Author: phd
Date: 2007-07-25 13:00:15 -0600 (Wed, 25 Jul 2007)
New Revision: 2796
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/converters.py
SQLObject/branches/0.8/sqlobject/tests/test_converters.py
Log:
Changed string quoting style for PostgreSQL and MySQL from \' to ''.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-07-25 18:59:38 UTC (rev 2795)
+++ SQLObject/branches/0.8/docs/News.txt 2007-07-25 19:00:15 UTC (rev 2796)
@@ -198,6 +198,11 @@
* Fixed a bug in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+Other Changes
+-------------
+
+* Changed string quoting style for PostgreSQL and MySQL from \' to ''.
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.8/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/converters.py 2007-07-25 18:59:38 UTC (rev 2795)
+++ SQLObject/branches/0.8/sqlobject/converters.py 2007-07-25 19:00:15 UTC (rev 2796)
@@ -55,14 +55,14 @@
########################################
sqlStringReplace = [
+ ("'", "''"),
('\\', '\\\\'),
- ("'", "\\'"),
('\000', '\\0'),
('\b', '\\b'),
('\n', '\\n'),
('\r', '\\r'),
('\t', '\\t'),
- ]
+]
def isoStr(val):
"""
@@ -109,10 +109,10 @@
elif isinstance(value, buffer_type):
value = str(value)
- if db in ('mysql', 'postgres'):
+ if db == 'postgres':
for orig, repl in sqlStringReplace:
value = value.replace(orig, repl)
- elif db in ('sqlite', 'firebird', 'sybase', 'maxdb', 'mssql'):
+ elif db in ('sqlite', 'mysql', 'firebird', 'sybase', 'maxdb', 'mssql'):
value = value.replace("'", "''")
else:
assert 0, "Database %s unknown" % db
Modified: SQLObject/branches/0.8/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/tests/test_converters.py 2007-07-25 18:59:38 UTC (rev 2795)
+++ SQLObject/branches/0.8/sqlobject/tests/test_converters.py 2007-07-25 19:00:15 UTC (rev 2796)
@@ -55,7 +55,7 @@
assert sqlrepr('A String\000Another', 'postgres') == "'A String\\0Another'"
def test_string_():
- assert sqlrepr('A String\'Another', 'postgres') == "'A String\\'Another'"
+ assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
assert sqlrepr('A String\'Another', 'firebird') == "'A String''Another'"
def test_simple_unicode():
|
|
From: <sub...@co...> - 2007-07-25 18:59:48
|
Author: phd
Date: 2007-07-25 12:59:38 -0600 (Wed, 25 Jul 2007)
New Revision: 2795
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/sqlobject/converters.py
SQLObject/branches/0.7/sqlobject/tests/test_converters.py
Log:
Changed string quoting style for PostgreSQL and MySQL from \' to ''.
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-07-23 14:29:16 UTC (rev 2794)
+++ SQLObject/branches/0.7/docs/News.txt 2007-07-25 18:59:38 UTC (rev 2795)
@@ -33,6 +33,11 @@
* Fixed a bug in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+Other Changes
+-------------
+
+* Changed string quoting style for PostgreSQL and MySQL from \' to ''.
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.7/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/converters.py 2007-07-23 14:29:16 UTC (rev 2794)
+++ SQLObject/branches/0.7/sqlobject/converters.py 2007-07-25 18:59:38 UTC (rev 2795)
@@ -55,14 +55,14 @@
########################################
sqlStringReplace = [
+ ("'", "''"),
('\\', '\\\\'),
- ("'", "\\'"),
('\000', '\\0'),
('\b', '\\b'),
('\n', '\\n'),
('\r', '\\r'),
('\t', '\\t'),
- ]
+]
def isoStr(val):
"""
@@ -109,10 +109,10 @@
elif isinstance(value, buffer_type):
value = str(value)
- if db in ('mysql', 'postgres'):
+ if db == 'postgres':
for orig, repl in sqlStringReplace:
value = value.replace(orig, repl)
- elif db in ('sqlite', 'firebird', 'sybase', 'maxdb', 'mssql'):
+ elif db in ('sqlite', 'mysql', 'firebird', 'sybase', 'maxdb', 'mssql'):
value = value.replace("'", "''")
else:
assert 0, "Database %s unknown" % db
Modified: SQLObject/branches/0.7/sqlobject/tests/test_converters.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/tests/test_converters.py 2007-07-23 14:29:16 UTC (rev 2794)
+++ SQLObject/branches/0.7/sqlobject/tests/test_converters.py 2007-07-25 18:59:38 UTC (rev 2795)
@@ -55,7 +55,7 @@
assert sqlrepr('A String\000Another', 'postgres') == "'A String\\0Another'"
def test_string_():
- assert sqlrepr('A String\'Another', 'postgres') == "'A String\\'Another'"
+ assert sqlrepr('A String\tAnother', 'postgres') == "'A String\\tAnother'"
assert sqlrepr('A String\'Another', 'firebird') == "'A String''Another'"
def test_simple_unicode():
|
|
From: Juan G. <a-...@7t...> - 2007-07-25 18:01:43
|
Hello! I am tired this evening. I am nice girl that would like to chat with you. Email me at ax...@li... only, because I am writing not from my personal email. I want to show you some pictures. |
|
From: SourceForge.net <no...@so...> - 2007-07-25 14:49:33
|
Bugs item #1759920, was opened at 2007-07-25 01:14 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&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: None Status: Open >Resolution: Postponed >Priority: 3 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytmann (phd) Summary: SQLObject quotes improperly with PostgreSQL Initial Comment: Attempting to create a new object where a string field contains a single quote (') in a PostgreSQL 8.2.3 database fails due to improper quoting. PostgreSQL expects single quotes to be quoted using a single quote (e.g., 'Ba''r'), not a backslash. This problem occurred with both SQLObject 0.8.1 and 0.10dev_r2787. [mejis ~]$ uname -a Darwin mejis.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 [mejis ~]$ psql --version psql (PostgreSQL) 8.2.3 contains support for command-line editing [mejis ~]$ python -V Python 2.4.4 [mejis ~]$ python Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from sqlobject import * >>> conn = connectionForURI('postgres://postgres@localhost/scratch') >>> class Foo(SQLObject): ... name = StringCol() ... >>> Foo.createTable() [] >>> Foo(name='Bar') <Foo 1L name='Bar'> >>> Foo(name="Ba'r") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/declarative.py", line 98, in _wrapper return fn(self, *args, **kwargs) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1218, in __init__ self._create(id, **kw) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1249, in _create self._SO_finishCreate(id) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1273, in _SO_finishCreate id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 396, in queryInsertID return self._runWithConnection(self._queryInsertID, soInstance, id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 255, in _runWithConnection val = meth(conn, *args) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/postgres/pgconnection.py", line 136, in _queryInsertID c.execute(q) psycopg2.ProgrammingError: syntax error at or near "c" LINE 1: INSERT INTO foo (id, name) VALUES (7, 'Ba\'r') ^ >>> ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-07-25 18:49 Message: Logged In: YES user_id=4799 Originator: NO It is not a bug in SQLObject but a problem with PostgreSQL that at version 8.0 changed quoting style from \' to ''. It is impossible for SQLObject to support both old and new styles simultaneously. So you have to wait while SQLObject stops supporting Postgres 7. Meanwhile reconfigure PostgreSQL to support \' quoting style. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-07-24 21:14:12
|
Bugs item #1759920, was opened at 2007-07-24 14:14 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&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: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: SQLObject quotes improperly with PostgreSQL Initial Comment: Attempting to create a new object where a string field contains a single quote (') in a PostgreSQL 8.2.3 database fails due to improper quoting. PostgreSQL expects single quotes to be quoted using a single quote (e.g., 'Ba''r'), not a backslash. This problem occurred with both SQLObject 0.8.1 and 0.10dev_r2787. [mejis ~]$ uname -a Darwin mejis.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 [mejis ~]$ psql --version psql (PostgreSQL) 8.2.3 contains support for command-line editing [mejis ~]$ python -V Python 2.4.4 [mejis ~]$ python Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from sqlobject import * >>> conn = connectionForURI('postgres://postgres@localhost/scratch') >>> class Foo(SQLObject): ... name = StringCol() ... >>> Foo.createTable() [] >>> Foo(name='Bar') <Foo 1L name='Bar'> >>> Foo(name="Ba'r") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/declarative.py", line 98, in _wrapper return fn(self, *args, **kwargs) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1218, in __init__ self._create(id, **kw) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1249, in _create self._SO_finishCreate(id) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/main.py", line 1273, in _SO_finishCreate id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 396, in queryInsertID return self._runWithConnection(self._queryInsertID, soInstance, id, names, values) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/dbconnection.py", line 255, in _runWithConnection val = meth(conn, *args) File "/Library/Python/lib/python2.4/SQLObject-0.10dev_r2787-py2.4.egg/sqlobject/postgres/pgconnection.py", line 136, in _queryInsertID c.execute(q) psycopg2.ProgrammingError: syntax error at or near "c" LINE 1: INSERT INTO foo (id, name) VALUES (7, 'Ba\'r') ^ >>> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1759920&group_id=74338 |
|
From: <sub...@co...> - 2007-07-23 14:29:21
|
Author: phd Date: 2007-07-23 08:29:16 -0600 (Mon, 23 Jul 2007) New Revision: 2794 Modified: SQLObject/docs/TODO.txt Log: Python 2.2 has been deprecated. logging is being used now. Modified: SQLObject/docs/TODO.txt =================================================================== --- SQLObject/docs/TODO.txt 2007-07-23 14:29:02 UTC (rev 2793) +++ SQLObject/docs/TODO.txt 2007-07-23 14:29:16 UTC (rev 2794) @@ -33,9 +33,6 @@ * Refactor ``DBConnection`` to use parameterized queries instead of generating query strings. -* Deprecate support for Python 2.2. Start using logging instead of print - for debugging output. - * A hierarchy of exceptions. SQLObject should translate exceptions from low-level drivers to a consistent set of high-level exceptions. |
|
From: <sub...@co...> - 2007-07-23 14:29:06
|
Author: phd Date: 2007-07-23 08:29:02 -0600 (Mon, 23 Jul 2007) New Revision: 2793 Modified: SQLObject/branches/0.9/docs/TODO.txt Log: Python 2.2 has been deprecated. logging is being used now. Modified: SQLObject/branches/0.9/docs/TODO.txt =================================================================== --- SQLObject/branches/0.9/docs/TODO.txt 2007-07-23 14:26:10 UTC (rev 2792) +++ SQLObject/branches/0.9/docs/TODO.txt 2007-07-23 14:29:02 UTC (rev 2793) @@ -33,9 +33,6 @@ * Refactor ``DBConnection`` to use parameterized queries instead of generating query strings. -* Deprecate support for Python 2.2. Start using logging instead of print - for debugging output. - * A hierarchy of exceptions. SQLObject should translate exceptions from low-level drivers to a consistent set of high-level exceptions. |
|
From: <sub...@co...> - 2007-07-23 14:26:16
|
Author: phd Date: 2007-07-23 08:26:10 -0600 (Mon, 23 Jul 2007) New Revision: 2792 Modified: SQLObject/docs/TODO.txt Log: Events (signals) have been implemented and documented. Modified: SQLObject/docs/TODO.txt =================================================================== --- SQLObject/docs/TODO.txt 2007-07-23 14:25:54 UTC (rev 2791) +++ SQLObject/docs/TODO.txt 2007-07-23 14:26:10 UTC (rev 2792) @@ -20,10 +20,10 @@ * Profile of SQLObject performance, so that I can identify bottlenecks. -* Increase hooks with FormEncode (unreleased) validation and form - generation package, so SQLObject classes (read: schemas) can be - published for editing more directly and easily. (First step: get - Schema-generating method into sqlmeta class) +* Increase hooks with FormEncode validation and form generation package, so + SQLObject classes (read: schemas) can be published for editing more + directly and easily. (First step: get Schema-generating method into + sqlmeta class) * Automatic joins in select queries. @@ -36,10 +36,6 @@ * Deprecate support for Python 2.2. Start using logging instead of print for debugging output. -* Event system. This will effect columns; patterns like ``onUpdate`` - methods and whatnot. Probably will use PyDispatcher: - http://pydispatcher.sourceforge.net/ - * A hierarchy of exceptions. SQLObject should translate exceptions from low-level drivers to a consistent set of high-level exceptions. |
|
From: <sub...@co...> - 2007-07-23 14:25:58
|
Author: phd Date: 2007-07-23 08:25:54 -0600 (Mon, 23 Jul 2007) New Revision: 2791 Modified: SQLObject/branches/0.9/docs/TODO.txt Log: Events (signals) have been implemented and documented. Modified: SQLObject/branches/0.9/docs/TODO.txt =================================================================== --- SQLObject/branches/0.9/docs/TODO.txt 2007-07-23 14:25:40 UTC (rev 2790) +++ SQLObject/branches/0.9/docs/TODO.txt 2007-07-23 14:25:54 UTC (rev 2791) @@ -20,10 +20,10 @@ * Profile of SQLObject performance, so that I can identify bottlenecks. -* Increase hooks with FormEncode (unreleased) validation and form - generation package, so SQLObject classes (read: schemas) can be - published for editing more directly and easily. (First step: get - Schema-generating method into sqlmeta class) +* Increase hooks with FormEncode validation and form generation package, so + SQLObject classes (read: schemas) can be published for editing more + directly and easily. (First step: get Schema-generating method into + sqlmeta class) * Automatic joins in select queries. @@ -36,10 +36,6 @@ * Deprecate support for Python 2.2. Start using logging instead of print for debugging output. -* Event system. This will effect columns; patterns like ``onUpdate`` - methods and whatnot. Probably will use PyDispatcher: - http://pydispatcher.sourceforge.net/ - * A hierarchy of exceptions. SQLObject should translate exceptions from low-level drivers to a consistent set of high-level exceptions. |
|
From: <sub...@co...> - 2007-07-23 14:25:44
|
Author: phd Date: 2007-07-23 08:25:40 -0600 (Mon, 23 Jul 2007) New Revision: 2790 Modified: SQLObject/branches/0.8/docs/TODO.txt Log: Events (signals) have been implemented and documented. Modified: SQLObject/branches/0.8/docs/TODO.txt =================================================================== --- SQLObject/branches/0.8/docs/TODO.txt 2007-07-23 14:22:11 UTC (rev 2789) +++ SQLObject/branches/0.8/docs/TODO.txt 2007-07-23 14:25:40 UTC (rev 2790) @@ -20,10 +20,10 @@ * Profile of SQLObject performance, so that I can identify bottlenecks. -* Increase hooks with FormEncode (unreleased) validation and form - generation package, so SQLObject classes (read: schemas) can be - published for editing more directly and easily. (First step: get - Schema-generating method into sqlmeta class) +* Increase hooks with FormEncode validation and form generation package, so + SQLObject classes (read: schemas) can be published for editing more + directly and easily. (First step: get Schema-generating method into + sqlmeta class) * Automatic joins in select queries. @@ -36,10 +36,6 @@ * Deprecate support for Python 2.2. Start using logging instead of print for debugging output. -* Event system. This will effect columns; patterns like ``onUpdate`` - methods and whatnot. Probably will use PyDispatcher: - http://pydispatcher.sourceforge.net/ - * A hierarchy of exceptions. SQLObject should translate exceptions from low-level drivers to a consistent set of high-level exceptions. |