sqlobject-cvs Mailing List for SQLObject (Page 29)
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...> - 2012-10-20 09:03:39
|
Author: phd Date: Sat Oct 20 03:03:32 2012 New Revision: 4567 Log: Stable release 1.3.2 Modified: SQLObject/tags/1.3.2/README.txt SQLObject/tags/1.3.2/setup.cfg SQLObject/tags/1.3.2/sqlobject/__version__.py Modified: SQLObject/tags/1.3.2/README.txt ============================================================================== --- SQLObject/tags/1.3.2/README.txt Sat Oct 20 03:01:44 2012 (r4566) +++ SQLObject/tags/1.3.2/README.txt Sat Oct 20 03:03:32 2012 (r4567) @@ -1,5 +1,5 @@ -SQLObject 1.3 -============= +SQLObject 1.3.2 +=============== 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.3.2/setup.cfg ============================================================================== --- SQLObject/tags/1.3.2/setup.cfg Sat Oct 20 03:01:44 2012 (r4566) +++ SQLObject/tags/1.3.2/setup.cfg Sat Oct 20 03:03:32 2012 (r4567) @@ -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.3.2/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.3.2/sqlobject/__version__.py Sat Oct 20 03:01:44 2012 (r4566) +++ SQLObject/tags/1.3.2/sqlobject/__version__.py Sat Oct 20 03:03:32 2012 (r4567) @@ -1,8 +1,8 @@ -version = '1.3' +version = '1.3.2' major = 1 minor = 3 -micro = 0 -release_level = 'trunk' +micro = 2 +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) |
From: <sub...@co...> - 2012-10-20 09:01:50
|
Author: phd Date: Sat Oct 20 03:01:44 2012 New Revision: 4566 Log: Tagging 1.3.2 Added: SQLObject/tags/1.3.2/ - copied from r4565, SQLObject/branches/1.3/ |
From: <sub...@co...> - 2012-10-20 08:57:51
|
Author: phd Date: Sat Oct 20 02:57:43 2012 New Revision: 4565 Log: Stable version 1.2.4 Modified: SQLObject/tags/1.2.4/README.txt SQLObject/tags/1.2.4/setup.cfg SQLObject/tags/1.2.4/sqlobject/__version__.py Modified: SQLObject/tags/1.2.4/README.txt ============================================================================== --- SQLObject/tags/1.2.4/README.txt Sat Oct 20 02:55:08 2012 (r4564) +++ SQLObject/tags/1.2.4/README.txt Sat Oct 20 02:57:43 2012 (r4565) @@ -1,5 +1,5 @@ -SQLObject 1.2 -============= +SQLObject 1.2.4 +=============== 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.2.4/setup.cfg ============================================================================== --- SQLObject/tags/1.2.4/setup.cfg Sat Oct 20 02:55:08 2012 (r4564) +++ SQLObject/tags/1.2.4/setup.cfg Sat Oct 20 02:57:43 2012 (r4565) @@ -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.2.4/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.2.4/sqlobject/__version__.py Sat Oct 20 02:55:08 2012 (r4564) +++ SQLObject/tags/1.2.4/sqlobject/__version__.py Sat Oct 20 02:57:43 2012 (r4565) @@ -1,8 +1,8 @@ -version = '1.2' +version = '1.2.4' major = 1 minor = 2 -micro = 0 -release_level = 'branch' +micro = 4 +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) |
From: <sub...@co...> - 2012-10-20 08:55:14
|
Author: phd Date: Sat Oct 20 02:55:08 2012 New Revision: 4564 Log: Tagging 1.2.4 Added: SQLObject/tags/1.2.4/ - copied from r4563, SQLObject/branches/1.2/ |
From: <sub...@co...> - 2012-10-20 08:54:26
|
Author: phd Date: Sat Oct 20 02:54:19 2012 New Revision: 4563 Log: SQLObject 1.3.2 and 1.2.4 were released 20 Oct 2012 Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sat Oct 20 02:53:21 2012 (r4562) +++ SQLObject/trunk/docs/News.txt Sat Oct 20 02:54:19 2012 (r4563) @@ -13,6 +13,8 @@ SQLObject 1.3.2 =============== +Released 20 Oct 2012. + * A number of bugfixes were ported from `SQLObject 1.2.4`_. SQLObject 1.3.1 @@ -40,6 +42,8 @@ SQLObject 1.2.4 =============== +Released 20 Oct 2012. + * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. |
From: <sub...@co...> - 2012-10-20 08:53:28
|
Author: phd Date: Sat Oct 20 02:53:21 2012 New Revision: 4562 Log: SQLObject 1.3.2 and 1.2.4 were released 20 Oct 2012 Modified: SQLObject/branches/1.3/docs/News.txt Modified: SQLObject/branches/1.3/docs/News.txt ============================================================================== --- SQLObject/branches/1.3/docs/News.txt Sat Oct 20 02:51:15 2012 (r4561) +++ SQLObject/branches/1.3/docs/News.txt Sat Oct 20 02:53:21 2012 (r4562) @@ -10,6 +10,8 @@ SQLObject 1.3.2 =============== +Released 20 Oct 2012. + * A number of bugfixes were ported from `SQLObject 1.2.4`_. SQLObject 1.3.1 @@ -37,6 +39,8 @@ SQLObject 1.2.4 =============== +Released 20 Oct 2012. + * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. |
From: <sub...@co...> - 2012-10-20 08:51:23
|
Author: phd Date: Sat Oct 20 02:51:15 2012 New Revision: 4561 Log: SQLObject 1.2.4 was released 20 Oct 2012 Modified: SQLObject/branches/1.2/docs/News.txt Modified: SQLObject/branches/1.2/docs/News.txt ============================================================================== --- SQLObject/branches/1.2/docs/News.txt Tue Oct 9 08:11:51 2012 (r4560) +++ SQLObject/branches/1.2/docs/News.txt Sat Oct 20 02:51:15 2012 (r4561) @@ -10,6 +10,8 @@ SQLObject 1.2.4 =============== +Released 20 Oct 2012. + * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. |
From: SourceForge.net <no...@so...> - 2012-10-16 14:24:43
|
Bugs item #3567422, was opened at 2012-09-13 09:18 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Vroo () Assigned to: Oleg Broytman (phd) Summary: lazyUpdate is resetting fields to default values when read Initial Comment: I'm trying to use SQLObject's lazyUpdate feature and my data is getting clobbered. Here's the class definition class T(sqlobject.SQLObject): class sqlmeta: lazyUpdate = True def __enter__(self): return self def __exit__(self, type, value, traceback): if self.sqlmeta.dirty: self.syncUpdate() return False foo = IntCol() bar = IntCol(default=None) The context manager functions are so I can write something like: with T.select().getOne() as t: # update t Everything seems to work fine when I'm creating the objects. However, when I'm just reading the objects, fields with default values (like bar above) are getting reset to their default values. For example, given def get_rows(): rows = T.select() return list(repr(r) for r in rows) If I call get_rows repeatedly, I find that the first time I get the correct data and subsequent times some or all of the rows have their values replaced by their defaults. Eventually all the rows are reset to defaults. Fields without default values are not touched. If I comment out the line that sets lazyUpdate in the class definition, it works fine (presumably with many more writes to the db). If I comment out the call to syncUpdate it still fails. Changing the default to a different value (like -1) still fails (and values get reset to -1 not None). It's not some lingering schema setting as I've deleted the table and recreated it multiple times as I've been trying to resolve the problem. FWIW, I'm using SQLObject 1.3.1, Python 2.7 and PostreSQL 9.1. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-10-16 07:24 Message: Any progress with test scripts? ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:44 Message: Yes, SF tracker is not the best tool for beginners; it takes some time to master it. The smaller script you can provide the better. Waiting... ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 11:30 Message: Sorry about that. I've never used a bug tracking system before that hides the conversation so I didn't see your comment. All I saw was the resolution change. It repros very reliably in my program. I can't give you my whole program but I can try and pare it down. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:02 Message: And without reliable way to reproduce the problem I cannot provide a fix. I cannot even be sure it's a problem in SQLObject and not in your program or other libraries. Please demonstrate the bug. ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 10:50 Message: This resolution is not helpful. It doesn't work for me. This is a catastrophic failure. It doesn't reset the data on every read but it always does eventually. Without a fix, I have no choice but to stop using sqlobject. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-09-21 11:48 Message: I cannot reproduce the problem; SQLObject 1.3.0, SQLite, Postgres. Can you write a simple test scripts (or a pair of scripts -- an initialization and a test) that demonstrates the problem? As simple as possible, i.e. without making the table a context manager and so on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 |
From: <sub...@co...> - 2012-10-09 14:12:02
|
Author: phd Date: Tue Oct 9 08:11:51 2012 New Revision: 4560 Log: Merged revision 4558 from branch 1.2: recreate existing tables in case the tests run for the 2nd time (Neil Muller). Modified: SQLObject/trunk/sqlobject/tests/test_asdict.py SQLObject/trunk/sqlobject/tests/test_comparison.py Modified: SQLObject/trunk/sqlobject/tests/test_asdict.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_asdict.py Tue Oct 9 08:11:30 2012 (r4559) +++ SQLObject/trunk/sqlobject/tests/test_asdict.py Tue Oct 9 08:11:51 2012 (r4560) @@ -10,6 +10,6 @@ name2 = StringCol(length=10) def test_asDict(): - setupClass(TestAsDict) + setupClass(TestAsDict, force=True) t1 = TestAsDict(name='one', name2='1') assert t1.sqlmeta.asDict() == dict(name='one', name2='1', id=1) Modified: SQLObject/trunk/sqlobject/tests/test_comparison.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_comparison.py Tue Oct 9 08:11:30 2012 (r4559) +++ SQLObject/trunk/sqlobject/tests/test_comparison.py Tue Oct 9 08:11:51 2012 (r4560) @@ -5,7 +5,7 @@ pass def test_eq(): - setupClass(TestComparison) + setupClass(TestComparison, force=True) t1 = TestComparison() t2 = TestComparison() |
From: <sub...@co...> - 2012-10-09 14:11:41
|
Author: phd Date: Tue Oct 9 08:11:30 2012 New Revision: 4559 Log: Merged revision 4558 from branch 1.2: recreate existing tables in case the tests run for the 2nd time (Neil Muller). Modified: SQLObject/branches/1.3/sqlobject/tests/test_asdict.py SQLObject/branches/1.3/sqlobject/tests/test_comparison.py Modified: SQLObject/branches/1.3/sqlobject/tests/test_asdict.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_asdict.py Tue Oct 9 08:09:32 2012 (r4558) +++ SQLObject/branches/1.3/sqlobject/tests/test_asdict.py Tue Oct 9 08:11:30 2012 (r4559) @@ -10,6 +10,6 @@ name2 = StringCol(length=10) def test_asDict(): - setupClass(TestAsDict) + setupClass(TestAsDict, force=True) t1 = TestAsDict(name='one', name2='1') assert t1.sqlmeta.asDict() == dict(name='one', name2='1', id=1) Modified: SQLObject/branches/1.3/sqlobject/tests/test_comparison.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_comparison.py Tue Oct 9 08:09:32 2012 (r4558) +++ SQLObject/branches/1.3/sqlobject/tests/test_comparison.py Tue Oct 9 08:11:30 2012 (r4559) @@ -5,7 +5,7 @@ pass def test_eq(): - setupClass(TestComparison) + setupClass(TestComparison, force=True) t1 = TestComparison() t2 = TestComparison() |
From: <sub...@co...> - 2012-10-09 14:09:43
|
Author: phd Date: Tue Oct 9 08:09:32 2012 New Revision: 4558 Log: Recreate existing tables in case the tests run for the 2nd time (Neil Muller) Modified: SQLObject/branches/1.2/sqlobject/tests/test_asdict.py SQLObject/branches/1.2/sqlobject/tests/test_comparison.py Modified: SQLObject/branches/1.2/sqlobject/tests/test_asdict.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_asdict.py Sun Oct 7 06:13:48 2012 (r4557) +++ SQLObject/branches/1.2/sqlobject/tests/test_asdict.py Tue Oct 9 08:09:32 2012 (r4558) @@ -10,6 +10,6 @@ name2 = StringCol(length=10) def test_asDict(): - setupClass(TestAsDict) + setupClass(TestAsDict, force=True) t1 = TestAsDict(name='one', name2='1') assert t1.sqlmeta.asDict() == dict(name='one', name2='1', id=1) Modified: SQLObject/branches/1.2/sqlobject/tests/test_comparison.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_comparison.py Sun Oct 7 06:13:48 2012 (r4557) +++ SQLObject/branches/1.2/sqlobject/tests/test_comparison.py Tue Oct 9 08:09:32 2012 (r4558) @@ -5,7 +5,7 @@ pass def test_eq(): - setupClass(TestComparison) + setupClass(TestComparison, force=True) t1 = TestComparison() t2 = TestComparison() |
From: <sub...@co...> - 2012-10-07 12:13:54
|
Author: phd Date: Sun Oct 7 06:13:48 2012 New Revision: 4557 Log: Merged revision 4556 from branch 1.3: discard transactions (Neil Muller) Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/tests/test_SQLMultipleJoin.py SQLObject/trunk/sqlobject/tests/test_SQLRelatedJoin.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sun Oct 7 06:12:39 2012 (r4556) +++ SQLObject/trunk/docs/News.txt Sun Oct 7 06:13:48 2012 (r4557) @@ -13,7 +13,7 @@ SQLObject 1.3.2 =============== -* A bugfix was ported from `SQLObject 1.2.4`_. +* A number of bugfixes were ported from `SQLObject 1.2.4`_. SQLObject 1.3.1 =============== @@ -43,6 +43,8 @@ * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. +* Neil Muller fixed a number of tests. + SQLObject 1.2.3 =============== Modified: SQLObject/trunk/sqlobject/tests/test_SQLMultipleJoin.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_SQLMultipleJoin.py Sun Oct 7 06:12:39 2012 (r4556) +++ SQLObject/trunk/sqlobject/tests/test_SQLMultipleJoin.py Sun Oct 7 06:13:48 2012 (r4557) @@ -53,4 +53,5 @@ assert namek.fightersAsSResult.count() == 1 assert namek.fightersAsSResult[0]._connection == trans finally: - Race._connection.autoCommit = True \ No newline at end of file + trans.commit(True) + Race._connection.autoCommit = True Modified: SQLObject/trunk/sqlobject/tests/test_SQLRelatedJoin.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_SQLRelatedJoin.py Sun Oct 7 06:12:39 2012 (r4556) +++ SQLObject/trunk/sqlobject/tests/test_SQLRelatedJoin.py Sun Oct 7 06:13:48 2012 (r4557) @@ -54,5 +54,5 @@ assert t1.fightersAsSResult.count() == 1 assert t1.fightersAsSResult[0]._connection == trans finally: + trans.commit(True) Tourtment._connection.autoCommit = True - |
From: <sub...@co...> - 2012-10-07 12:12:46
|
Author: phd Date: Sun Oct 7 06:12:39 2012 New Revision: 4556 Log: Merged revision 4555 from branch 1.2: discard transactions (Neil Muller) Modified: SQLObject/branches/1.3/docs/News.txt SQLObject/branches/1.3/sqlobject/tests/test_SQLMultipleJoin.py SQLObject/branches/1.3/sqlobject/tests/test_SQLRelatedJoin.py Modified: SQLObject/branches/1.3/docs/News.txt ============================================================================== --- SQLObject/branches/1.3/docs/News.txt Sun Oct 7 06:09:33 2012 (r4555) +++ SQLObject/branches/1.3/docs/News.txt Sun Oct 7 06:12:39 2012 (r4556) @@ -10,7 +10,7 @@ SQLObject 1.3.2 =============== -* A bugfix was ported from `SQLObject 1.2.4`_. +* A number of bugfixes were ported from `SQLObject 1.2.4`_. SQLObject 1.3.1 =============== @@ -40,6 +40,8 @@ * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. +* Neil Muller fixed a number of tests. + SQLObject 1.2.3 =============== Modified: SQLObject/branches/1.3/sqlobject/tests/test_SQLMultipleJoin.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_SQLMultipleJoin.py Sun Oct 7 06:09:33 2012 (r4555) +++ SQLObject/branches/1.3/sqlobject/tests/test_SQLMultipleJoin.py Sun Oct 7 06:12:39 2012 (r4556) @@ -53,4 +53,5 @@ assert namek.fightersAsSResult.count() == 1 assert namek.fightersAsSResult[0]._connection == trans finally: - Race._connection.autoCommit = True \ No newline at end of file + trans.commit(True) + Race._connection.autoCommit = True Modified: SQLObject/branches/1.3/sqlobject/tests/test_SQLRelatedJoin.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_SQLRelatedJoin.py Sun Oct 7 06:09:33 2012 (r4555) +++ SQLObject/branches/1.3/sqlobject/tests/test_SQLRelatedJoin.py Sun Oct 7 06:12:39 2012 (r4556) @@ -54,5 +54,5 @@ assert t1.fightersAsSResult.count() == 1 assert t1.fightersAsSResult[0]._connection == trans finally: + trans.commit(True) Tourtment._connection.autoCommit = True - |
From: <sub...@co...> - 2012-10-07 12:09:41
|
Author: phd Date: Sun Oct 7 06:09:33 2012 New Revision: 4555 Log: Discard transactions (Neil Muller) Modified: SQLObject/branches/1.2/docs/News.txt SQLObject/branches/1.2/sqlobject/tests/test_SQLMultipleJoin.py SQLObject/branches/1.2/sqlobject/tests/test_SQLRelatedJoin.py Modified: SQLObject/branches/1.2/docs/News.txt ============================================================================== --- SQLObject/branches/1.2/docs/News.txt Sat Oct 6 10:49:42 2012 (r4554) +++ SQLObject/branches/1.2/docs/News.txt Sun Oct 7 06:09:33 2012 (r4555) @@ -13,6 +13,8 @@ * Fixed a bug in sqlbuilder.Select.filter - removed comparison with SQLTrueClause. +* Neil Muller fixed a number of tests. + SQLObject 1.2.3 =============== Modified: SQLObject/branches/1.2/sqlobject/tests/test_SQLMultipleJoin.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_SQLMultipleJoin.py Sat Oct 6 10:49:42 2012 (r4554) +++ SQLObject/branches/1.2/sqlobject/tests/test_SQLMultipleJoin.py Sun Oct 7 06:09:33 2012 (r4555) @@ -53,4 +53,5 @@ assert namek.fightersAsSResult.count() == 1 assert namek.fightersAsSResult[0]._connection == trans finally: - Race._connection.autoCommit = True \ No newline at end of file + trans.commit(True) + Race._connection.autoCommit = True Modified: SQLObject/branches/1.2/sqlobject/tests/test_SQLRelatedJoin.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_SQLRelatedJoin.py Sat Oct 6 10:49:42 2012 (r4554) +++ SQLObject/branches/1.2/sqlobject/tests/test_SQLRelatedJoin.py Sun Oct 7 06:09:33 2012 (r4555) @@ -54,5 +54,5 @@ assert t1.fightersAsSResult.count() == 1 assert t1.fightersAsSResult[0]._connection == trans finally: + trans.commit(True) Tourtment._connection.autoCommit = True - |
From: <sub...@co...> - 2012-10-06 16:49:48
|
Author: phd Date: Sat Oct 6 10:49:42 2012 New Revision: 4554 Log: Merged revision 4552 from branch 1.2: drop table in case the test is being run for the second time on the same DB Modified: SQLObject/trunk/sqlobject/tests/test_perConnection.py Modified: SQLObject/trunk/sqlobject/tests/test_perConnection.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_perConnection.py Sat Oct 6 10:49:16 2012 (r4553) +++ SQLObject/trunk/sqlobject/tests/test_perConnection.py Sat Oct 6 10:49:42 2012 (r4554) @@ -10,6 +10,7 @@ def test_perConnection(): connection = getConnection() + TestPerConnection.dropTable(connection=connection, ifExists=True) TestPerConnection.createTable(connection=connection) TestPerConnection(test='test', connection=connection) assert len(list(TestPerConnection.select(TestPerConnection.q.test=='test', connection=connection))) == 1 |
From: <sub...@co...> - 2012-10-06 16:49:22
|
Author: phd Date: Sat Oct 6 10:49:16 2012 New Revision: 4553 Log: Merged revision 4552 from branch 1.2: drop table in case the test is being run for the second time on the same DB Modified: SQLObject/branches/1.3/sqlobject/tests/test_perConnection.py Modified: SQLObject/branches/1.3/sqlobject/tests/test_perConnection.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_perConnection.py Sat Oct 6 10:38:19 2012 (r4552) +++ SQLObject/branches/1.3/sqlobject/tests/test_perConnection.py Sat Oct 6 10:49:16 2012 (r4553) @@ -10,6 +10,7 @@ def test_perConnection(): connection = getConnection() + TestPerConnection.dropTable(connection=connection, ifExists=True) TestPerConnection.createTable(connection=connection) TestPerConnection(test='test', connection=connection) assert len(list(TestPerConnection.select(TestPerConnection.q.test=='test', connection=connection))) == 1 |
From: <sub...@co...> - 2012-10-06 16:38:25
|
Author: phd Date: Sat Oct 6 10:38:19 2012 New Revision: 4552 Log: Drop table in case the test is being run for the second time on the same DB Modified: SQLObject/branches/1.2/sqlobject/tests/test_perConnection.py Modified: SQLObject/branches/1.2/sqlobject/tests/test_perConnection.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_perConnection.py Sat Oct 6 09:30:42 2012 (r4551) +++ SQLObject/branches/1.2/sqlobject/tests/test_perConnection.py Sat Oct 6 10:38:19 2012 (r4552) @@ -10,6 +10,7 @@ def test_perConnection(): connection = getConnection() + TestPerConnection.dropTable(connection=connection, ifExists=True) TestPerConnection.createTable(connection=connection) TestPerConnection(test='test', connection=connection) assert len(list(TestPerConnection.select(TestPerConnection.q.test=='test', connection=connection))) == 1 |
From: <sub...@co...> - 2012-10-06 16:07:24
|
Author: phd Date: Sat Oct 6 09:24:46 2012 New Revision: 4548 Log: Neil Muller fixed most of the doctests. Modified: SQLObject/branches/1.2/docs/SQLObject.txt Modified: SQLObject/branches/1.2/docs/SQLObject.txt ============================================================================== --- SQLObject/branches/1.2/docs/SQLObject.txt Sun Jun 24 06:19:26 2012 (r4547) +++ SQLObject/branches/1.2/docs/SQLObject.txt Sat Oct 6 09:24:46 2012 (r4548) @@ -212,6 +212,7 @@ Now we'll create the table in the database:: >>> Person.createTable() + [] We can change the type of the various columns by using something other than `StringCol`, or using different arguments. More about this in @@ -302,13 +303,16 @@ >>> Person._connection.debug = True >>> p = Person(firstName='Bob', lastName='Hope') 1/QueryIns: INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') + 1/QueryR : INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') 1/COMMIT : auto - 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE id = 2 + 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) + 1/QueryR : SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) 1/COMMIT : auto >>> p <Person 2 firstName='Bob' middleInitial=None lastName='Hope'> >>> p.middleInitial = 'Q' - 1/Query : UPDATE person SET middle_initial = 'Q' WHERE id = 2 + 1/Query : UPDATE person SET middle_initial = ('Q') WHERE id = (2) + 1/QueryR : UPDATE person SET middle_initial = ('Q') WHERE id = (2) 1/COMMIT : auto >>> p2 = Person.get(1) >>> # Note: no database access, since we're just grabbing the same @@ -347,7 +351,8 @@ >>> Person._connection.debug = True >>> peeps = Person.select(Person.q.firstName=="John") >>> list(peeps) - 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE (person.first_name = 'John') + 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) + 1/QueryR : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) 1/COMMIT : auto [<Person 1 firstName='John' middleInitial='Q' lastName='Doe'>] @@ -368,6 +373,7 @@ statements with these it'll give you the SQL for that statement. You can also create your SQL more manually:: + >>> Person._connection.debug = False # Needed for doctests >>> peeps = Person.select("""address.person_id = person.id AND ... address.zip LIKE '504%'""", ... clauseTables=['address']) @@ -523,6 +529,7 @@ ... 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 @@ -611,7 +618,9 @@ ... users = RelatedJoin('User') >>> User.createTable() + [] >>> Role.createTable() + [] .. note:: |
From: <sub...@co...> - 2012-10-06 16:07:18
|
Author: phd Date: Sat Oct 6 09:29:37 2012 New Revision: 4550 Log: Merged revisions 4548, 4549 from branch 1.2: Neil Muller fixed some of the tests Modified: SQLObject/branches/1.3/docs/SQLObject.txt SQLObject/branches/1.3/sqlobject/tests/test_sqlbuilder_joins_instances.py Modified: SQLObject/branches/1.3/docs/SQLObject.txt ============================================================================== --- SQLObject/branches/1.3/docs/SQLObject.txt Sat Oct 6 09:26:59 2012 (r4549) +++ SQLObject/branches/1.3/docs/SQLObject.txt Sat Oct 6 09:29:37 2012 (r4550) @@ -212,6 +212,7 @@ Now we'll create the table in the database:: >>> Person.createTable() + [] We can change the type of the various columns by using something other than `StringCol`, or using different arguments. More about this in @@ -302,13 +303,16 @@ >>> Person._connection.debug = True >>> p = Person(firstName='Bob', lastName='Hope') 1/QueryIns: INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') + 1/QueryR : INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') 1/COMMIT : auto - 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE id = 2 + 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) + 1/QueryR : SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) 1/COMMIT : auto >>> p <Person 2 firstName='Bob' middleInitial=None lastName='Hope'> >>> p.middleInitial = 'Q' - 1/Query : UPDATE person SET middle_initial = 'Q' WHERE id = 2 + 1/Query : UPDATE person SET middle_initial = ('Q') WHERE id = (2) + 1/QueryR : UPDATE person SET middle_initial = ('Q') WHERE id = (2) 1/COMMIT : auto >>> p2 = Person.get(1) >>> # Note: no database access, since we're just grabbing the same @@ -347,7 +351,8 @@ >>> Person._connection.debug = True >>> peeps = Person.select(Person.q.firstName=="John") >>> list(peeps) - 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE (person.first_name = 'John') + 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) + 1/QueryR : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) 1/COMMIT : auto [<Person 1 firstName='John' middleInitial='Q' lastName='Doe'>] @@ -368,6 +373,7 @@ statements with these it'll give you the SQL for that statement. You can also create your SQL more manually:: + >>> Person._connection.debug = False # Needed for doctests >>> peeps = Person.select("""address.person_id = person.id AND ... address.zip LIKE '504%'""", ... clauseTables=['address']) @@ -523,6 +529,7 @@ ... 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 @@ -611,7 +618,9 @@ ... users = RelatedJoin('User') >>> User.createTable() + [] >>> Role.createTable() + [] .. note:: Modified: SQLObject/branches/1.3/sqlobject/tests/test_sqlbuilder_joins_instances.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:26:59 2012 (r4549) +++ SQLObject/branches/1.3/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:29:37 2012 (r4550) @@ -33,8 +33,9 @@ assert list(SBPerson.select(AND(SBPerson.q.id==SBAddress.q.personID, SBAddress.q.city=='London'))) == \ list(SBAddress.selectBy(city='London').throughTo.person) - assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + + assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testRelatedJoin(): assert list(SBPerson.selectBy(name='Julia').throughTo.sharedAddresses) == \ @@ -53,9 +54,9 @@ list(SBPerson.select(SBPerson.q.name=='Julia').throughTo.sharedAddresses) def testJoin2(): - assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia'))) == \ - list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testFK2(): assert list(SBAddress.select(AND(SBAddress.j.person, SBPerson.q.name=='Julia'))) == \ |
From: <sub...@co...> - 2012-10-06 16:07:08
|
Author: phd Date: Sat Oct 6 09:26:59 2012 New Revision: 4549 Log: Neil Muller fixed the order. Modified: SQLObject/branches/1.2/sqlobject/tests/test_sqlbuilder_joins_instances.py Modified: SQLObject/branches/1.2/sqlobject/tests/test_sqlbuilder_joins_instances.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:24:46 2012 (r4548) +++ SQLObject/branches/1.2/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:26:59 2012 (r4549) @@ -33,8 +33,9 @@ assert list(SBPerson.select(AND(SBPerson.q.id==SBAddress.q.personID, SBAddress.q.city=='London'))) == \ list(SBAddress.selectBy(city='London').throughTo.person) - assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + + assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testRelatedJoin(): assert list(SBPerson.selectBy(name='Julia').throughTo.sharedAddresses) == \ @@ -53,9 +54,9 @@ list(SBPerson.select(SBPerson.q.name=='Julia').throughTo.sharedAddresses) def testJoin2(): - assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia'))) == \ - list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testFK2(): assert list(SBAddress.select(AND(SBAddress.j.person, SBPerson.q.name=='Julia'))) == \ |
From: <sub...@co...> - 2012-10-06 16:07:01
|
Author: phd Date: Sat Oct 6 09:30:42 2012 New Revision: 4551 Log: Merged revision 4550 from branch 1.3: Neil Muller fixed some of the tests Modified: SQLObject/trunk/docs/SQLObject.txt SQLObject/trunk/sqlobject/tests/test_sqlbuilder_joins_instances.py Modified: SQLObject/trunk/docs/SQLObject.txt ============================================================================== --- SQLObject/trunk/docs/SQLObject.txt Sat Oct 6 09:29:37 2012 (r4550) +++ SQLObject/trunk/docs/SQLObject.txt Sat Oct 6 09:30:42 2012 (r4551) @@ -212,6 +212,7 @@ Now we'll create the table in the database:: >>> Person.createTable() + [] We can change the type of the various columns by using something other than `StringCol`, or using different arguments. More about this in @@ -302,13 +303,16 @@ >>> Person._connection.debug = True >>> p = Person(firstName='Bob', lastName='Hope') 1/QueryIns: INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') + 1/QueryR : INSERT INTO person (last_name, middle_initial, first_name) VALUES ('Hope', NULL, 'Bob') 1/COMMIT : auto - 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE id = 2 + 1/QueryOne: SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) + 1/QueryR : SELECT first_name, middle_initial, last_name FROM person WHERE ((person.id) = (2)) 1/COMMIT : auto >>> p <Person 2 firstName='Bob' middleInitial=None lastName='Hope'> >>> p.middleInitial = 'Q' - 1/Query : UPDATE person SET middle_initial = 'Q' WHERE id = 2 + 1/Query : UPDATE person SET middle_initial = ('Q') WHERE id = (2) + 1/QueryR : UPDATE person SET middle_initial = ('Q') WHERE id = (2) 1/COMMIT : auto >>> p2 = Person.get(1) >>> # Note: no database access, since we're just grabbing the same @@ -347,7 +351,8 @@ >>> Person._connection.debug = True >>> peeps = Person.select(Person.q.firstName=="John") >>> list(peeps) - 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE (person.first_name = 'John') + 1/Select : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) + 1/QueryR : SELECT person.id, person.first_name, person.middle_initial, person.last_name FROM person WHERE ((person.first_name) = ('John')) 1/COMMIT : auto [<Person 1 firstName='John' middleInitial='Q' lastName='Doe'>] @@ -368,6 +373,7 @@ statements with these it'll give you the SQL for that statement. You can also create your SQL more manually:: + >>> Person._connection.debug = False # Needed for doctests >>> peeps = Person.select("""address.person_id = person.id AND ... address.zip LIKE '504%'""", ... clauseTables=['address']) @@ -523,6 +529,7 @@ ... 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 @@ -611,7 +618,9 @@ ... users = RelatedJoin('User') >>> User.createTable() + [] >>> Role.createTable() + [] .. note:: Modified: SQLObject/trunk/sqlobject/tests/test_sqlbuilder_joins_instances.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:29:37 2012 (r4550) +++ SQLObject/trunk/sqlobject/tests/test_sqlbuilder_joins_instances.py Sat Oct 6 09:30:42 2012 (r4551) @@ -33,8 +33,9 @@ assert list(SBPerson.select(AND(SBPerson.q.id==SBAddress.q.personID, SBAddress.q.city=='London'))) == \ list(SBAddress.selectBy(city='London').throughTo.person) - assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + + assert list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testRelatedJoin(): assert list(SBPerson.selectBy(name='Julia').throughTo.sharedAddresses) == \ @@ -53,9 +54,9 @@ list(SBPerson.select(SBPerson.q.name=='Julia').throughTo.sharedAddresses) def testJoin2(): - assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia'))) == \ - list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia'))) == \ - list(SBPerson.selectBy(name='Julia').throughTo.addresses) + assert list(SBAddress.select(AND(SBPerson.j.addresses, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBAddress.select(AND(SBPerson.q.id==SBAddress.q.personID, SBPerson.q.name=='Julia')).orderBy(SBAddress.q.city)) == \ + list(SBPerson.selectBy(name='Julia').throughTo.addresses.orderBy(SBAddress.q.city)) def testFK2(): assert list(SBAddress.select(AND(SBAddress.j.person, SBPerson.q.name=='Julia'))) == \ |
From: SourceForge.net <no...@so...> - 2012-10-03 18:44:02
|
Bugs item #3567422, was opened at 2012-09-13 09:18 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Vroo () Assigned to: Oleg Broytman (phd) Summary: lazyUpdate is resetting fields to default values when read Initial Comment: I'm trying to use SQLObject's lazyUpdate feature and my data is getting clobbered. Here's the class definition class T(sqlobject.SQLObject): class sqlmeta: lazyUpdate = True def __enter__(self): return self def __exit__(self, type, value, traceback): if self.sqlmeta.dirty: self.syncUpdate() return False foo = IntCol() bar = IntCol(default=None) The context manager functions are so I can write something like: with T.select().getOne() as t: # update t Everything seems to work fine when I'm creating the objects. However, when I'm just reading the objects, fields with default values (like bar above) are getting reset to their default values. For example, given def get_rows(): rows = T.select() return list(repr(r) for r in rows) If I call get_rows repeatedly, I find that the first time I get the correct data and subsequent times some or all of the rows have their values replaced by their defaults. Eventually all the rows are reset to defaults. Fields without default values are not touched. If I comment out the line that sets lazyUpdate in the class definition, it works fine (presumably with many more writes to the db). If I comment out the call to syncUpdate it still fails. Changing the default to a different value (like -1) still fails (and values get reset to -1 not None). It's not some lingering schema setting as I've deleted the table and recreated it multiple times as I've been trying to resolve the problem. FWIW, I'm using SQLObject 1.3.1, Python 2.7 and PostreSQL 9.1. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:44 Message: Yes, SF tracker is not the best tool for beginners; it takes some time to master it. The smaller script you can provide the better. Waiting... ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 11:30 Message: Sorry about that. I've never used a bug tracking system before that hides the conversation so I didn't see your comment. All I saw was the resolution change. It repros very reliably in my program. I can't give you my whole program but I can try and pare it down. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:02 Message: And without reliable way to reproduce the problem I cannot provide a fix. I cannot even be sure it's a problem in SQLObject and not in your program or other libraries. Please demonstrate the bug. ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 10:50 Message: This resolution is not helpful. It doesn't work for me. This is a catastrophic failure. It doesn't reset the data on every read but it always does eventually. Without a fix, I have no choice but to stop using sqlobject. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-09-21 11:48 Message: I cannot reproduce the problem; SQLObject 1.3.0, SQLite, Postgres. Can you write a simple test scripts (or a pair of scripts -- an initialization and a test) that demonstrates the problem? As simple as possible, i.e. without making the table a context manager and so on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-10-03 18:30:34
|
Bugs item #3567422, was opened at 2012-09-13 09:18 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Vroo () Assigned to: Oleg Broytman (phd) Summary: lazyUpdate is resetting fields to default values when read Initial Comment: I'm trying to use SQLObject's lazyUpdate feature and my data is getting clobbered. Here's the class definition class T(sqlobject.SQLObject): class sqlmeta: lazyUpdate = True def __enter__(self): return self def __exit__(self, type, value, traceback): if self.sqlmeta.dirty: self.syncUpdate() return False foo = IntCol() bar = IntCol(default=None) The context manager functions are so I can write something like: with T.select().getOne() as t: # update t Everything seems to work fine when I'm creating the objects. However, when I'm just reading the objects, fields with default values (like bar above) are getting reset to their default values. For example, given def get_rows(): rows = T.select() return list(repr(r) for r in rows) If I call get_rows repeatedly, I find that the first time I get the correct data and subsequent times some or all of the rows have their values replaced by their defaults. Eventually all the rows are reset to defaults. Fields without default values are not touched. If I comment out the line that sets lazyUpdate in the class definition, it works fine (presumably with many more writes to the db). If I comment out the call to syncUpdate it still fails. Changing the default to a different value (like -1) still fails (and values get reset to -1 not None). It's not some lingering schema setting as I've deleted the table and recreated it multiple times as I've been trying to resolve the problem. FWIW, I'm using SQLObject 1.3.1, Python 2.7 and PostreSQL 9.1. ---------------------------------------------------------------------- >Comment By: Vroo () Date: 2012-10-03 11:30 Message: Sorry about that. I've never used a bug tracking system before that hides the conversation so I didn't see your comment. All I saw was the resolution change. It repros very reliably in my program. I can't give you my whole program but I can try and pare it down. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:02 Message: And without reliable way to reproduce the problem I cannot provide a fix. I cannot even be sure it's a problem in SQLObject and not in your program or other libraries. Please demonstrate the bug. ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 10:50 Message: This resolution is not helpful. It doesn't work for me. This is a catastrophic failure. It doesn't reset the data on every read but it always does eventually. Without a fix, I have no choice but to stop using sqlobject. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-09-21 11:48 Message: I cannot reproduce the problem; SQLObject 1.3.0, SQLite, Postgres. Can you write a simple test scripts (or a pair of scripts -- an initialization and a test) that demonstrates the problem? As simple as possible, i.e. without making the table a context manager and so on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-10-03 18:02:16
|
Bugs item #3567422, was opened at 2012-09-13 09:18 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Vroo () Assigned to: Oleg Broytman (phd) Summary: lazyUpdate is resetting fields to default values when read Initial Comment: I'm trying to use SQLObject's lazyUpdate feature and my data is getting clobbered. Here's the class definition class T(sqlobject.SQLObject): class sqlmeta: lazyUpdate = True def __enter__(self): return self def __exit__(self, type, value, traceback): if self.sqlmeta.dirty: self.syncUpdate() return False foo = IntCol() bar = IntCol(default=None) The context manager functions are so I can write something like: with T.select().getOne() as t: # update t Everything seems to work fine when I'm creating the objects. However, when I'm just reading the objects, fields with default values (like bar above) are getting reset to their default values. For example, given def get_rows(): rows = T.select() return list(repr(r) for r in rows) If I call get_rows repeatedly, I find that the first time I get the correct data and subsequent times some or all of the rows have their values replaced by their defaults. Eventually all the rows are reset to defaults. Fields without default values are not touched. If I comment out the line that sets lazyUpdate in the class definition, it works fine (presumably with many more writes to the db). If I comment out the call to syncUpdate it still fails. Changing the default to a different value (like -1) still fails (and values get reset to -1 not None). It's not some lingering schema setting as I've deleted the table and recreated it multiple times as I've been trying to resolve the problem. FWIW, I'm using SQLObject 1.3.1, Python 2.7 and PostreSQL 9.1. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-10-03 11:02 Message: And without reliable way to reproduce the problem I cannot provide a fix. I cannot even be sure it's a problem in SQLObject and not in your program or other libraries. Please demonstrate the bug. ---------------------------------------------------------------------- Comment By: Vroo () Date: 2012-10-03 10:50 Message: This resolution is not helpful. It doesn't work for me. This is a catastrophic failure. It doesn't reset the data on every read but it always does eventually. Without a fix, I have no choice but to stop using sqlobject. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-09-21 11:48 Message: I cannot reproduce the problem; SQLObject 1.3.0, SQLite, Postgres. Can you write a simple test scripts (or a pair of scripts -- an initialization and a test) that demonstrates the problem? As simple as possible, i.e. without making the table a context manager and so on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-10-03 17:50:13
|
Bugs item #3567422, was opened at 2012-09-13 09:18 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Vroo () Assigned to: Oleg Broytman (phd) Summary: lazyUpdate is resetting fields to default values when read Initial Comment: I'm trying to use SQLObject's lazyUpdate feature and my data is getting clobbered. Here's the class definition class T(sqlobject.SQLObject): class sqlmeta: lazyUpdate = True def __enter__(self): return self def __exit__(self, type, value, traceback): if self.sqlmeta.dirty: self.syncUpdate() return False foo = IntCol() bar = IntCol(default=None) The context manager functions are so I can write something like: with T.select().getOne() as t: # update t Everything seems to work fine when I'm creating the objects. However, when I'm just reading the objects, fields with default values (like bar above) are getting reset to their default values. For example, given def get_rows(): rows = T.select() return list(repr(r) for r in rows) If I call get_rows repeatedly, I find that the first time I get the correct data and subsequent times some or all of the rows have their values replaced by their defaults. Eventually all the rows are reset to defaults. Fields without default values are not touched. If I comment out the line that sets lazyUpdate in the class definition, it works fine (presumably with many more writes to the db). If I comment out the call to syncUpdate it still fails. Changing the default to a different value (like -1) still fails (and values get reset to -1 not None). It's not some lingering schema setting as I've deleted the table and recreated it multiple times as I've been trying to resolve the problem. FWIW, I'm using SQLObject 1.3.1, Python 2.7 and PostreSQL 9.1. ---------------------------------------------------------------------- >Comment By: Vroo () Date: 2012-10-03 10:50 Message: This resolution is not helpful. It doesn't work for me. This is a catastrophic failure. It doesn't reset the data on every read but it always does eventually. Without a fix, I have no choice but to stop using sqlobject. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-09-21 11:48 Message: I cannot reproduce the problem; SQLObject 1.3.0, SQLite, Postgres. Can you write a simple test scripts (or a pair of scripts -- an initialization and a test) that demonstrates the problem? As simple as possible, i.e. without making the table a context manager and so on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3567422&group_id=74338 |