sqlobject-cvs Mailing List for SQLObject (Page 34)
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
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sub...@co...> - 2011-11-05 13:45:46
|
Author: phd Date: Sat Nov 5 07:45:37 2011 New Revision: 4469 Log: Branch 1.2 Added: SQLObject/branches/1.2/ - copied from r4468, SQLObject/trunk/ |
From: <sub...@co...> - 2011-11-02 19:11:02
|
Author: phd Date: Wed Nov 2 13:10:55 2011 New Revision: 4468 Log: Fixed bashism "export var=value" => "var=value; export var". Modified: SQLObject/trunk/docs/rebuild Modified: SQLObject/trunk/docs/rebuild ============================================================================== --- SQLObject/trunk/docs/rebuild Wed Nov 2 13:09:14 2011 (r4467) +++ SQLObject/trunk/docs/rebuild Wed Nov 2 13:10:55 2011 (r4468) @@ -1,9 +1,10 @@ -#!/bin/sh +#! /bin/sh here=`pwd` parent=`dirname "$here"` echo "Adding $parent to \$PYTHONPATH" -export PYTHONPATH="$parent${PYTHONPATH:+:$PYTHONPATH}" +PYTHONPATH="$parent${PYTHONPATH:+:$PYTHONPATH}" +export PYTHONPATH NORMAL="Authors DeveloperGuide FAQ Inheritance News SQLBuilder SQLObject SelectResults TODO Versioning Views |
From: <sub...@co...> - 2011-11-02 19:09:21
|
Author: phd Date: Wed Nov 2 13:09:14 2011 New Revision: 4467 Log: Fixed bugs - quote variables in case they contain spaces. Modified: SQLObject/trunk/docs/rebuild Modified: SQLObject/trunk/docs/rebuild ============================================================================== --- SQLObject/trunk/docs/rebuild Wed Nov 2 13:00:14 2011 (r4466) +++ SQLObject/trunk/docs/rebuild Wed Nov 2 13:09:14 2011 (r4467) @@ -1,9 +1,9 @@ #!/bin/sh here=`pwd` -parent=`dirname $here` +parent=`dirname "$here"` echo "Adding $parent to \$PYTHONPATH" -export PYTHONPATH=$parent${PYTHONPATH:+:$PYTHONPATH} +export PYTHONPATH="$parent${PYTHONPATH:+:$PYTHONPATH}" NORMAL="Authors DeveloperGuide FAQ Inheritance News SQLBuilder SQLObject SelectResults TODO Versioning Views |
From: <sub...@co...> - 2011-11-02 19:00:24
|
Author: phd Date: Wed Nov 2 13:00:14 2011 New Revision: 4466 Log: Fixed a bug - append a colon and $PYTHONPATH only if $PYTHONPATH is not empty. Modified: SQLObject/trunk/docs/rebuild Modified: SQLObject/trunk/docs/rebuild ============================================================================== --- SQLObject/trunk/docs/rebuild Sat Oct 29 07:37:21 2011 (r4465) +++ SQLObject/trunk/docs/rebuild Wed Nov 2 13:00:14 2011 (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 |
From: SourceForge.net <no...@so...> - 2011-10-31 14:51:47
|
Bugs item #3426501, was opened at 2011-10-20 22:33 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&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: 5 Private: No Submitted By: Ken Lalonde (kenlalonde) Assigned to: Oleg Broytman (phd) Summary: Bug in string handling using postgresql 9.1 Initial Comment: When using postgresql 9.1 with the default config settings, sqlobject incorrectly handles strings containing C-style escapes. For example, when creating an object Foo with StringCol "bar", this code: Foo(bar='a\nb') will generate something like: INSERT into foo (bar) VALUES ('a\nb'); Under pre-9.1 versions, or 9.1 with config setting standard_conforming_string=off, "select bar from foo" will return a 3 character string. Under pg 9.1, it returns a 4 character string, because \n is interpreted as 2 characters. I guess one way around this would be to use postgresql's escape string syntax, since sqlobject is depending on that behaviour: INSERT into foo (bar) VALUES (E'a\nb'); But this will break pre-8.1 versions of postgresql that don't understand the E'' syntax. In an ideal world, sqlobject would let the driver handle parameter conversion (psycopg2 does it correctly); but perhaps that isn't feasible. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2011-10-31 17:51 Message: Thank you for looking at it. Will be in the next release 1.2. I'm going to release the first beta RSN. ---------------------------------------------------------------------- Comment By: Ken Lalonde (kenlalonde) Date: 2011-10-31 17:41 Message: Looks reasonable. Thanks Oleg. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2011-10-29 17:52 Message: Can you apply the patch in the revision 4465 (https://sourceforge.net/mailarchive/forum.php?thread_name=E1RK96B-0007ug-M0%40webwareforpython.org&forum_name=sqlobject-cvs) or checkout the trunk and test it? ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2011-10-20 22:49 Message: This is certainly a problem I want to fix urgently because our company is going to upgrade to PostgreSQL 9.1. Postgres 8.1 is old enough (November of 2005, see http://www.postgresql.org/docs/8.1/static/release-8-1.html), so I can drop support for older versions without too much troubles for users. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&group_id=74338 |
From: SourceForge.net <no...@so...> - 2011-10-31 14:41:51
|
Bugs item #3426501, was opened at 2011-10-20 14:33 Message generated for change (Comment added) made by kenlalonde You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&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: Fixed Priority: 5 Private: No Submitted By: Ken Lalonde (kenlalonde) Assigned to: Oleg Broytman (phd) Summary: Bug in string handling using postgresql 9.1 Initial Comment: When using postgresql 9.1 with the default config settings, sqlobject incorrectly handles strings containing C-style escapes. For example, when creating an object Foo with StringCol "bar", this code: Foo(bar='a\nb') will generate something like: INSERT into foo (bar) VALUES ('a\nb'); Under pre-9.1 versions, or 9.1 with config setting standard_conforming_string=off, "select bar from foo" will return a 3 character string. Under pg 9.1, it returns a 4 character string, because \n is interpreted as 2 characters. I guess one way around this would be to use postgresql's escape string syntax, since sqlobject is depending on that behaviour: INSERT into foo (bar) VALUES (E'a\nb'); But this will break pre-8.1 versions of postgresql that don't understand the E'' syntax. In an ideal world, sqlobject would let the driver handle parameter conversion (psycopg2 does it correctly); but perhaps that isn't feasible. ---------------------------------------------------------------------- >Comment By: Ken Lalonde (kenlalonde) Date: 2011-10-31 10:41 Message: Looks reasonable. Thanks Oleg. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2011-10-29 09:52 Message: Can you apply the patch in the revision 4465 (https://sourceforge.net/mailarchive/forum.php?thread_name=E1RK96B-0007ug-M0%40webwareforpython.org&forum_name=sqlobject-cvs) or checkout the trunk and test it? ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2011-10-20 14:49 Message: This is certainly a problem I want to fix urgently because our company is going to upgrade to PostgreSQL 9.1. Postgres 8.1 is old enough (November of 2005, see http://www.postgresql.org/docs/8.1/static/release-8-1.html), so I can drop support for older versions without too much troubles for users. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&group_id=74338 |
From: SourceForge.net <no...@so...> - 2011-10-29 13:52:59
|
Bugs item #3426501, was opened at 2011-10-20 22:33 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&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: Fixed Priority: 5 Private: No Submitted By: Ken Lalonde (kenlalonde) Assigned to: Oleg Broytman (phd) Summary: Bug in string handling using postgresql 9.1 Initial Comment: When using postgresql 9.1 with the default config settings, sqlobject incorrectly handles strings containing C-style escapes. For example, when creating an object Foo with StringCol "bar", this code: Foo(bar='a\nb') will generate something like: INSERT into foo (bar) VALUES ('a\nb'); Under pre-9.1 versions, or 9.1 with config setting standard_conforming_string=off, "select bar from foo" will return a 3 character string. Under pg 9.1, it returns a 4 character string, because \n is interpreted as 2 characters. I guess one way around this would be to use postgresql's escape string syntax, since sqlobject is depending on that behaviour: INSERT into foo (bar) VALUES (E'a\nb'); But this will break pre-8.1 versions of postgresql that don't understand the E'' syntax. In an ideal world, sqlobject would let the driver handle parameter conversion (psycopg2 does it correctly); but perhaps that isn't feasible. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2011-10-29 17:52 Message: Can you apply the patch in the revision 4465 (https://sourceforge.net/mailarchive/forum.php?thread_name=E1RK96B-0007ug-M0%40webwareforpython.org&forum_name=sqlobject-cvs) or checkout the trunk and test it? ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2011-10-20 22:49 Message: This is certainly a problem I want to fix urgently because our company is going to upgrade to PostgreSQL 9.1. Postgres 8.1 is old enough (November of 2005, see http://www.postgresql.org/docs/8.1/static/release-8-1.html), so I can drop support for older versions without too much troubles for users. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&group_id=74338 |
From: <sub...@co...> - 2011-10-29 13:37:30
|
Author: phd Date: Sat Oct 29 07:37:21 2011 New Revision: 4465 Log: Quoting rules changed for PostgreSQL: SQLObject uses E'' escape string if the string contains characters escaped with backslash. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/converters.py SQLObject/trunk/sqlobject/sqlbuilder.py SQLObject/trunk/sqlobject/tests/test_converters.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Tue Oct 11 11:10:18 2011 (r4464) +++ SQLObject/trunk/docs/News.txt Sat Oct 29 07:37:21 2011 (r4465) @@ -23,6 +23,12 @@ * delColumn now accepts a ForeignKey's name without 'ID'. +* Support for PostgreSQL 7.* is dropped. The minimal supported version of + PostgreSQL is 8.1 now. + +* Quoting rules changed for PostgreSQL: SQLObject uses E'' escape string + if the string contains characters escaped with backslash. + * A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed. Modified: SQLObject/trunk/sqlobject/converters.py ============================================================================== --- SQLObject/trunk/sqlobject/converters.py Tue Oct 11 11:10:18 2011 (r4464) +++ SQLObject/trunk/sqlobject/converters.py Sat Oct 29 07:37:21 2011 (r4465) @@ -1,5 +1,10 @@ -import sys from array import array +import datetime +from decimal import Decimal +import sys +import time +from types import ClassType, InstanceType, NoneType + try: import mx.DateTime.ISO @@ -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) @@ -188,12 +190,12 @@ 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: @@ -206,3 +208,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 Modified: SQLObject/trunk/sqlobject/sqlbuilder.py ============================================================================== --- SQLObject/trunk/sqlobject/sqlbuilder.py Tue Oct 11 11:10:18 2011 (r4464) +++ SQLObject/trunk/sqlobject/sqlbuilder.py Sat Oct 29 07:37:21 2011 (r4465) @@ -68,7 +68,7 @@ import weakref import classregistry -from converters import sqlrepr, registerConverter +from converters import registerConverter, sqlrepr, quote_str, unquote_str class VersionError(Exception): @@ -904,18 +904,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) Modified: SQLObject/trunk/sqlobject/tests/test_converters.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_converters.py Tue Oct 11 11:10:18 2011 (r4464) +++ SQLObject/trunk/sqlobject/tests/test_converters.py Sat Oct 29 07:37:21 2011 (r4465) @@ -1,10 +1,12 @@ -import sys from datetime import timedelta -from sqlobject.sqlbuilder import sqlrepr +import sys + +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: @@ -41,23 +43,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(): @@ -200,3 +202,18 @@ def test_timedelta(): assert sqlrepr(timedelta(seconds=30*60)) == \ "INTERVAL '0 days 1800 seconds'" + +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\%'" |
From: SourceForge.net <no...@so...> - 2011-10-29 04:42:19
|
Support Requests item #1541111, was opened at 2006-08-16 09:55 Message generated for change (Comment added) made by no-such-nick You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540673&aid=1541111&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: None Group: None Status: Open Priority: 5 Private: No Submitted By: Michel Albert (exhuma) Assigned to: Nobody/Anonymous (nobody) Summary: SQLObject documentation Initial Comment: Hi, SQLObject is a brilliant project and it's much fun working with it..... Once you figured out the details. SQLObject suffers from a *horrid* documentation. Starting a project from scratch is explained well enough. But if you have to re-use an existing database. It's inevitable that you need to use more advanced features of SQLObject. And those are only badly (if at all) documented. For example: You can use a different "Style" object to indicate a different naming convention. But which "Style" objects exist? What are the parameters? Is it possible to create a Style object yourself? If so, how? What methods need to be overridden and what do they need to do? You might say: "Hey, it's open-source. Browse the source code and see for yourself." And that's fine by me. But then, *please* document the code! My first try was to open up the python interpreter and do a >>> help(SQLObject) and go from there. Nothing useful showed up. Honestly, for me time is money, and I was really close to giving up with SQLObject for this reason. However I like SQLObject. So I'll take a sip of vinegar and stick with it. After doing a lot of digging, I got most things to work. But not necessarily the way I want them to. Alas, it works. The gist of this message is: There might be people less willing to do some research, and drop SQLObject quickly. It would be sad, if SQLObject suffers from it's lack of documentation. And if I understood more of it's inner-workings, I would offer you to write some documentation, and even redesign the web-page, as -- quite frankly -- it has a bit of a chaotic look. The way I understand it, it's automatically generated, so it's not your fault. Anyhow, I hope you read this message as positive criticism and not as a rant/flame. As it was not intended as such. Best regards, Michel Albert p.s.: is it possible to do a naming style that works like mixed-case, but keeps the first letter small? Or even better, one that completely keeps the style of the variable (does no modifications whatsoever)? ---------------------------------------------------------------------- Comment By: Paul Benedikt Bittmann (no-such-nick) Date: 2011-10-29 06:42 Message: Hi I've been playing with SQLObject for just some hours and have just one little recommedation. In the documentation on One-to-Many Relationships there is a passage: [quote] >>> class Address(SQLObject): ... ... street = StringCol() ... city = StringCol() ... state = StringCol(length=2) ... zip = StringCol(length=9) ... person = ForeignKey('Person') >>> Address.createTable() Note the column person = ForeignKey("Person"). This is a reference to a Person object. We refer to other classes by name (with a string). In the database there will be a person_id column, type INT, which points to the person column. [/quote] If I figured out right in that its important that the column person is named exactly "person" corrosponding to the class Person it would be nice if that could be made clearer in that passage. I hope I explained myself well and my english is understandable, sorry if not. I just had to get that out after it took me some time and nerve to figure the thing out myself. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540673&aid=1541111&group_id=74338 |
From: SourceForge.net <no...@so...> - 2011-10-20 18:49:03
|
Bugs item #3426501, was opened at 2011-10-20 22:33 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&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: Ken Lalonde (kenlalonde) >Assigned to: Oleg Broytman (phd) Summary: Bug in string handling using postgresql 9.1 Initial Comment: When using postgresql 9.1 with the default config settings, sqlobject incorrectly handles strings containing C-style escapes. For example, when creating an object Foo with StringCol "bar", this code: Foo(bar='a\nb') will generate something like: INSERT into foo (bar) VALUES ('a\nb'); Under pre-9.1 versions, or 9.1 with config setting standard_conforming_string=off, "select bar from foo" will return a 3 character string. Under pg 9.1, it returns a 4 character string, because \n is interpreted as 2 characters. I guess one way around this would be to use postgresql's escape string syntax, since sqlobject is depending on that behaviour: INSERT into foo (bar) VALUES (E'a\nb'); But this will break pre-8.1 versions of postgresql that don't understand the E'' syntax. In an ideal world, sqlobject would let the driver handle parameter conversion (psycopg2 does it correctly); but perhaps that isn't feasible. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2011-10-20 22:49 Message: This is certainly a problem I want to fix urgently because our company is going to upgrade to PostgreSQL 9.1. Postgres 8.1 is old enough (November of 2005, see http://www.postgresql.org/docs/8.1/static/release-8-1.html), so I can drop support for older versions without too much troubles for users. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&group_id=74338 |
From: SourceForge.net <no...@so...> - 2011-10-20 18:33:59
|
Bugs item #3426501, was opened at 2011-10-20 14:33 Message generated for change (Tracker Item Submitted) made by kenlalonde You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&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: Ken Lalonde (kenlalonde) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in string handling using postgresql 9.1 Initial Comment: When using postgresql 9.1 with the default config settings, sqlobject incorrectly handles strings containing C-style escapes. For example, when creating an object Foo with StringCol "bar", this code: Foo(bar='a\nb') will generate something like: INSERT into foo (bar) VALUES ('a\nb'); Under pre-9.1 versions, or 9.1 with config setting standard_conforming_string=off, "select bar from foo" will return a 3 character string. Under pg 9.1, it returns a 4 character string, because \n is interpreted as 2 characters. I guess one way around this would be to use postgresql's escape string syntax, since sqlobject is depending on that behaviour: INSERT into foo (bar) VALUES (E'a\nb'); But this will break pre-8.1 versions of postgresql that don't understand the E'' syntax. In an ideal world, sqlobject would let the driver handle parameter conversion (psycopg2 does it correctly); but perhaps that isn't feasible. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3426501&group_id=74338 |
From: <sub...@co...> - 2011-10-11 17:10:25
|
Author: phd Date: Tue Oct 11 11:10:18 2011 New Revision: 4464 Log: Use styles.capword instead of capitalize. Removed unused capitalize from main. Modified: SQLObject/trunk/sqlobject/col.py SQLObject/trunk/sqlobject/joins.py SQLObject/trunk/sqlobject/main.py Modified: SQLObject/trunk/sqlobject/col.py ============================================================================== --- SQLObject/trunk/sqlobject/col.py Tue Oct 11 09:40:20 2011 (r4463) +++ SQLObject/trunk/sqlobject/col.py Tue Oct 11 11:10:18 2011 (r4464) @@ -31,6 +31,7 @@ from classregistry import findClass import constraints as constrs import sqlbuilder +from styles import capword NoDefault = sqlbuilder.NoDefault @@ -188,7 +189,7 @@ else: self.unique = unique if self.unique and alternateMethodName is None: - self.alternateMethodName = 'by' + self.name[0].capitalize() + self.name[1:] + self.alternateMethodName = 'by' + capword(self.name) else: self.alternateMethodName = alternateMethodName Modified: SQLObject/trunk/sqlobject/joins.py ============================================================================== --- SQLObject/trunk/sqlobject/joins.py Tue Oct 11 09:40:20 2011 (r4463) +++ SQLObject/trunk/sqlobject/joins.py Tue Oct 11 11:10:18 2011 (r4464) @@ -3,6 +3,7 @@ import events import styles import sqlbuilder +from styles import capword __all__ = ['MultipleJoin', 'SQLMultipleJoin', 'RelatedJoin', 'SQLRelatedJoin', 'SingleJoin', 'ManyToMany', 'OneToMany'] @@ -139,10 +140,10 @@ else: name = name + "s" self.joinMethodName = name - if not addRemoveName: - self.addRemoveName = capitalize(self.otherClassName) - else: + if addRemoveName: self.addRemoveName = addRemoveName + else: + self.addRemoveName = capword(self.otherClassName) def performJoin(self, inst): ids = inst._connection._SO_selectJoin( @@ -301,9 +302,6 @@ class SQLRelatedJoin(RelatedJoin): baseClass = SOSQLRelatedJoin -def capitalize(name): - return name[0].capitalize() + name[1:] - class SOSingleJoin(SOMultipleJoin): def __init__(self, **kw): Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Tue Oct 11 09:40:20 2011 (r4463) +++ SQLObject/trunk/sqlobject/main.py Tue Oct 11 11:10:18 2011 (r4464) @@ -1686,9 +1686,6 @@ self.__class__._connection.cache.put(self.id, self.__class__, self) -def capitalize(name): - return name[0].capitalize() + name[1:] - def setterName(name): return '_set_%s' % name def rawSetterName(name): |
From: <sub...@co...> - 2011-10-11 15:40:32
|
Author: phd Date: Tue Oct 11 09:40:20 2011 New Revision: 4463 Log: Sorted import statements. Renamed consts to constrs to avoid collisions with 'const'. Modified: SQLObject/trunk/sqlobject/col.py Modified: SQLObject/trunk/sqlobject/col.py ============================================================================== --- SQLObject/trunk/sqlobject/col.py Mon Oct 10 08:36:13 2011 (r4462) +++ SQLObject/trunk/sqlobject/col.py Tue Oct 11 09:40:20 2011 (r4463) @@ -18,20 +18,19 @@ are what gets used. """ -import re, time from array import array +from itertools import count +import re, time try: import cPickle as pickle except ImportError: import pickle -import sqlbuilder # Sadly the name "constraints" conflicts with many of the function # arguments in this module, so we rename it: -import constraints as consts -from formencode import compound -from formencode import validators +from formencode import compound, validators from classregistry import findClass -from itertools import count +import constraints as constrs +import sqlbuilder NoDefault = sqlbuilder.NoDefault @@ -149,7 +148,7 @@ elif notNone is not NoDefault: self.notNone = notNone if self.notNone: - self.constraints = [consts.notNull] + self.constraints + self.constraints = [constrs.notNull] + self.constraints self.name = name self.soClass = soClass @@ -427,9 +426,9 @@ super(SOStringLikeCol, self).__init__(**kw) def autoConstraints(self): - constraints = [consts.isString] + constraints = [constrs.isString] if self.length is not None: - constraints += [consts.MaxLength(self.length)] + constraints += [constrs.MaxLength(self.length)] return constraints def _sqlType(self): @@ -623,7 +622,7 @@ SOCol.__init__(self, **kw) def autoConstraints(self): - return [consts.isInt] + return [constrs.isInt] def createValidators(self): return [IntValidator(name=self.name)] + \ @@ -693,7 +692,7 @@ class SOBoolCol(SOCol): def autoConstraints(self): - return [consts.isBool] + return [constrs.isBool] def createValidators(self): return [BoolValidator(name=self.name)] + \ @@ -746,7 +745,7 @@ # 3-03 @@: support precision (e.g., DECIMAL) def autoConstraints(self): - return [consts.isFloat] + return [constrs.isFloat] def createValidators(self): return [FloatValidator(name=self.name)] + \ @@ -957,7 +956,7 @@ super(SOEnumCol, self).__init__(**kw) def autoConstraints(self): - return [consts.isString, consts.InList(self.enumValues)] + return [constrs.isString, constrs.InList(self.enumValues)] def createValidators(self): return [EnumValidator(name=self.name, enumValues=self.enumValues, @@ -1037,7 +1036,7 @@ super(SOSetCol, self).__init__(**kw) def autoConstraints(self): - return [consts.isString, consts.InList(self.setValues)] + return [constrs.isString, constrs.InList(self.setValues)] def createValidators(self): return [SetValidator(name=self.name, setValues=self.setValues)] + \ |
From: <sub...@co...> - 2011-10-10 14:36:20
|
Author: phd Date: Mon Oct 10 08:36:13 2011 New Revision: 4462 Log: ForeignKey('Table', refColumn='refcol_id'). Added: SQLObject/trunk/sqlobject/tests/test_ForeignKey.py - copied, changed from r4459, SQLObject/trunk/sqlobject/tests/test_foreignKey.py Deleted: SQLObject/trunk/sqlobject/tests/test_foreignKey.py Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/TODO.txt SQLObject/trunk/sqlobject/col.py SQLObject/trunk/sqlobject/main.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Mon Oct 10 08:35:13 2011 (r4461) +++ SQLObject/trunk/docs/News.txt Mon Oct 10 08:36:13 2011 (r4462) @@ -14,7 +14,12 @@ -------------------- * Strings are treated specially in Select to allow - Select(['id, 'name'], where='value = 42'). Update allows string in WHERE. + Select(['id, 'name'], where='value = 42'). Update allows a string in + WHERE. + +* ForeignKey('Table', refColumn='refcol_id') to allow ForeignKey to + point to a non-id column; the referred column must be a unique integer + column. * delColumn now accepts a ForeignKey's name without 'ID'. Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Mon Oct 10 08:35:13 2011 (r4461) +++ SQLObject/trunk/docs/TODO.txt Mon Oct 10 08:36:13 2011 (r4462) @@ -1,9 +1,6 @@ TODO ---- -* ForeignKey('Table', otherColumn='other_id') to allow ForeignKey to - point to a non-id column. - * RelatedJoin.hasOther(otherObject[.id]) * tableParamSQL:: Modified: SQLObject/trunk/sqlobject/col.py ============================================================================== --- SQLObject/trunk/sqlobject/col.py Mon Oct 10 08:35:13 2011 (r4461) +++ SQLObject/trunk/sqlobject/col.py Mon Oct 10 08:36:13 2011 (r4462) @@ -768,6 +768,10 @@ # 3-03 @@: this should have a simplified constructor # Should provide foreign key information for other DBs. + def __init__(self, **kw): + self.refColumn = kw.pop('refColumn', None) + super(SOKeyCol, self).__init__(**kw) + def _sqlType(self): return self.key_type[self.soClass.sqlmeta.idType] @@ -788,18 +792,18 @@ def __init__(self, **kw): foreignKey = kw['foreignKey'] style = kw['soClass'].sqlmeta.style - if not kw.get('name'): - kw['name'] = style.instanceAttrToIDAttr(style.pythonClassToAttr(foreignKey)) - else: + if kw.get('name'): kw['origName'] = kw['name'] kw['name'] = style.instanceAttrToIDAttr(kw['name']) + else: + kw['name'] = style.instanceAttrToIDAttr(style.pythonClassToAttr(foreignKey)) super(SOForeignKey, self).__init__(**kw) def sqliteCreateSQL(self): sql = SOKeyCol.sqliteCreateSQL(self) other = findClass(self.foreignKey, self.soClass.sqlmeta.registry) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName if self.cascade is not None: if self.cascade == 'null': action = 'ON DELETE SET NULL' @@ -828,7 +832,7 @@ sTName = self.soClass.sqlmeta.table other = findClass(self.foreignKey, self.soClass.sqlmeta.registry) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName if self.cascade is not None: if self.cascade == 'null': action = 'ON DELETE SET NULL' @@ -854,7 +858,7 @@ sTLocalName = sTName.split('.')[-1] other = findClass(self.foreignKey, self.soClass.sqlmeta.registry) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName if self.cascade is not None: if self.cascade == 'null': action = 'ON DELETE SET NULL' @@ -883,7 +887,7 @@ sql = SOKeyCol.sybaseCreateSQL(self) other = findClass(self.foreignKey, self.soClass.sqlmeta.registry) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName reference = ('REFERENCES %(tName)s(%(idName)s) ' % {'tName':tName, 'idName':idName}) @@ -898,7 +902,7 @@ sql = SOKeyCol.mssqlCreateSQL(self, connection) other = findClass(self.foreignKey, self.soClass.sqlmeta.registry) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName reference = ('REFERENCES %(tName)s(%(idName)s) ' % {'tName':tName, 'idName':idName}) @@ -915,7 +919,7 @@ #I assume that foreign key name is identical to the id of the reference table sql = ' '.join([fidName, self._maxdbType()]) tName = other.sqlmeta.table - idName = other.sqlmeta.idName + idName = self.refColumn or other.sqlmeta.idName sql=sql + ',' + '\n' sql=sql + 'FOREIGN KEY (%s) REFERENCES %s(%s)'%(fidName,tName,idName) return sql Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Mon Oct 10 08:35:13 2011 (r4461) +++ SQLObject/trunk/sqlobject/main.py Mon Oct 10 08:36:13 2011 (r4462) @@ -396,10 +396,10 @@ if sqlmeta.cacheValues: # self._SO_class_className is a reference # to the class in question. - getter = eval('lambda self: self._SO_foreignKey(self._SO_loadValue(%r), self._SO_class_%s)' % (instanceName(name), column.foreignKey)) + getter = eval('lambda self: self._SO_foreignKey(self._SO_loadValue(%r), self._SO_class_%s, %s)' % (instanceName(name), column.foreignKey, column.refColumn and repr(column.refColumn))) else: # Same non-caching version as above. - getter = eval('lambda self: self._SO_foreignKey(self._SO_getValue(%s), self._SO_class_%s)' % (repr(name), column.foreignKey)) + getter = eval('lambda self: self._SO_foreignKey(self._SO_getValue(%s), self._SO_class_%s, %s)' % (repr(name), column.foreignKey, column.refColumn and repr(column.refColumn))) setattr(soClass, rawGetterName(origName), getter) # And we set the _get_columnName version @@ -410,7 +410,7 @@ if not column.immutable: # The setter just gets the ID of the object, # and then sets the real column. - setter = eval('lambda self, val: setattr(self, %s, self._SO_getID(val))' % (repr(name))) + setter = eval('lambda self, val: setattr(self, %s, self._SO_getID(val, %s))' % (repr(name), column.refColumn and repr(column.refColumn))) setattr(soClass, rawSetterName(origName), setter) if not hasattr(soClass, setterName(origName)): setattr(soClass, setterName(origName), setter) @@ -1170,13 +1170,17 @@ value = column.to_python(value, self._SO_validatorState) return value - def _SO_foreignKey(self, id, joinClass): - if id is None: + def _SO_foreignKey(self, value, joinClass, idName=None): + if value is None: return None - elif self.sqlmeta._perConnection: - return joinClass.get(id, connection=self._connection) + if self.sqlmeta._perConnection: + connection = self._connection else: - return joinClass.get(id) + connection = None + if idName is None: # Get by id + return joinClass.get(value, connection=connection) + return joinClass.select( + getattr(joinClass.q, idName)==value, connection=connection).getOne() def __init__(self, **kw): # If we are the outmost constructor of a hiearchy of @@ -1303,8 +1307,8 @@ func(self) _postponed_local.postponed_calls.append(_send_RowCreatedSignal) - def _SO_getID(self, obj): - return getID(obj) + def _SO_getID(self, obj, refColumn=None): + return getID(obj, refColumn) @classmethod def _findAlternateID(cls, name, dbName, value, connection=None): @@ -1701,9 +1705,9 @@ ## Utility functions (for external consumption) ######################################## -def getID(obj): +def getID(obj, refColumn=None): if isinstance(obj, SQLObject): - return obj.id + return getattr(obj, refColumn or 'id') elif isinstance(obj, int): return obj elif isinstance(obj, long): Copied and modified: SQLObject/trunk/sqlobject/tests/test_ForeignKey.py (from r4459, SQLObject/trunk/sqlobject/tests/test_foreignKey.py) ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_foreignKey.py Thu Sep 29 09:06:55 2011 (r4459, copy source) +++ SQLObject/trunk/sqlobject/tests/test_ForeignKey.py Mon Oct 10 08:36:13 2011 (r4462) @@ -4,6 +4,7 @@ class TestComposerKey(SQLObject): name = StringCol() + id2 = IntCol(default=None, unique=True) class TestWorkKey(SQLObject): class sqlmeta: @@ -15,6 +16,10 @@ class TestWorkKey2(SQLObject): title = StringCol() +class TestOtherColumn(SQLObject): + key1 = ForeignKey('TestComposerKey', default=None) + key2 = ForeignKey('TestComposerKey', refColumn='id2', default=None) + def test1(): setupClass([TestComposerKey, TestWorkKey]) @@ -69,3 +74,13 @@ InstalledTestDatabase.drop(TestWorkKey) setupClass([TestComposerKey, TestWorkKey2], force=True) TestWorkKey2.sqlmeta.addColumn(ForeignKey('TestComposerKey'), changeSchema=True) + +def test_otherColumn(): + setupClass([TestComposerKey, TestOtherColumn]) + test_composer1 = TestComposerKey(name='Test1') + test_composer2 = TestComposerKey(name='Test2', id2=2) + test_fkey = TestOtherColumn(key1=test_composer1) + test_other = TestOtherColumn(key2=test_composer2.id2) + getConnection().cache.clear() + assert test_fkey.key1 == test_composer1 + assert test_other.key2 == test_composer2 |
From: <sub...@co...> - 2011-10-10 14:35:23
|
Author: phd Date: Mon Oct 10 08:35:13 2011 New Revision: 4461 Log: Fixed a test - Select() now doesn't quote item names strings. Modified: SQLObject/trunk/sqlobject/tests/test_converters.py Modified: SQLObject/trunk/sqlobject/tests/test_converters.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_converters.py Thu Sep 29 10:11:13 2011 (r4460) +++ SQLObject/trunk/sqlobject/tests/test_converters.py Mon Oct 10 08:35:13 2011 (r4461) @@ -111,7 +111,7 @@ def test_select(): instance = Select('test') - assert sqlrepr(instance, 'mysql') == "SELECT 'test'" + assert sqlrepr(instance, 'mysql') == "SELECT test" def test_insert(): # Single column, no keyword arguments. |
From: <sub...@co...> - 2011-09-29 16:11:24
|
Author: phd Date: Thu Sep 29 10:11:13 2011 New Revision: 4460 Log: tableName conflicts with SQLObjectTable.tableName (via SQLObject.q.tableName). Modified: SQLObject/trunk/sqlobject/tests/dbtest.py Modified: SQLObject/trunk/sqlobject/tests/dbtest.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/dbtest.py Thu Sep 29 09:06:55 2011 (r4459) +++ SQLObject/trunk/sqlobject/tests/dbtest.py Thu Sep 29 10:11:13 2011 (r4460) @@ -120,7 +120,7 @@ """ _connection = installedDBTracker - tableName = sqlobject.StringCol(notNull=True) + table_name = sqlobject.StringCol(notNull=True) createSQL = sqlobject.StringCol(notNull=True) connectionURI = sqlobject.StringCol(notNull=True) @@ -140,7 +140,7 @@ if not soClass._connection.tableExists(table): continue items = list(cls.selectBy( - tableName=table, + table_name=table, connectionURI=soClass._connection.uri())) if items: instance = items[0] @@ -178,7 +178,7 @@ sql, extra_sql = soClass.createTableSQL() soClass.createTable(applyConstraints=False) all_extra.extend(extra_sql) - cls(tableName=soClass.sqlmeta.table, + cls(table_name=soClass.sqlmeta.table, createSQL=sql, connectionURI=soClass._connection.uri()) for extra_sql in all_extra: |
From: <sub...@co...> - 2011-09-29 15:07:09
|
Author: phd Date: Thu Sep 29 09:06:55 2011 New Revision: 4459 Log: Reorder nd rewording. Modified: SQLObject/trunk/docs/TODO.txt Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Tue Sep 27 09:51:24 2011 (r4458) +++ SQLObject/trunk/docs/TODO.txt Thu Sep 29 09:06:55 2011 (r4459) @@ -1,9 +1,6 @@ TODO ---- -* Allow to override ConsoleWriter/LogWriter classes and makeDebugWriter - function. - * ForeignKey('Table', otherColumn='other_id') to allow ForeignKey to point to a non-id column. @@ -18,17 +15,18 @@ * SQLObject.fastInsert(). -* List tables in the DB. The query in MySQL is ``SHOW TABLES``; in SQLite it is +* List databases in the connection. + +* List tables/indices in the DB. The query in MySQL is ``SHOW TABLES``; + in SQLite it is - SELECT name FROM sqlite_master WHERE type='table' ORDER BY name + SELECT name FROM sqlite_master WHERE type='table' ORDER BY name; and in Postgres it is something like SELECT c.relname FROM pg_class c, pg_type t WHERE c.reltype = t.oid AND t.typname = 'table'. -* List databases in the connection. - * IntervalCol * TimedeltaCol @@ -44,7 +42,7 @@ * Generators instead of loops (fetchall => fetchone). -* Cache columns in sqlmeta.getColumns(); reset the cache on add/Del Column/Join. +* Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join. * Stop supporting Python 2.4: use ``with lock``; use hashlib instead of md5. @@ -66,7 +64,7 @@ * Refactor ``DBConnection`` to use parameterized queries instead of generating query strings. -* PREPARE/EXECUTE +* PREPARE/EXECUTE. * Protect all .encode(), catch UnicodeEncode exceptions and reraise Invalid. @@ -114,12 +112,12 @@ the progress for Oracle. IWBN to have Informix and DB2 drivers. * Better transaction support -- right now you can use transactions - for the database, but the object isn't transaction-aware, so + for the database, but objects aren't transaction-aware, so non-database persistence won't be able to be rolled back. * Optimistic locking and other techniques to handle concurrency. -* Profile of SQLObject performance, so that I can identify bottlenecks. +* Profile of SQLObject performance to identify bottlenecks. * Increase hooks with FormEncode validation and form generation package, so SQLObject classes (read: schemas) can be published for editing more @@ -137,6 +135,9 @@ processing should be done with unicode strings, conversion to/from ascii strings should happen for non-unicode DB API drivers. +* Allow to override ConsoleWriter/LogWriter classes and makeDebugWriter + function. + .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder |
From: <sub...@co...> - 2011-09-27 15:51:37
|
Author: phd Date: Tue Sep 27 09:51:24 2011 New Revision: 4458 Log: delColumn now accepts a ForeignKey's name without 'ID'. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/TODO.txt SQLObject/trunk/sqlobject/main.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Mon Sep 26 13:01:09 2011 (r4457) +++ SQLObject/trunk/docs/News.txt Tue Sep 27 09:51:24 2011 (r4458) @@ -16,6 +16,8 @@ * Strings are treated specially in Select to allow Select(['id, 'name'], where='value = 42'). Update allows string in WHERE. +* delColumn now accepts a ForeignKey's name without 'ID'. + * A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed. Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Mon Sep 26 13:01:09 2011 (r4457) +++ SQLObject/trunk/docs/TODO.txt Tue Sep 27 09:51:24 2011 (r4458) @@ -4,8 +4,6 @@ * Allow to override ConsoleWriter/LogWriter classes and makeDebugWriter function. -* delColumn('foreignKey'), delColumn('foreignKeyID') - * ForeignKey('Table', otherColumn='other_id') to allow ForeignKey to point to a non-id column. Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Mon Sep 26 13:01:09 2011 (r4457) +++ SQLObject/trunk/sqlobject/main.py Tue Sep 27 09:51:24 2011 (r4458) @@ -450,7 +450,12 @@ sqlmeta = cls soClass = sqlmeta.soClass if isinstance(column, str): - column = sqlmeta.columns[column] + if column in sqlmeta.columns: + column = sqlmeta.columns[column] + elif column+'ID' in sqlmeta.columns: + column = sqlmeta.columns[column+'ID'] + else: + raise ValueError('Unknown column ' + column) if isinstance(column, col.Col): for c in sqlmeta.columns.values(): if column is c.columnDef: |
From: <sub...@co...> - 2011-09-26 19:01:18
|
Author: phd Date: Mon Sep 26 13:01:09 2011 New Revision: 4457 Log: Update allows string in WHERE. More tests. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/SQLBuilder.txt SQLObject/trunk/sqlobject/sqlbuilder.py SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sat Sep 24 09:47:26 2011 (r4456) +++ SQLObject/trunk/docs/News.txt Mon Sep 26 13:01:09 2011 (r4457) @@ -14,7 +14,7 @@ -------------------- * Strings are treated specially in Select to allow - Select(['id, 'name'], where='value = 42'). + Select(['id, 'name'], where='value = 42'). Update allows string in WHERE. * A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed. Modified: SQLObject/trunk/docs/SQLBuilder.txt ============================================================================== --- SQLObject/trunk/docs/SQLBuilder.txt Sat Sep 24 09:47:26 2011 (r4456) +++ SQLObject/trunk/docs/SQLBuilder.txt Mon Sep 26 13:01:09 2011 (r4457) @@ -188,7 +188,7 @@ A dictionary {key: value}; keys are column names. Required. `where`: - An optional SQLExpression, represents the ``WHERE`` clause. + An optional string or SQLExpression, represents the ``WHERE`` clause. Example:: Modified: SQLObject/trunk/sqlobject/sqlbuilder.py ============================================================================== --- SQLObject/trunk/sqlobject/sqlbuilder.py Sat Sep 24 09:47:26 2011 (r4456) +++ SQLObject/trunk/sqlobject/sqlbuilder.py Mon Sep 26 13:01:09 2011 (r4457) @@ -769,7 +769,7 @@ update += "," update += " %s=%s" % (key, sqlrepr(value, db)) if self.whereClause is not NoDefault: - update += " WHERE %s" % sqlrepr(self.whereClause, db) + update += " WHERE %s" % _str_or_sqlrepr(self.whereClause, db) return update def sqlName(self): return "UPDATE" @@ -788,8 +788,7 @@ whereClause = self.whereClause if whereClause is None: return "DELETE FROM %s" % self.table - if isinstance(whereClause, SQLExpression): - whereClause = sqlrepr(whereClause, db) + whereClause = _str_or_sqlrepr(whereClause, db) return "DELETE FROM %s WHERE %s" % (self.table, whereClause) registerConverter(Delete, SQLExprConverter) Modified: SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Sat Sep 24 09:47:26 2011 (r4456) +++ SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Mon Sep 26 13:01:09 2011 (r4457) @@ -44,3 +44,21 @@ where='value>0', orderBy='id', lazyColumns=True) assert sqlrepr(select, 'sqlite') == \ 'SELECT id FROM employees WHERE value>0 ORDER BY id' + + insert = Insert('employees', values={'id': 1, 'name': 'test'}) + assert sqlrepr(insert, 'sqlite') == \ + "INSERT INTO employees (id, name) VALUES (1, 'test')" + + update = Update('employees', {'name': 'test'}, where='id=1') + assert sqlrepr(update, 'sqlite') == \ + "UPDATE employees SET name='test' WHERE id=1" + + delete = Delete('employees', where='id=1') + assert sqlrepr(delete, 'sqlite') == \ + "DELETE FROM employees WHERE id=1" + + raises(TypeError, Delete, 'employees') + + delete = Delete('employees', where=None) + assert sqlrepr(delete, 'sqlite') == \ + "DELETE FROM employees" |
From: <sub...@co...> - 2011-09-24 15:47:35
|
Author: phd Date: Sat Sep 24 09:47:26 2011 New Revision: 4456 Log: Strings are treated specially in Select to allow Select(['id, 'name'], where='value = 42'). Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/SQLBuilder.txt SQLObject/trunk/docs/TODO.txt SQLObject/trunk/sqlobject/sqlbuilder.py SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Tue Aug 30 09:15:11 2011 (r4455) +++ SQLObject/trunk/docs/News.txt Sat Sep 24 09:47:26 2011 (r4456) @@ -13,6 +13,9 @@ Features & Interface -------------------- +* Strings are treated specially in Select to allow + Select(['id, 'name'], where='value = 42'). + * A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed. Modified: SQLObject/trunk/docs/SQLBuilder.txt ============================================================================== --- SQLObject/trunk/docs/SQLBuilder.txt Tue Aug 30 09:15:11 2011 (r4455) +++ SQLObject/trunk/docs/SQLBuilder.txt Sat Sep 24 09:47:26 2011 (r4456) @@ -98,25 +98,23 @@ to execute the query and get back the results as a list of rows. `items`: - An SQLExpression or a sequence of SQLExpression's, represents the - list of columns. If there are q-values SQLExpression's ``Select`` - derives a list of tables for SELECT query. + A string, an SQLExpression or a sequence of strings or + SQLExpression's, represents the list of columns. If there are + q-values SQLExpression's ``Select`` derives a list of tables for + SELECT query. `where`: - An SQLExpression, represents the ``WHERE`` clause. + A string or an SQLExpression, represents the ``WHERE`` clause. `groupBy`: - An SQLExpression, represents the ``GROUP BY`` clause. + A string or an SQLExpression, represents the ``GROUP BY`` clause. `having`: - An SQLExpression, represents the ``HAVING`` part of the ``GROUP BY`` - clause. + A string or an SQLExpression, represents the ``HAVING`` part of the + ``GROUP BY`` clause. `orderBy`: - An SQLExpression, represents the ``ORDER BY`` clause. - -`limit`: - An SQLExpression, represents the ``LIMIT`` clause. + A string or an SQLExpression, represents the ``ORDER BY`` clause. `join`: A (list of) JOINs (``LEFT JOIN``, etc.) @@ -125,8 +123,10 @@ A bool flag to turn on ``DISTINCT`` query. `start`, `end`: - Integers. Alternative ways to calculate ``LIMIT``. `limit`, if passed, - overrides `end`. + Integers. The way to calculate ``OFFSET`` and ``LIMIT``. + +`limit`: + An integer. `limit`, if passed, overrides `end`. `reversed`: A bool flag to do ``ORDER BY`` in the reverse direction. @@ -137,7 +137,7 @@ `staticTables`: A sequence of strings or SQLExpression's that name tables for ``FROM``. This parameter must be used if `items` is a list of strings - from which Select cannot derive a list of tables. + from which Select cannot derive the list of tables. Insert ~~~~~~ Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Tue Aug 30 09:15:11 2011 (r4455) +++ SQLObject/trunk/docs/TODO.txt Sat Sep 24 09:47:26 2011 (r4456) @@ -1,8 +1,6 @@ TODO ---- -* Make strings special-cased in Select to allow Select(['name', 'value']). - * Allow to override ConsoleWriter/LogWriter classes and makeDebugWriter function. Modified: SQLObject/trunk/sqlobject/sqlbuilder.py ============================================================================== --- SQLObject/trunk/sqlobject/sqlbuilder.py Tue Aug 30 09:15:11 2011 (r4455) +++ SQLObject/trunk/sqlobject/sqlbuilder.py Sat Sep 24 09:47:26 2011 (r4456) @@ -95,6 +95,12 @@ else: return expr + +def _str_or_sqlrepr(expr, db): + if isinstance(expr, basestring): + return expr + return sqlrepr(expr, db) + ######################################## ## Expression generation ######################################## @@ -372,9 +378,7 @@ raise AttributeError return self.FieldClass(self.tableName, attr) def __sqlrepr__(self, db): - if isinstance(self.tableName, str): - return self.tableName - return sqlrepr(self.tableName, db) + return _str_or_sqlrepr(self.tableName, db) def execute(self, executor): raise ValueError, "Tables don't have values" @@ -616,11 +620,11 @@ if self.ops['distinct']: select += " DISTINCT" if self.ops['distinctOn'] is not NoDefault: - select += " ON(%s)" % sqlrepr(self.ops['distinctOn'], db) + select += " ON(%s)" % _str_or_sqlrepr(self.ops['distinctOn'], db) if not self.ops['lazyColumns']: - select += " %s" % ", ".join([str(sqlrepr(v, db)) for v in self.ops['items']]) + select += " %s" % ", ".join([str(_str_or_sqlrepr(v, db)) for v in self.ops['items']]) else: - select += " %s" % sqlrepr(self.ops['items'][0], db) + select += " %s" % _str_or_sqlrepr(self.ops['items'][0], db) join = [] join_str = '' @@ -644,8 +648,9 @@ if isinstance(thing, SQLExpression): tables.update(tablesUsedSet(thing, db)) for j in join: - t1, t2 = sqlrepr(j.table1, db), sqlrepr(j.table2, db) + t1 = _str_or_sqlrepr(j.table1, db) if t1 in tables: tables.remove(t1) + t2 = _str_or_sqlrepr(j.table2, db) if t2 in tables: tables.remove(t2) if tables: select += " FROM %s" % ", ".join(tables) @@ -664,14 +669,14 @@ select += join_str if self.ops['clause'] is not NoDefault: - select += " WHERE %s" % sqlrepr(self.ops['clause'], db) + select += " WHERE %s" % _str_or_sqlrepr(self.ops['clause'], db) if self.ops['groupBy'] is not NoDefault: - groupBy = sqlrepr(self.ops['groupBy'], db) + groupBy = _str_or_sqlrepr(self.ops['groupBy'], db) if isinstance(self.ops['groupBy'], (list, tuple)): groupBy = groupBy[1:-1] # Remove parens select += " GROUP BY %s" % groupBy if self.ops['having'] is not NoDefault: - select += " HAVING %s" % sqlrepr(self.ops['having'], db) + select += " HAVING %s" % _str_or_sqlrepr(self.ops['having'], db) if self.ops['orderBy'] is not NoDefault and self.ops['orderBy'] is not None: orderBy = self.ops['orderBy'] if self.ops['reversed']: @@ -679,9 +684,9 @@ else: reverser = lambda x: x if isinstance(orderBy, (list, tuple)): - select += " ORDER BY %s" % ", ".join([sqlrepr(reverser(x), db) for x in orderBy]) + select += " ORDER BY %s" % ", ".join([_str_or_sqlrepr(reverser(x), db) for x in orderBy]) else: - select += " ORDER BY %s" % sqlrepr(reverser(orderBy), db) + select += " ORDER BY %s" % _str_or_sqlrepr(reverser(orderBy), db) start, end = self.ops['start'], self.ops['end'] if self.ops['limit'] is not NoDefault: end = start + self.ops['limit'] Modified: SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Tue Aug 30 09:15:11 2011 (r4455) +++ SQLObject/trunk/sqlobject/tests/test_sqlbuilder.py Sat Sep 24 09:47:26 2011 (r4456) @@ -33,3 +33,14 @@ assert sqlrepr(AND(1, 2, '3'), "sqlite") == \ sqlrepr(SQLOp("AND", 1, SQLOp("AND", 2, '3')), "sqlite") == \ "((1) AND ((2) AND ('3')))" + +def test_str_or_sqlrepr(): + select = Select(['id', 'name'], staticTables=['employees'], + where='value>0', orderBy='id') + assert sqlrepr(select, 'sqlite') == \ + 'SELECT id, name FROM employees WHERE value>0 ORDER BY id' + + select = Select(['id', 'name'], staticTables=['employees'], + where='value>0', orderBy='id', lazyColumns=True) + assert sqlrepr(select, 'sqlite') == \ + 'SELECT id FROM employees WHERE value>0 ORDER BY id' |
From: <sub...@co...> - 2011-08-30 15:15:17
|
Author: phd Date: Tue Aug 30 09:15:11 2011 New Revision: 4455 Log: Stable version 1.1.3. Modified: SQLObject/tags/1.1.3/README.txt SQLObject/tags/1.1.3/setup.cfg SQLObject/tags/1.1.3/sqlobject/__init__.py SQLObject/tags/1.1.3/sqlobject/__version__.py SQLObject/tags/1.1.3/sqlobject/main.py Modified: SQLObject/tags/1.1.3/README.txt ============================================================================== --- SQLObject/tags/1.1.3/README.txt Tue Aug 30 09:12:28 2011 (r4454) +++ SQLObject/tags/1.1.3/README.txt Tue Aug 30 09:15:11 2011 (r4455) @@ -1,5 +1,5 @@ -SQLObject 1.1 -============= +SQLObject 1.1.3 +=============== Thanks for looking at SQLObject. SQLObject is an object-relational mapper, i.e., a library that will wrap your database tables in Python Modified: SQLObject/tags/1.1.3/setup.cfg ============================================================================== --- SQLObject/tags/1.1.3/setup.cfg Tue Aug 30 09:12:28 2011 (r4454) +++ SQLObject/tags/1.1.3/setup.cfg Tue Aug 30 09:15:11 2011 (r4455) @@ -5,10 +5,6 @@ [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/1.1.3/sqlobject/__init__.py ============================================================================== --- SQLObject/tags/1.1.3/sqlobject/__init__.py Tue Aug 30 09:12:28 2011 (r4454) +++ SQLObject/tags/1.1.3/sqlobject/__init__.py Tue Aug 30 09:15:11 2011 (r4455) @@ -1,5 +1,5 @@ """ -SQLObject 1.1 +SQLObject 1.1.3 """ from __version__ import version, version_info Modified: SQLObject/tags/1.1.3/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.1.3/sqlobject/__version__.py Tue Aug 30 09:12:28 2011 (r4454) +++ SQLObject/tags/1.1.3/sqlobject/__version__.py Tue Aug 30 09:15:11 2011 (r4455) @@ -1,8 +1,8 @@ -version = '1.1' +version = '1.1.3' major = 1 minor = 1 -micro = 0 -release_level = 'branch' +micro = 3 +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) Modified: SQLObject/tags/1.1.3/sqlobject/main.py ============================================================================== --- SQLObject/tags/1.1.3/sqlobject/main.py Tue Aug 30 09:12:28 2011 (r4454) +++ SQLObject/tags/1.1.3/sqlobject/main.py Tue Aug 30 09:15:11 2011 (r4455) @@ -1,6 +1,6 @@ """ -SQLObject 1.1 -------------- +SQLObject 1.1.3 +--------------- :author: Ian Bicking <ia...@co...> |
From: <sub...@co...> - 2011-08-30 15:12:34
|
Author: phd Date: Tue Aug 30 09:12:28 2011 New Revision: 4454 Log: Tagging 1.1.3 Added: SQLObject/tags/1.1.3/ - copied from r4453, SQLObject/branches/1.1/ |
From: <sub...@co...> - 2011-08-30 15:10:45
|
Author: phd Date: Tue Aug 30 09:10:39 2011 New Revision: 4453 Log: Stable version 1.0.3. Modified: SQLObject/tags/1.0.3/README.txt SQLObject/tags/1.0.3/setup.cfg SQLObject/tags/1.0.3/sqlobject/__init__.py SQLObject/tags/1.0.3/sqlobject/__version__.py SQLObject/tags/1.0.3/sqlobject/main.py Modified: SQLObject/tags/1.0.3/README.txt ============================================================================== --- SQLObject/tags/1.0.3/README.txt Tue Aug 30 09:07:50 2011 (r4452) +++ SQLObject/tags/1.0.3/README.txt Tue Aug 30 09:10:39 2011 (r4453) @@ -1,5 +1,5 @@ -SQLObject 1.0 -============= +SQLObject 1.0.3 +=============== Thanks for looking at SQLObject. SQLObject is an object-relational mapper, i.e., a library that will wrap your database tables in Python Modified: SQLObject/tags/1.0.3/setup.cfg ============================================================================== --- SQLObject/tags/1.0.3/setup.cfg Tue Aug 30 09:07:50 2011 (r4452) +++ SQLObject/tags/1.0.3/setup.cfg Tue Aug 30 09:10:39 2011 (r4453) @@ -5,10 +5,6 @@ [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/1.0.3/sqlobject/__init__.py ============================================================================== --- SQLObject/tags/1.0.3/sqlobject/__init__.py Tue Aug 30 09:07:50 2011 (r4452) +++ SQLObject/tags/1.0.3/sqlobject/__init__.py Tue Aug 30 09:10:39 2011 (r4453) @@ -1,5 +1,5 @@ """ -SQLObject 1.0 +SQLObject 1.0.3 """ from __version__ import version, version_info Modified: SQLObject/tags/1.0.3/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.0.3/sqlobject/__version__.py Tue Aug 30 09:07:50 2011 (r4452) +++ SQLObject/tags/1.0.3/sqlobject/__version__.py Tue Aug 30 09:10:39 2011 (r4453) @@ -1,8 +1,8 @@ -version = '1.0' +version = '1.0.3' major = 1 minor = 0 -micro = 0 -release_level = 'branch' +micro = 3 +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) Modified: SQLObject/tags/1.0.3/sqlobject/main.py ============================================================================== --- SQLObject/tags/1.0.3/sqlobject/main.py Tue Aug 30 09:07:50 2011 (r4452) +++ SQLObject/tags/1.0.3/sqlobject/main.py Tue Aug 30 09:10:39 2011 (r4453) @@ -1,6 +1,6 @@ """ -SQLObject 1.0 -------------- +SQLObject 1.0.3 +--------------- :author: Ian Bicking <ia...@co...> |
From: <sub...@co...> - 2011-08-30 15:07:57
|
Author: phd Date: Tue Aug 30 09:07:50 2011 New Revision: 4452 Log: Tagging 1.0.3 Added: SQLObject/tags/1.0.3/ - copied from r4451, SQLObject/branches/1.0/ |
From: <sub...@co...> - 2011-08-30 15:07:13
|
Author: phd Date: Tue Aug 30 09:07:07 2011 New Revision: 4451 Log: Merged revision 4450 from branch 1.1: going to release SQLObject 1.1.3 and SQLObject 1.0.3. Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Tue Aug 30 09:04:17 2011 (r4450) +++ SQLObject/trunk/docs/News.txt Tue Aug 30 09:07:07 2011 (r4451) @@ -16,6 +16,13 @@ * A bug caused by psycopg2 recently added a new boolean not callable autocommit attribute was fixed. +SQLObject 1.1.3 +=============== + +Released 30 Aug 2011. + +* A bugfix was ported from `SQLObject 1.0.3`_. + SQLObject 1.1.2 =============== @@ -64,6 +71,8 @@ SQLObject 1.0.3 =============== +Released 30 Aug 2011. + * Fixed a bug with Postgres - add quotes in "SET client_encoding" query. SQLObject 1.0.2 |