sqlobject-cvs Mailing List for SQLObject (Page 70)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: SourceForge.net <no...@so...> - 2008-03-10 16:11:58
|
Bugs item #1665328, was opened at 2007-02-21 12:36 Message generated for change (Comment added) made by llucax You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1665328&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: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Leandro Lucarella (llucax) Assigned to: Oleg Broytmann (phd) Summary: childName column broken on leaf InheritableSQLObjects Initial Comment: from sqlobject import * from sqlobject.inheritance import InheritableSQLObject __connection__ = 'sqlite:///:memory:' class Base(InheritableSQLObject): base = IntCol() Base.createTable() class Derived(Base): derived = IntCol() Derived.createTable() class Derived2(Derived): _inheritable = False derived2 = IntCol() Derived2.createTable() Base(base=1) Derived(base=2, derived=2) Derived2(base=3, derived=3, derived2=3) print Base.get(1).childName # ok (None) print Base.get(2).childName # ok (None) print Base.get(3).childName Traceback (most recent call last): File "<stdin>", line 1, in ? File "<string>", line 1, in <lambda> File "sqlobject/main.py", line 987, in _SO_loadValue result = getattr(self, attrName) AttributeError: 'Derived2' object has no attribute '_SO_val_childName' Besides the bug, what's the idea of having a 'childName' attribute if it always return None? ---------------------------------------------------------------------- >Comment By: Leandro Lucarella (llucax) Date: 2008-03-10 13:11 Message: Logged In: YES user_id=240225 Originator: YES I'm closing this bug since was somehow invalid. ---------------------------------------------------------------------- Comment By: Leandro Lucarella (llucax) Date: 2007-02-23 10:17 Message: Logged In: YES user_id=240225 Originator: YES Yes, sorry about that one, I've just realized I was using Base and not Derived2 :S Anyways, it's an odd behavior, when trying to reconstruct an InheritableSQLObject, finding the parents and obtaining it's sqlmeta.columns, one have to be careful to see if the _intheritable flag is set in the leaf to check if the childName is really present or not. I'm more, and more convinced that childName should be treated specially, like the "id" column since it's such an special case (a SQLObject artifact, and not user data). I hope you reconsider reopening 1665322. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-23 09:38 Message: Logged In: YES user_id=4799 Originator: NO But it is not listed in Derived2.sqlmeta.columns: <class '__main__.Derived2'> {'derived2': <SOIntCol derived2>} This is exactly what "_inheritable=False" does - it removes childName from the leaf class(es). ---------------------------------------------------------------------- Comment By: Leandro Lucarella (llucax) Date: 2007-02-23 09:12 Message: Logged In: YES user_id=240225 Originator: YES But it's listed into the sqlmeta.columns: print Base.sqlmeta.columns {'base': <SOIntCol base>, 'childName': <SOStringCol childName default=None>} ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-22 16:50 Message: Logged In: YES user_id=4799 Originator: NO Oops, sorry, I reproduced the traceback. It is not a bug. You have disabled childName column by setting _inheritable = False. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-02-22 16:48 Message: Logged In: YES user_id=4799 Originator: NO I cannot reproduce the bug. The program print 3 None's for me. SQLObject 0.7.3. As for the None's... I have to think about it... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1665328&group_id=74338 |
|
From: <sub...@co...> - 2008-03-10 12:25:39
|
Author: phd Date: 2008-03-10 06:25:31 -0600 (Mon, 10 Mar 2008) New Revision: 3320 Modified: SQLObject/trunk/docs/SQLObject.txt Log: Fixed hrefs to pymssql and adodbapi. Modified: SQLObject/trunk/docs/SQLObject.txt =================================================================== --- SQLObject/trunk/docs/SQLObject.txt 2008-03-10 12:24:58 UTC (rev 3319) +++ SQLObject/trunk/docs/SQLObject.txt 2008-03-10 12:25:31 UTC (rev 3320) @@ -1751,7 +1751,7 @@ SQL Server on a "named" port, make sure to specify the port number in the URI. -The two drivers currently supported are: +The two drivers currently supported are pymssql_ and adodbapi_. .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ |
|
From: <sub...@co...> - 2008-03-10 12:25:05
|
Author: phd Date: 2008-03-10 06:24:58 -0600 (Mon, 10 Mar 2008) New Revision: 3319 Modified: SQLObject/branches/0.10/docs/SQLObject.txt Log: Fixed hrefs to pymssql and adodbapi. Modified: SQLObject/branches/0.10/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.10/docs/SQLObject.txt 2008-03-10 12:23:54 UTC (rev 3318) +++ SQLObject/branches/0.10/docs/SQLObject.txt 2008-03-10 12:24:58 UTC (rev 3319) @@ -1751,7 +1751,7 @@ SQL Server on a "named" port, make sure to specify the port number in the URI. -The two drivers currently supported are: +The two drivers currently supported are pymssql_ and adodbapi_. .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ |
|
From: <sub...@co...> - 2008-03-10 12:24:02
|
Author: phd Date: 2008-03-10 06:23:54 -0600 (Mon, 10 Mar 2008) New Revision: 3318 Modified: SQLObject/branches/0.9/docs/SQLObject.txt Log: Fixed hrefs to pymssql and adodbapi. Modified: SQLObject/branches/0.9/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.9/docs/SQLObject.txt 2008-03-10 11:41:34 UTC (rev 3317) +++ SQLObject/branches/0.9/docs/SQLObject.txt 2008-03-10 12:23:54 UTC (rev 3318) @@ -1796,7 +1796,7 @@ SQL Server on a "named" port, make sure to specify the port number in the URI. -The two drivers currently supported are: +The two drivers currently supported are pymssql_ and adodbapi_. .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ |
|
From: <sub...@co...> - 2008-03-10 11:41:41
|
Author: phd
Date: 2008-03-10 05:41:34 -0600 (Mon, 10 Mar 2008)
New Revision: 3317
Modified:
SQLObject/branches/0.9/setup.py
Log:
It is stable.
Modified: SQLObject/branches/0.9/setup.py
===================================================================
--- SQLObject/branches/0.9/setup.py 2008-03-10 11:33:10 UTC (rev 3316)
+++ SQLObject/branches/0.9/setup.py 2008-03-10 11:41:34 UTC (rev 3317)
@@ -55,7 +55,7 @@
],
author="Ian Bicking",
author_email="ia...@co...",
- url="http://sqlobject.org/devel/",
+ url="http://sqlobject.org/",
download_url="http://cheeseshop.python.org/pypi/SQLObject/0.9",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
|
|
From: <sub...@co...> - 2008-03-10 11:33:17
|
Author: phd Date: 2008-03-10 05:33:10 -0600 (Mon, 10 Mar 2008) New Revision: 3316 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.9.5 released 10 Mar 2008. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-03-10 11:32:26 UTC (rev 3315) +++ SQLObject/trunk/docs/News.txt 2008-03-10 11:33:10 UTC (rev 3316) @@ -89,6 +89,8 @@ SQLObject 0.9.5 =============== +Released 10 Mar 2008. + * Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName. * A bug in delColumn() that removes all properties is fixed by recreating |
|
From: <sub...@co...> - 2008-03-10 11:32:30
|
Author: phd Date: 2008-03-10 05:32:26 -0600 (Mon, 10 Mar 2008) New Revision: 3315 Modified: SQLObject/branches/0.10/docs/News.txt Log: SQLObject 0.9.5 released 10 Mar 2008. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-03-10 11:32:12 UTC (rev 3314) +++ SQLObject/branches/0.10/docs/News.txt 2008-03-10 11:32:26 UTC (rev 3315) @@ -81,6 +81,8 @@ SQLObject 0.9.5 =============== +Released 10 Mar 2008. + * Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName. * A bug in delColumn() that removes all properties is fixed by recreating |
|
From: <sub...@co...> - 2008-03-10 11:32:20
|
Author: phd Date: 2008-03-10 05:32:12 -0600 (Mon, 10 Mar 2008) New Revision: 3314 Modified: SQLObject/tags/0.9.5/docs/News.txt SQLObject/tags/0.9.5/setup.cfg SQLObject/tags/0.9.5/setup.py SQLObject/tags/0.9.5/sqlobject/__init__.py SQLObject/tags/0.9.5/sqlobject/main.py Log: SQLObject 0.9.5 released 10 Mar 2008. Modified: SQLObject/tags/0.9.5/docs/News.txt =================================================================== --- SQLObject/tags/0.9.5/docs/News.txt 2008-03-10 11:30:54 UTC (rev 3313) +++ SQLObject/tags/0.9.5/docs/News.txt 2008-03-10 11:32:12 UTC (rev 3314) @@ -10,6 +10,8 @@ SQLObject 0.9.5 =============== +Released 10 Mar 2008. + * Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName. * A bug in delColumn() that removes all properties is fixed by recreating Modified: SQLObject/tags/0.9.5/setup.cfg =================================================================== --- SQLObject/tags/0.9.5/setup.cfg 2008-03-10 11:30:54 UTC (rev 3313) +++ SQLObject/tags/0.9.5/setup.cfg 2008-03-10 11:32:12 UTC (rev 3314) @@ -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/SQLObject.txt docs/TODO.txt Modified: SQLObject/tags/0.9.5/setup.py =================================================================== --- SQLObject/tags/0.9.5/setup.py 2008-03-10 11:30:54 UTC (rev 3313) +++ SQLObject/tags/0.9.5/setup.py 2008-03-10 11:32:12 UTC (rev 3314) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.9", + version="0.9.5", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an @@ -56,7 +56,7 @@ author="Ian Bicking", author_email="ia...@co...", url="http://sqlobject.org/devel/", - download_url="http://cheeseshop.python.org/pypi/SQLObject/0.9", + download_url="http://cheeseshop.python.org/pypi/SQLObject/0.9.5", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], Modified: SQLObject/tags/0.9.5/sqlobject/__init__.py =================================================================== --- SQLObject/tags/0.9.5/sqlobject/__init__.py 2008-03-10 11:30:54 UTC (rev 3313) +++ SQLObject/tags/0.9.5/sqlobject/__init__.py 2008-03-10 11:32:12 UTC (rev 3314) @@ -1,5 +1,5 @@ """ -SQLObject 0.9 +SQLObject 0.9.5 """ from main import * Modified: SQLObject/tags/0.9.5/sqlobject/main.py =================================================================== --- SQLObject/tags/0.9.5/sqlobject/main.py 2008-03-10 11:30:54 UTC (rev 3313) +++ SQLObject/tags/0.9.5/sqlobject/main.py 2008-03-10 11:32:12 UTC (rev 3314) @@ -1,6 +1,6 @@ """ -SQLObject 0.9 -------------- +SQLObject 0.9.5 +--------------- :author: Ian Bicking <ia...@co...> |
|
From: <sub...@co...> - 2008-03-10 11:31:00
|
Author: phd Date: 2008-03-10 05:30:54 -0600 (Mon, 10 Mar 2008) New Revision: 3313 Modified: SQLObject/branches/0.9/docs/News.txt Log: SQLObject 0.9.5 released 10 Mar 2008. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2008-03-10 11:29:19 UTC (rev 3312) +++ SQLObject/branches/0.9/docs/News.txt 2008-03-10 11:30:54 UTC (rev 3313) @@ -10,6 +10,8 @@ SQLObject 0.9.5 =============== +Released 10 Mar 2008. + * Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName. * A bug in delColumn() that removes all properties is fixed by recreating |
|
From: <sub...@co...> - 2008-03-10 11:29:27
|
Author: phd Date: 2008-03-10 05:29:19 -0600 (Mon, 10 Mar 2008) New Revision: 3312 Added: SQLObject/tags/0.9.5/ Log: Tagging 0.9.5 Copied: SQLObject/tags/0.9.5 (from rev 3311, SQLObject/branches/0.9) |
|
From: SourceForge.net <no...@so...> - 2008-03-10 11:25:31
|
Bugs item #1899460, was opened at 2008-02-22 13:04 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1899460&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: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytmann (phd) Summary: delColumn removes to many properties Initial Comment: # After deleting one column other columns are not accessible # It seems that the unmakeProperties method removes all properties # but should only remove the property from the delete column call # Python 2.5.1 # SQLObject 0.10.0b2 from sqlobject import * sqlhub.processConnection = connectionForURI('postgres://test:test@localhost/test') class Author(SQLObject): name = StringCol() xyz = StringCol(default = 'Unused') # This column should be deleted Author.createTable() # Insert some authors Author(name = 'Schiller') Author(name = 'Goethe') # Delete the unnecessary column Author.sqlmeta.delColumn('xyz', changeSchema = True) # ERROR: Can not access the name column print [ author.name for author in Author.select()] # Traceback (most recent call last): # File "delcol-bug.py", line 19, in <module> # print [ author.name for author in Author.select()] # AttributeError: 'Author' object has no attribute 'name' ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-03-10 14:25 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revision 3309-3311 (branches 0.9, 0.10 and the trunk). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1899460&group_id=74338 |
|
From: <sub...@co...> - 2008-03-10 11:21:35
|
Author: phd
Date: 2008-03-10 05:21:30 -0600 (Mon, 10 Mar 2008)
New Revision: 3311
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/main.py
Log:
A bug in delColumn() that removes all properties is fixed by recreating properties.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2008-03-10 11:21:05 UTC (rev 3310)
+++ SQLObject/trunk/docs/News.txt 2008-03-10 11:21:30 UTC (rev 3311)
@@ -91,6 +91,9 @@
* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+* A bug in delColumn() that removes all properties is fixed by recreating
+ properties.
+
SQLObject 0.9.4
===============
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2008-03-10 11:21:05 UTC (rev 3310)
+++ SQLObject/trunk/sqlobject/main.py 2008-03-10 11:21:30 UTC (rev 3311)
@@ -486,6 +486,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
for func in post_funcs:
func(soClass, column)
@@ -580,6 +581,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
delJoin = classmethod(delJoin)
|
|
From: <sub...@co...> - 2008-03-10 11:21:11
|
Author: phd
Date: 2008-03-10 05:21:05 -0600 (Mon, 10 Mar 2008)
New Revision: 3310
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/main.py
Log:
A bug in delColumn() that removes all properties is fixed by recreating properties.
Modified: SQLObject/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2008-03-10 11:20:37 UTC (rev 3309)
+++ SQLObject/branches/0.10/docs/News.txt 2008-03-10 11:21:05 UTC (rev 3310)
@@ -83,6 +83,9 @@
* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+* A bug in delColumn() that removes all properties is fixed by recreating
+ properties.
+
SQLObject 0.9.4
===============
Modified: SQLObject/branches/0.10/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/main.py 2008-03-10 11:20:37 UTC (rev 3309)
+++ SQLObject/branches/0.10/sqlobject/main.py 2008-03-10 11:21:05 UTC (rev 3310)
@@ -486,6 +486,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
for func in post_funcs:
func(soClass, column)
@@ -580,6 +581,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
delJoin = classmethod(delJoin)
|
|
From: <sub...@co...> - 2008-03-10 11:20:45
|
Author: phd
Date: 2008-03-10 05:20:37 -0600 (Mon, 10 Mar 2008)
New Revision: 3309
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/main.py
Log:
A bug in delColumn() that removes all properties is fixed by recreating properties.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2008-03-07 16:15:08 UTC (rev 3308)
+++ SQLObject/branches/0.9/docs/News.txt 2008-03-10 11:20:37 UTC (rev 3309)
@@ -12,6 +12,9 @@
* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+* A bug in delColumn() that removes all properties is fixed by recreating
+ properties.
+
SQLObject 0.9.4
===============
Modified: SQLObject/branches/0.9/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/main.py 2008-03-07 16:15:08 UTC (rev 3308)
+++ SQLObject/branches/0.9/sqlobject/main.py 2008-03-10 11:20:37 UTC (rev 3309)
@@ -489,6 +489,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
for func in post_funcs:
func(soClass, column)
@@ -583,6 +584,7 @@
if soClass._SO_finishedClassCreation:
unmakeProperties(soClass)
+ makeProperties(soClass)
delJoin = classmethod(delJoin)
|
|
From: SourceForge.net <no...@so...> - 2008-03-07 16:27:43
|
Bugs item #1894909, was opened at 2008-02-16 16:49 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1894909&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: MySQL Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Neil Muller (nitwit) Assigned to: Nobody/Anonymous (nobody) Summary: mysqlconenction should handle threads like sqliteconnection Initial Comment: Mysqldb only supports threadsafety level 1, so connections can't be shared between threads. sqlite has the same issues, so mysqlconenction needs similiar logic for dealing with threads. I've attached a patch based on sqliteconnection, which resolves the issue for me. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-03-07 19:27 Message: Logged In: YES user_id=4799 Originator: NO See http://article.gmane.org/gmane.comp.python.sqlobject/9050 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1894909&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2008-03-07 16:16:08
|
Bugs item #1898977, was opened at 2008-02-21 21:00 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1898977&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: MySQL Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Derek Anderson (rantenki) >Assigned to: Oleg Broytmann (phd) Summary: picklecol truncates/corrupts data dangerously Initial Comment: When a picklecol is created, it defaults to a tinyblob. This in itself is probably a good behavior, but when combined with the failure mode of writing too much data, it can be dangerous. For example: {{{ class enomalism_user(TG_User,permissions_mixin): class sqlmeta: table = 'enomalism_user' idName = 'id' uuid = StringCol(length=36,alternateID=True,alternateMethodName='by_uuid',\ default=gen_uuid) lang_pref = StringCol(length=16,varchar=True,alternateID=False,default="en",unique=False,notNone=True) data = PickleCol(title="data",dbName="data",default={},length=2**24) }}} If you write "X"*257 to the data field, it will overflow with a "truncated" error, but that leaves the data in a corrupted state, and an exception is thrown when trying to read the user row. A better solution would be to throw the error, but to not store the data, preventing the exception, and leaving the user data in a usable state. Note: This leaves a Turbogears user in an unusable state, and could lead to a DOS attack. Obviously my obligation is to test for this kind of thing, but it is the ideal behind the SQLO ORM to prevent db based failures by default, so... ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-03-07 19:16 Message: Logged In: YES user_id=4799 Originator: NO Under MySQL, PickleCol no longer uses TEXT column types; the smallest column is now BLOB - it is not possible to create TINYBLOB column. Committed in the revisions 3307, 3308 (0.10 branch and the trunk). Thank you! ---------------------------------------------------------------------- Comment By: Derek Anderson (rantenki) Date: 2008-02-22 02:59 Message: Logged In: YES user_id=1499846 Originator: YES True; I do use MySQL, however, SQLObject makes the decision to use TinyBlob, not me. I have remedied that in my code obviously, but since SQLObject chooses tinyblob, and yet does not seem to be cognizant of the length of TinyBlob when doing a write to it, should not the MySQL SQLObject connector do a if len(pickledOutput)>256: raise ExceptionBeforeStoring ? Either that, or the more elegant solution of defaulting to either MediumBlob or LargeBlob (Medium is probably ample for most jobs). I think tinyblob is probably a little small; most times you need to use pickle will potentially involve more than 256 characters, I think. Other than that, btw; great work on SQLO. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2008-02-21 22:15 Message: Logged In: YES user_id=4799 Originator: NO >From the word "tinyblob" I can guess you use MySQL. It is MySQL that throughs the "overflow" error, far outside of PickleCol. Hence SQLObject cannot "not store the data" - the data has already been sent to MySQL. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2008-02-21 22:15 Message: Logged In: YES user_id=4799 Originator: NO >From the word "tinyblob" I can guess you use MySQL. It is MySQL that throughs the "overflow" error, far outside of PickleCol. Hence SQLObject cannot "not store the data" - the data has already been sent to MySQL. ---------------------------------------------------------------------- Comment By: Derek Anderson (rantenki) Date: 2008-02-21 21:17 Message: Logged In: YES user_id=1499846 Originator: YES !NOTE! Sorry. I should mention that this bug has a length set. The bug only occurs if that length=2**24 keyword is not passed.. Code should have read: {{{ class enomalism_user(TG_User,permissions_mixin): class sqlmeta: table = 'enomalism_user' idName = 'id' uuid = StringCol(length=36,alternateID=True,alternateMethodName='by_uuid',\ default=gen_uuid) lang_pref = StringCol(length=16,varchar=True,alternateID=False,default="en",unique=Fals e,notNone=True) data = PickleCol(title="data",dbName="data",default={}) }}} ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1898977&group_id=74338 |
|
From: <sub...@co...> - 2008-03-07 16:15:14
|
Author: phd
Date: 2008-03-07 09:15:08 -0700 (Fri, 07 Mar 2008)
New Revision: 3308
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/col.py
Log:
Under MySQL, PickleCol no longer used TEXT column types; the smallest
column is now BLOB - it is not possible to create TINYBLOB column.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2008-03-07 16:13:50 UTC (rev 3307)
+++ SQLObject/trunk/docs/News.txt 2008-03-07 16:15:08 UTC (rev 3308)
@@ -83,6 +83,9 @@
* SQLBuilder tablesUsedSet handles sqlrepr'able objects.
+* Under MySQL, PickleCol no longer used TEXT column types; the smallest
+ column is now BLOB - it is not possible to create TINYBLOB column.
+
SQLObject 0.9.5
===============
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2008-03-07 16:13:50 UTC (rev 3307)
+++ SQLObject/trunk/sqlobject/col.py 2008-03-07 16:15:08 UTC (rev 3308)
@@ -1445,6 +1445,14 @@
name=self.name, pickleProtocol=self.pickleProtocol)] + \
super(SOPickleCol, self).createValidators()
+ def _mysqlType(self):
+ length = self.length
+ if length >= 2**24:
+ return "LONGBLOB"
+ if length >= 2**16:
+ return "MEDIUMBLOB"
+ return "BLOB"
+
class PickleCol(BLOBCol):
baseClass = SOPickleCol
|
|
From: <sub...@co...> - 2008-03-07 16:13:56
|
Author: phd
Date: 2008-03-07 09:13:50 -0700 (Fri, 07 Mar 2008)
New Revision: 3307
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/col.py
Log:
Under MySQL, PickleCol no longer uses TEXT column types; the smallest
column is now BLOB - it is not possible to create TINYBLOB column.
Modified: SQLObject/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2008-03-07 15:56:06 UTC (rev 3306)
+++ SQLObject/branches/0.10/docs/News.txt 2008-03-07 16:13:50 UTC (rev 3307)
@@ -75,6 +75,9 @@
* SQLBuilder tablesUsedSet handles sqlrepr'able objects.
+* Under MySQL, PickleCol no longer uses TEXT column types; the smallest
+ column is now BLOB - it is not possible to create TINYBLOB column.
+
SQLObject 0.9.5
===============
Modified: SQLObject/branches/0.10/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/col.py 2008-03-07 15:56:06 UTC (rev 3306)
+++ SQLObject/branches/0.10/sqlobject/col.py 2008-03-07 16:13:50 UTC (rev 3307)
@@ -1448,6 +1448,14 @@
name=self.name, pickleProtocol=self.pickleProtocol)] + \
super(SOPickleCol, self).createValidators()
+ def _mysqlType(self):
+ length = self.length
+ if length >= 2**24:
+ return "LONGBLOB"
+ if length >= 2**16:
+ return "MEDIUMBLOB"
+ return "BLOB"
+
class PickleCol(BLOBCol):
baseClass = SOPickleCol
|
|
From: <sub...@co...> - 2008-03-07 15:56:11
|
Author: phd
Date: 2008-03-07 08:56:06 -0700 (Fri, 07 Mar 2008)
New Revision: 3306
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
Log:
Fixed a bug 1181919 in SQLiteConnection.columnsFromSchema() - set dbName.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2008-03-07 15:55:23 UTC (rev 3305)
+++ SQLObject/trunk/docs/News.txt 2008-03-07 15:56:06 UTC (rev 3306)
@@ -83,6 +83,11 @@
* SQLBuilder tablesUsedSet handles sqlrepr'able objects.
+SQLObject 0.9.5
+===============
+
+* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+
SQLObject 0.9.4
===============
Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2008-03-07 15:55:23 UTC (rev 3305)
+++ SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2008-03-07 15:56:06 UTC (rev 3306)
@@ -329,6 +329,7 @@
else:
index_info = parts[2].strip().upper()
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
+ kw['dbName'] = field
import re
nullble = re.search(r'(\b\S*)\sNULL', index_info)
default = re.search(r"DEFAULT\s((?:\d[\dA-FX.]*)|(?:'[^']*')|(?:#[^#]*#))", index_info)
|
|
From: <sub...@co...> - 2008-03-07 15:55:29
|
Author: phd
Date: 2008-03-07 08:55:23 -0700 (Fri, 07 Mar 2008)
New Revision: 3305
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py
Log:
Fixed a bug 1181919 in SQLiteConnection.columnsFromSchema() - set dbName.
Modified: SQLObject/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2008-03-07 15:53:20 UTC (rev 3304)
+++ SQLObject/branches/0.10/docs/News.txt 2008-03-07 15:55:23 UTC (rev 3305)
@@ -75,6 +75,11 @@
* SQLBuilder tablesUsedSet handles sqlrepr'able objects.
+SQLObject 0.9.5
+===============
+
+* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+
SQLObject 0.9.4
===============
Modified: SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2008-03-07 15:53:20 UTC (rev 3304)
+++ SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2008-03-07 15:55:23 UTC (rev 3305)
@@ -329,6 +329,7 @@
else:
index_info = parts[2].strip().upper()
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
+ kw['dbName'] = field
import re
nullble = re.search(r'(\b\S*)\sNULL', index_info)
default = re.search(r"DEFAULT\s((?:\d[\dA-FX.]*)|(?:'[^']*')|(?:#[^#]*#))", index_info)
|
|
From: SourceForge.net <no...@so...> - 2008-03-07 15:54:15
|
Bugs item #1181919, was opened at 2005-04-13 05:12 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1181919&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Daniel Holth (joeforker) >Assigned to: Oleg Broytmann (phd) Summary: 0.6.1 _fromDatabase = True should imply a style Initial Comment: I have a column named "protectYN" in an existing database. When I try to create a new sqlobject using _fromDatabase = True, sqlobject takes the table's name "protectYN" and converts it to "protect_y_n" as if it was converting a normal user-provided property name to a SQL table name. Then it can't find protect_y_n in the database. Clearly, sqlobject should not change the name of a column when that name originates from the database itself. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-03-07 18:54 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revision 3304 in the SVN. Will be in the release 0.9.5. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1181919&group_id=74338 |
|
From: <sub...@co...> - 2008-03-07 15:53:29
|
Author: phd
Date: 2008-03-07 08:53:20 -0700 (Fri, 07 Mar 2008)
New Revision: 3304
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py
Log:
Fixed a bug 1181919 in SQLiteConnection.columnsFromSchema() - set dbName.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2008-03-07 13:38:30 UTC (rev 3303)
+++ SQLObject/branches/0.9/docs/News.txt 2008-03-07 15:53:20 UTC (rev 3304)
@@ -7,6 +7,11 @@
.. _start:
+SQLObject 0.9.5
+===============
+
+* Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName.
+
SQLObject 0.9.4
===============
Modified: SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2008-03-07 13:38:30 UTC (rev 3303)
+++ SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2008-03-07 15:53:20 UTC (rev 3304)
@@ -329,6 +329,7 @@
else:
index_info = parts[2].strip().upper()
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
+ kw['dbName'] = field
import re
nullble = re.search(r'(\b\S*)\sNULL', index_info)
default = re.search(r"DEFAULT\s((?:\d[\dA-FX.]*)|(?:'[^']*')|(?:#[^#]*#))", index_info)
|
|
From: SourceForge.net <no...@so...> - 2008-03-07 15:44:46
|
Bugs item #1592786, was opened at 2006-11-08 20:20 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&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: SQLite Group: None >Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Jayhem (jayhem) Assigned to: Nobody/Anonymous (nobody) Summary: so-sqlite data corruption during updates Initial Comment: I'm hitting a bug when using SO with turbogears 1.1b with an sqlite database. When I do several successive updates to a table (which are very slow btw), data gets corrupted in the interface, select() returns invalid objects, as if objects were pulled from a cache that was out of synch with the db. >From this point, successive select() without any updates in-between can return different values, randomly selecting one of the previsouly set values. I have created a simple test-case (on turbogears) Just launch it and change some values. Usually after 10-20 changes, the corruption appears. I have tried this same testcase with MySQL and do not hit this problem. Note that dev.cfg declares sqlobject.dburi="notrans_sqlite:///..." file: model.py ====================================================== from sqlobject import * from turbogears.database import PackageHub hub = PackageHub("bug") __connection__ = hub class Item(SQLObject): data = UnicodeCol(length=40) def loaddb(): hub.begin() Item.dropTable(ifExists=True, cascade=True) hub.commit() Item.createTable(ifNotExists=True) for i in range(20): Item(data = str(i)) hub.commit() loaddb() file: controllers.py ====================================================== import turbogears from turbogears.controllers import RootController, expose from model import Item class Root(RootController): @expose(template="bug.templates.index") def index(self): items = Item.select() return dict(items = items) @expose(template="bug.templates.index") def change(self, id): item = Item.get(id) item.data += str(id) items = Item.select() return dict(items = items) file: index.kid ====================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> <title>Items</title> </head> <body> <ul py:for="i in items"> <li>${i.data} <a href="/change/${i.id}">[edit]</a></li> </ul> </body> </html> ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-04-25 17:50 Message: Logged In: YES user_id=4799 Originator: NO > >> TypeError: _init() takes exactly 2 arguments (4 given) Hector, this is a bug in your program, not in SQLObject. You've declared ventas._init() with the following signature: def _init(self,id): But in SQLObject it is def _init(self, id, connection=None, selectResults=None): You must declare you ._init() the same way, and you must pass all parameters to SQLObject: def _init(self, id, connection=None, selectResults=None): SQLObject._init(self, id, connection=connection, selectResults=selectResults) ###Subrayala por favor Now your program works. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-04-21 00:56 Message: Logged In: NO from: he...@en... Bug: so-sqlite data corruption during updates In relation to this, I am running an aplication using only sqlobject, sqlite and python, currently I am not using TG. I have a similar error. I had created quite a few tables using three versions of sqlobject (0.8.2 0.8.1 and the development version 0.10 fron svn) in the three versions it had come with the following error: Traceback (most recent call last): File "<pyshell#16>", line 1, in -toplevel- ventas.get(3) File "/usr/lib/python2.4/site-packages/SQLObject-0.10dev_r2553-py2.4.egg/sqlobject/main.py", line 919, in get val._init(id, connection, selectResults) TypeError: _init() takes exactly 2 arguments (4 given) Currently I am using Debian testing version and sqlite-3-3-14, I am able to isolate the error to the following I create a small table called "ventas" with 24 records in it then I do in python: for x in range(1,25): print x, ventas.get(x) this print: 1 <ventas 1 producto_idID=1 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 2 <ventas 2 producto_idID=1 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 3 <ventas 3 producto_idID=1 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 4 <ventas 4 producto_idID=1 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 5 <ventas 5 producto_idID=2 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 6 <ventas 6 producto_idID=2 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 7 <ventas 7 producto_idID=2 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 8 <ventas 8 producto_idID=2 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 9 <ventas 9 producto_idID=3 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=6.0> 10 <ventas 10 producto_idID=3 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=6.0> 11 <ventas 11 producto_idID=3 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=6.0> 12 <ventas 12 producto_idID=3 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=6.0> 13 <ventas 13 producto_idID=4 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=7.0> 14 <ventas 14 producto_idID=4 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=7.0> 15 <ventas 15 producto_idID=4 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=7.0> 16 <ventas 16 producto_idID=4 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=7.0> 17 <ventas 17 producto_idID=5 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 18 <ventas 18 producto_idID=5 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 19 <ventas 19 producto_idID=5 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 20 <ventas 20 producto_idID=5 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 21 <ventas 21 producto_idID=6 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.5> 22 <ventas 22 producto_idID=6 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.5> 23 <ventas 23 producto_idID=6 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.5> 24 <ventas 24 producto_idID=6 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.5> Then I do: for x in ventas.select(): print x <ventas 1 producto_idID=1 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> <ventas 2 producto_idID=1 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> <ventas 3 producto_idID=1 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> <ventas 4 producto_idID=1 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> <ventas 5 producto_idID=2 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> <ventas 6 producto_idID=2 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> <ventas 7 producto_idID=2 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> <ventas 8 producto_idID=2 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> <ventas 9 producto_idID=3 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=6.0> <ventas 10 producto_idID=3 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=6.0> <ventas 11 producto_idID=3 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=6.0> <ventas 12 producto_idID=3 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=6.0> <ventas 13 producto_idID=4 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=7.0> <ventas 14 producto_idID=4 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=7.0> <ventas 15 producto_idID=4 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=7.0> <ventas 16 producto_idID=4 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=7.0> <ventas 17 producto_idID=5 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> <ventas 18 producto_idID=5 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> <ventas 19 producto_idID=5 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> <ventas 20 producto_idID=5 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> <ventas 21 producto_idID=6 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.5> <ventas 22 producto_idID=6 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.5> <ventas 23 producto_idID=6 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.5> <ventas 24 producto_idID=6 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.5> Then I do: for x in range(1,25): print x, ventas.get(x) 1 <ventas 1 producto_idID=1 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 2 <ventas 2 producto_idID=1 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 3 <ventas 3 producto_idID=1 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 4 <ventas 4 producto_idID=1 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 5 <ventas 5 producto_idID=2 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 6 <ventas 6 producto_idID=2 fecha_idID=2 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 7 <ventas 7 producto_idID=2 fecha_idID=3 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 8 <ventas 8 producto_idID=2 fecha_idID=4 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 9 <ventas 9 producto_idID=3 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=6.0> 10 <ventas 10 producto_idID=3 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=6.0> 11 <ventas 11 producto_idID=3 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=6.0> 12 <ventas 12 producto_idID=3 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=6.0> 13 <ventas 13 producto_idID=4 fecha_idID=1 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=7.0> 14 <ventas 14 producto_idID=4 fecha_idID=2 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=7.0> 15 <ventas 15 producto_idID=4 fecha_idID=3 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=7.0> 16 <ventas 16 producto_idID=4 fecha_idID=4 status_idID=2 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=7.0> 17 <ventas 17 producto_idID=5 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> 18 <ventas 18 producto_idID=5 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.0> 19 <ventas 19 producto_idID=5 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.0> 20 <ventas 20 producto_idID=5 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.0> 21 <ventas 21 producto_idID=6 fecha_idID=1 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.5> 22 <ventas 22 producto_idID=6 fecha_idID=2 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=5000 precio=5.5> 23 <ventas 23 producto_idID=6 fecha_idID=3 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=6000 precio=5.5> 24 <ventas 24 producto_idID=6 fecha_idID=4 status_idID=3 region_idID=1 pais_idID=1 moneda_idID=2 volumen=7000 precio=5.5> The I do: ventas.get(1) <ventas 1 producto_idID=1 fecha_idID=1 status_idID=1 region_idID=1 pais_idID=1 moneda_idID=2 volumen=4000 precio=5.0> Then I do this one: for x in ventas.select(): print x And I obtain this error: Traceback (most recent call last): File "<pyshell#39>", line 1, in -toplevel- for x in ventas.select(): File "/usr/lib/python2.4/site-packages/SQLObject-0.10dev_r2553-py2.4.egg/sqlobject/sresults.py", line 165, in __iter__ return iter(list(self.lazyIter())) File "/usr/lib/python2.4/site-packages/SQLObject-0.10dev_r2553-py2.4.egg/sqlobject/dbconnection.py", line 814, in next obj = self.select.sourceClass.get(result[0], selectResults=result[1:], connection=self.dbconn) File "/usr/lib/python2.4/site-packages/SQLObject-0.10dev_r2553-py2.4.egg/sqlobject/main.py", line 919, in get val._init(id, connection, selectResults) TypeError: _init() takes exactly 2 arguments (4 given) Is important to note that to get the error I had to run the commands in this sequence. Also the database is only corrupted in memory, the file in the hard disk is ok. Also, it is only corrupted in odd registry id record numbers, even records are ok. I am using python2.4.4 I am sorry for the great amount of data posted. ---------------------------------------------------------------------- Comment By: Jayhem (jayhem) Date: 2006-11-14 15:04 Message: Logged In: YES user_id=1640652 You are right. the bug does not seem to cause data corruption in the database (i.e it's not a db related issue), it just causes random results to be returned from queries. Simply switching the database to MySQL solves the problem, which confirms the bug is not in the db. An even more annoying issue, which I think is related, is the extremely slow inserts/updates into sqlite, and frequent error messages telling me the db is locked. I am new to turbogears, sqlobject, sqlite and python, so I'm sorry I won't have time to work on a SqlObject-only testcase. Let me know if I can do anything to help fix this. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-11-13 19:59 Message: Logged In: YES user_id=4799 Our company has been using SQLObject with SQLite for three rather large commercial programs. Neither of our developers, testers or users ever experienced data loss. Are you sure the problem is not TG-related? Please write an SQLObject-only test. In any case I cannot run your program - I don't have TG and not going to install it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1592786&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2008-03-07 15:42:00
|
Bugs item #1378208, was opened at 2005-12-11 20:32 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378208&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: SQLite Group: SQLObject release (specify) >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: SQLite INSERT is painfully slow... Initial Comment: Hello, I wondered why creation of SQLObjects is painfully slow on SQLite. I came up to the following: 1) If I use connectionFromUri, and then extract cursor by calling sqlhub.processConnection._conn.cursor(), I still get EXTREMELY slow INSERTS (10-20 per second) when i run .execute() method of the cursor with just one argument (string). 2) If I use the following, it is very fast (of the : import sqlite, sys s=sqlite.Connection(sys.argv[1]) c=s.cursor() lines=[] for line in open(sys.argv[2], "r"): lines.append(line) try: if line[-2]==";": c.execute(''.join(lines)) lines=[] sys.stderr.write(".") except: pass -- mg...@gm... ---------------------------------------------------------------------- Comment By: Sergey Chernov (sergeych) Date: 2006-09-29 19:07 Message: Logged In: YES user_id=834669 -- can't use SQLobject because of it. Found that it is caused by SQLObject flushing changes too often; as for bulk insertions we have to use SQLite caching abilities maybe together with transactoins; there should be a way to dealy SQLObject calling SQLite.commit() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378208&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2008-03-07 15:29:34
|
Bugs item #1192037, was opened at 2005-04-29 02:44 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1192037&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Postgres Group: SQLObject release (specify) >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Oleg Broytmann (phd) Summary: Must use implicit DEFAULT NULL when _fromDatabase=True Initial Comment: (PostgreSQL 8.0, psycopg 1.1.18, SQLObject 0.6.1) Have the following table: CREATE TABLE urls ( id serial NOT NULL, url varchar(80) NOT NULL, download_finished timestamp, email varchar(80) NOT NULL, activated timestamp NOT NULL DEFAULT now(), CONSTRAINT urls_pkey PRIMARY KEY (id) ) WITHOUT OIDS; And the following definition: import sqlobject c=sqlobject.connectionForURI('postgres://postgres:pass@localhost/db') class Urls(sqlobject.SQLObject): _connection = c _fromDatabase = True Then, in python shell: >>> Urls(email='leha@leha', url='urltest') .... TypeError: Urls() did not get expected keyword argument downloadFinished >>> Urls(email='leha@leha', url='urltest', downloadFinished=None) <Urls 3L url='urltest' downloadFinished=None email='leha@leha' activated =<DateTime object for '2005-04-29 00:35:34.80' at cc02a0>> As you can see SQLObject honours explicit DEFAULT declaration (now() for activated column), but no implicit (NULL for download_finished). ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-03-07 18:29 Message: Logged In: YES user_id=4799 Originator: NO test = Urls(email='leha@leha', url='urltest') print test.downloadFinished prints 'None' under Postgres and SQLite, SQLObject 0.9.4. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-05-26 17:41 Message: Logged In: YES user_id=4799 This is probably Postgres issue. Can you look at PostgresConnection.columnsFromSchema(), run the colQuery manually and report the results? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1192037&group_id=74338 |