sqlobject-cvs Mailing List for SQLObject (Page 145)
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...> - 2006-01-05 16:24:39
|
Bugs item #1373755, was opened at 2005-12-05 13:09 Message generated for change (Settings changed) made by ianbicking You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1373755&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: Accepted Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: new link: reddit.com runs on sqlobject Initial Comment: for http://sqlobject.org/links.html reddit: what's new online http://reddit.com/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1373755&group_id=74338 |
|
From: <sub...@co...> - 2006-01-05 14:07:38
|
Author: ianb Date: 2006-01-05 14:07:30 +0000 (Thu, 05 Jan 2006) New Revision: 1472 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-05 14:07:19 UTC (rev 1471) +++ SQLObject/docs/index.comments.txt 2006-01-05 14:07:30 UTC (rev 1472) @@ -5,3 +5,9 @@ ip: 130.79.169.245 I agree with you, exemples are good. +---------------------------------------- +date: 2006-01-05T07:07:30 +id: 2 +ip: 130.79.169.245 + +I agree with you, exemples are good. |
|
From: <sub...@co...> - 2006-01-05 14:07:38
|
Author: ianb Date: 2006-01-05 14:07:19 +0000 (Thu, 05 Jan 2006) New Revision: 1471 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-04 21:47:34 UTC (rev 1470) +++ SQLObject/docs/index.comments.txt 2006-01-05 14:07:19 UTC (rev 1471) @@ -0,0 +1,7 @@ +==== $(example) c + +---------------------------------------- +date: 2006-01-05T07:07:17 +id: 1 +ip: 130.79.169.245 + +I agree with you, exemples are good. |
|
From: <sub...@co...> - 2006-01-04 21:47:46
|
Author: ianb Date: 2006-01-04 21:47:34 +0000 (Wed, 04 Jan 2006) New Revision: 1470 Modified: SQLObject/docs/SQLObject.comments.txt Log: Web updates Modified: SQLObject/docs/SQLObject.comments.txt =================================================================== --- SQLObject/docs/SQLObject.comments.txt 2006-01-04 16:19:32 UTC (rev 1469) +++ SQLObject/docs/SQLObject.comments.txt 2006-01-04 21:47:34 UTC (rev 1470) @@ -43,3 +43,12 @@ username: Chad Walstrom Text turned grey here. This renders the text in the following Note unreadable unless you mouse-over. +==== $(selecting-multiple-objects) +---------------------------------------- +date: 2006-01-04T14:47:33 +email: jw...@jw... +id: 10 +ip: 128.197.24.59 +username: Joe + +Think about breaking these SELECT statements onto several lines. They're busting out of the page design now. |
|
From: <sub...@co...> - 2006-01-04 16:19:47
|
Author: ianb Date: 2006-01-04 16:19:32 +0000 (Wed, 04 Jan 2006) New Revision: 1469 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-03 22:56:25 UTC (rev 1468) +++ SQLObject/docs/index.comments.txt 2006-01-04 16:19:32 UTC (rev 1469) @@ -1,9 +0,0 @@ -==== $(start) ++ ----------------------------------------- -date: 2006-01-03T11:19:55 -email: wsf...@gm... -id: 1 -ip: 208.251.86.43 -username: sean - -testy test |
|
From: <sub...@co...> - 2006-01-03 22:56:28
|
Author: ianb Date: 2006-01-03 22:56:25 +0000 (Tue, 03 Jan 2006) New Revision: 1468 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:56:19 UTC (rev 1467) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:56:25 UTC (rev 1468) @@ -1,7 +0,0 @@ -==== $(introduction) c + ----------------------------------------- -date: 2006-01-03T15:55:10 -id: 2 -ip: 65.209.107.99 - -foo |
|
From: <sub...@co...> - 2006-01-03 22:56:25
|
Author: ianb Date: 2006-01-03 22:56:19 +0000 (Tue, 03 Jan 2006) New Revision: 1467 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:55:10 UTC (rev 1466) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:56:19 UTC (rev 1467) @@ -1,11 +1,5 @@ ==== $(introduction) c + ---------------------------------------- -date: 2006-01-03T15:53:56 -id: 1 -ip: 65.209.107.99 - -test ----------------------------------------- date: 2006-01-03T15:55:10 id: 2 ip: 65.209.107.99 |
|
From: <sub...@co...> - 2006-01-03 22:55:16
|
Author: ianb Date: 2006-01-03 22:55:10 +0000 (Tue, 03 Jan 2006) New Revision: 1466 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:55:01 UTC (rev 1465) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:55:10 UTC (rev 1466) @@ -5,3 +5,9 @@ ip: 65.209.107.99 test +---------------------------------------- +date: 2006-01-03T15:55:10 +id: 2 +ip: 65.209.107.99 + +foo |
|
From: <sub...@co...> - 2006-01-03 22:55:03
|
Author: ianb Date: 2006-01-03 22:55:01 +0000 (Tue, 03 Jan 2006) New Revision: 1465 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:29 UTC (rev 1464) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:55:01 UTC (rev 1465) @@ -5,9 +5,3 @@ ip: 65.209.107.99 test ----------------------------------------- -date: 2006-01-03T15:54:02 -id: 2 -ip: 65.209.107.99 - -test bar |
|
From: <sub...@co...> - 2006-01-03 22:54:33
|
Author: ianb Date: 2006-01-03 22:54:29 +0000 (Tue, 03 Jan 2006) New Revision: 1464 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:18 UTC (rev 1463) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:29 UTC (rev 1464) @@ -10,4 +10,4 @@ id: 2 ip: 65.209.107.99 -test foo +test bar |
|
From: <sub...@co...> - 2006-01-03 22:54:23
|
Author: ianb Date: 2006-01-03 22:54:18 +0000 (Tue, 03 Jan 2006) New Revision: 1463 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:02 UTC (rev 1462) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:18 UTC (rev 1463) @@ -10,4 +10,4 @@ id: 2 ip: 65.209.107.99 -test +test foo |
|
From: <sub...@co...> - 2006-01-03 22:54:07
|
Author: ianb Date: 2006-01-03 22:54:02 +0000 (Tue, 03 Jan 2006) New Revision: 1462 Modified: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Modified: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:53:57 UTC (rev 1461) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:54:02 UTC (rev 1462) @@ -5,3 +5,9 @@ ip: 65.209.107.99 test +---------------------------------------- +date: 2006-01-03T15:54:02 +id: 2 +ip: 65.209.107.99 + +test |
|
From: <sub...@co...> - 2006-01-03 22:54:03
|
Author: ianb Date: 2006-01-03 22:53:57 +0000 (Tue, 03 Jan 2006) New Revision: 1461 Added: SQLObject/docs/sqlobject-admin.comments.txt Log: Web updates Added: SQLObject/docs/sqlobject-admin.comments.txt =================================================================== --- SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 21:32:24 UTC (rev 1460) +++ SQLObject/docs/sqlobject-admin.comments.txt 2006-01-03 22:53:57 UTC (rev 1461) @@ -0,0 +1,7 @@ +==== $(introduction) c + +---------------------------------------- +date: 2006-01-03T15:53:56 +id: 1 +ip: 65.209.107.99 + +test |
|
From: <sub...@co...> - 2006-01-03 21:32:29
|
Author: ianb Date: 2006-01-03 21:32:24 +0000 (Tue, 03 Jan 2006) New Revision: 1460 Added: SQLObject/docs/FAQ.comments.txt Log: Web updates Added: SQLObject/docs/FAQ.comments.txt =================================================================== --- SQLObject/docs/FAQ.comments.txt 2006-01-03 18:19:57 UTC (rev 1459) +++ SQLObject/docs/FAQ.comments.txt 2006-01-03 21:32:24 UTC (rev 1460) @@ -0,0 +1,9 @@ +==== $(how-can-i-do-a-left-join) c + +---------------------------------------- +date: 2006-01-03T14:32:21 +email: b.n...@rl... +id: 1 +ip: 86.143.215.248 +username: bryan + +Ian, this works fine from Mozilla, but not from konqueror ... what exactly |
|
From: SourceForge.net <no...@so...> - 2006-01-03 21:15:32
|
Bugs item #1387369, was opened at 2005-12-21 10:03 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1387369&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: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: tables not created in correct order Initial Comment: When I have this code: class ClassB(SQLObject): ... var1=StringCol() ... class ClassA(SQLObject): ... var2=ForeignKey('ClassB') ... I get an error that relation 'classb' does not exist. So when I execute tg-admin sql create it tries to create the ClassA table first, not checking for the dependencies and create ClassB first. When I created the ClassB table manually (via tg-admin shell), it went all ok. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-01-03 13:15 Message: Logged In: NO The problem is resolved in SQLObject SVN, but not in 0.7, so I thiink we can resolve this bug. The bug was in sqlobject.manager. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-03 05:51 Message: Logged In: YES user_id=4799 In any case, is the problem a problem of SQLObject or tg-admin? I think the latter. ---------------------------------------------------------------------- Comment By: Stephen Thorne (jerub) Date: 2005-12-21 17:51 Message: Logged In: YES user_id=100823 I have experenced a similar problem in the past with SQLObject based projects. The general solution seems to be, with databases like postgrsql, to create the foreignkeys after all the tables have been created. This is a code snippet that I have used in the past for creating a bunch of tables correctly (used with SQLObject 0.6.0, so don't be surprised if it doesn't work with the latest SQLObject): fkeys = [] tablename = [] pgCSQL = sqlobject.ForeignKey.baseClass.postgresCreateSQL def newfk(c): fkeys.append((tablename[-1], pgCSQL(c).split(',')[1])) return pgCSQL(c).split(',')[0] sqlobject.ForeignKey.baseClass.postgresCreateSQL = newfk import database import views c = database.__connection__ c.autoCommit = True for x in database.__all__: o = getattr(database, x) tablename.append(o._table) o.createTable() for table, key in fkeys: c.query("ALTER TABLE %s ADD %s" % (table, key)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1387369&group_id=74338 |
|
From: <sub...@co...> - 2006-01-03 18:20:07
|
Author: ianb Date: 2006-01-03 18:19:57 +0000 (Tue, 03 Jan 2006) New Revision: 1459 Modified: SQLObject/docs/index.comments.txt Log: Web updates Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-01-03 14:04:19 UTC (rev 1458) +++ SQLObject/docs/index.comments.txt 2006-01-03 18:19:57 UTC (rev 1459) @@ -0,0 +1,9 @@ +==== $(start) ++ +---------------------------------------- +date: 2006-01-03T11:19:55 +email: wsf...@gm... +id: 1 +ip: 208.251.86.43 +username: sean + +testy test |
|
From: <sub...@co...> - 2006-01-03 14:05:14
|
Author: phd
Date: 2006-01-03 14:04:19 +0000 (Tue, 03 Jan 2006)
New Revision: 1458
Modified:
home/phd/SQLObject/paramstyles/sqlobject/col.py
Log:
Merged patches from the revisions 1455:1457 from the trunk: merged a patch from rev. 1456: the fix for the bug N 1378359: always call super().__init__().
Modified: home/phd/SQLObject/paramstyles/sqlobject/col.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-01-03 14:03:34 UTC (rev 1457)
+++ home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-01-03 14:04:19 UTC (rev 1458)
@@ -128,6 +128,8 @@
origName=None,
extra_vars=None):
+ super(SOCol, self).__init__()
+
# This isn't strictly true, since we *could* use backquotes or
# " or something (database-specific) around column names, but
# why would anyone *want* to use a name like that?
@@ -380,6 +382,7 @@
baseClass = SOCol
def __init__(self, name=None, **kw):
+ super(Col, self).__init__()
self.__dict__['_name'] = name
self.__dict__['_kw'] = kw
self.__dict__['creationOrder'] = creationOrder.next()
@@ -429,7 +432,7 @@
elif self.varchar == 'auto':
self.varchar = True
- SOCol.__init__(self, **kw)
+ super(SOStringLikeCol, self).__init__(**kw)
def autoConstraints(self):
constraints = [consts.isString]
@@ -718,7 +721,7 @@
kw['origName'] = kw['name']
if not kw['name'].upper().endswith('ID'):
kw['name'] = style.instanceAttrToIDAttr(kw['name'])
- SOKeyCol.__init__(self, **kw)
+ super(SOForeignKey, self).__init__(**kw)
def postgresCreateSQL(self):
sql = SOKeyCol.postgresCreateSQL(self)
@@ -812,7 +815,7 @@
baseClass = SOForeignKey
def __init__(self, foreignKey=None, **kw):
- KeyCol.__init__(self, foreignKey=foreignKey, **kw)
+ super(ForeignKey, self).__init__(foreignKey=foreignKey, **kw)
class SOEnumCol(SOCol):
@@ -820,7 +823,7 @@
self.enumValues = popKey(kw, 'enumValues', None)
assert self.enumValues is not None, \
'You must provide an enumValues keyword argument'
- SOCol.__init__(self, **kw)
+ super(SOEnumCol, self).__init__(**kw)
def autoConstraints(self):
return [consts.isString, consts.InList(self.enumValues)]
@@ -959,7 +962,7 @@
datetimeFormat = popKey(kw, 'datetimeFormat')
if datetimeFormat:
self.datetimeFormat = datetimeFormat
- SOCol.__init__(self, **kw)
+ super(SODateTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SODateTimeCol, self).createValidators()
@@ -1024,7 +1027,7 @@
def __init__(self, **kw):
dateFormat = popKey(kw, 'dateFormat')
if dateFormat: self.dateFormat = dateFormat
- SOCol.__init__(self, **kw)
+ super(SODateCol, self).__init__(**kw)
def createValidators(self):
"""Create a validator for the column. Can be overriden in descendants."""
@@ -1082,7 +1085,7 @@
timeFormat = popKey(kw, 'timeFormat')
if timeFormat:
self.timeFormat = timeFormat
- SOCol.__init__(self, **kw)
+ super(SOTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SOTimeCol, self).createValidators()
@@ -1166,7 +1169,7 @@
self.precision = popKey(kw, 'precision', NoDefault)
assert self.precision is not NoDefault, \
"You must give a precision argument"
- SOCol.__init__(self, **kw)
+ super(SODecimalCol, self).__init__(**kw)
def _sqlType(self):
return 'DECIMAL(%i, %i)' % (self.size, self.precision)
@@ -1183,7 +1186,7 @@
def __init__(self, **kw):
pushKey(kw, 'size', 10)
pushKey(kw, 'precision', 2)
- SODecimalCol.__init__(self, **kw)
+ super(SOCurrencyCol, self).__init__(**kw)
class CurrencyCol(DecimalCol):
baseClass = SOCurrencyCol
@@ -1279,7 +1282,7 @@
def __init__(self, **kw):
self.pickleProtocol = popKey(kw, 'pickleProtocol', 1)
- SOBLOBCol.__init__(self, **kw)
+ super(SOPickleCol, self).__init__(**kw)
def createValidators(self):
return [PickleValidator(
|
|
From: <sub...@co...> - 2006-01-03 14:03:40
|
Author: phd
Date: 2006-01-03 14:03:34 +0000 (Tue, 03 Jan 2006)
New Revision: 1457
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/col.py
Log:
Merged a patch from rev. 1456: the fix for the bug N 1378359: always call super().__init__().
Modified: SQLObject/branches/0.7-bugfix/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/col.py 2006-01-03 14:01:22 UTC (rev 1456)
+++ SQLObject/branches/0.7-bugfix/sqlobject/col.py 2006-01-03 14:03:34 UTC (rev 1457)
@@ -128,6 +128,8 @@
origName=None,
extra_vars=None):
+ super(SOCol, self).__init__()
+
# This isn't strictly true, since we *could* use backquotes or
# " or something (database-specific) around column names, but
# why would anyone *want* to use a name like that?
@@ -380,6 +382,7 @@
baseClass = SOCol
def __init__(self, name=None, **kw):
+ super(Col, self).__init__()
self.__dict__['_name'] = name
self.__dict__['_kw'] = kw
self.__dict__['creationOrder'] = creationOrder.next()
@@ -429,7 +432,7 @@
elif self.varchar == 'auto':
self.varchar = True
- SOCol.__init__(self, **kw)
+ super(SOStringLikeCol, self).__init__(**kw)
def autoConstraints(self):
constraints = [consts.isString]
@@ -727,7 +730,7 @@
kw['origName'] = kw['name']
if not kw['name'].upper().endswith('ID'):
kw['name'] = style.instanceAttrToIDAttr(kw['name'])
- SOKeyCol.__init__(self, **kw)
+ super(SOForeignKey, self).__init__(**kw)
def postgresCreateSQL(self):
sql = SOKeyCol.postgresCreateSQL(self)
@@ -792,7 +795,7 @@
baseClass = SOForeignKey
def __init__(self, foreignKey=None, **kw):
- KeyCol.__init__(self, foreignKey=foreignKey, **kw)
+ super(ForeignKey, self).__init__(foreignKey=foreignKey, **kw)
class SOEnumCol(SOCol):
@@ -800,7 +803,7 @@
self.enumValues = popKey(kw, 'enumValues', None)
assert self.enumValues is not None, \
'You must provide an enumValues keyword argument'
- SOCol.__init__(self, **kw)
+ super(SOEnumCol, self).__init__(**kw)
def autoConstraints(self):
return [consts.isString, consts.InList(self.enumValues)]
@@ -939,7 +942,7 @@
datetimeFormat = popKey(kw, 'datetimeFormat')
if datetimeFormat:
self.datetimeFormat = datetimeFormat
- SOCol.__init__(self, **kw)
+ super(SODateTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SODateTimeCol, self).createValidators()
@@ -1004,7 +1007,7 @@
def __init__(self, **kw):
dateFormat = popKey(kw, 'dateFormat')
if dateFormat: self.dateFormat = dateFormat
- SOCol.__init__(self, **kw)
+ super(SODateCol, self).__init__(**kw)
def createValidators(self):
"""Create a validator for the column. Can be overriden in descendants."""
@@ -1062,7 +1065,7 @@
timeFormat = popKey(kw, 'timeFormat')
if timeFormat:
self.timeFormat = timeFormat
- SOCol.__init__(self, **kw)
+ super(SOTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SOTimeCol, self).createValidators()
@@ -1105,7 +1108,7 @@
self.precision = popKey(kw, 'precision', NoDefault)
assert self.precision is not NoDefault, \
"You must give a precision argument"
- SOCol.__init__(self, **kw)
+ super(SODecimalCol, self).__init__(**kw)
def _sqlType(self):
return 'DECIMAL(%i, %i)' % (self.size, self.precision)
@@ -1118,7 +1121,7 @@
def __init__(self, **kw):
pushKey(kw, 'size', 10)
pushKey(kw, 'precision', 2)
- SODecimalCol.__init__(self, **kw)
+ super(SOCurrencyCol, self).__init__(**kw)
class CurrencyCol(DecimalCol):
baseClass = SOCurrencyCol
@@ -1214,7 +1217,7 @@
def __init__(self, **kw):
self.pickleProtocol = popKey(kw, 'pickleProtocol', 1)
- SOBLOBCol.__init__(self, **kw)
+ super(SOPickleCol, self).__init__(**kw)
def createValidators(self):
return [PickleValidator(
|
|
From: SourceForge.net <no...@so...> - 2006-01-03 14:02:17
|
Bugs item #1378359, was opened at 2005-12-12 01:52 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378359&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 from repository >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytmann (phd) Summary: Col does not call object's __init__()? Initial Comment: I'm using ver 0.7 (downloaded it from SourceForge, I think) I've had problems creating subclasses of StringCol (my goal is to make the columns able to return GUI components based on their type). My class definitions look like this: class NewChild(StringCol, SomeGUIMixIn): def __init__(...): super(NewChild, self).__init__(...) The problem is: The constructor of SomeGUIMixIn (and its superclasses) are never called by this statement. I've searched the web looking for similar problems, and it seems that this is related to the way super() works with multiple inheritance. In my class declaration, it wold start by calling the constructor of the leftmost superclass (i.e. StringCol), go down it's entire inheritance tree to object, and then proceed to the next superclass in the definition (in this example SomeGUIMixIn) and go down that tree to object. The problem occurs if some superclass forgets to call the one of it's own superclass's constructors. Then the chain is broken, and no more constructors will be called. It seems to me that this is the problem here. I checked the source code availible via the API, and Col, a direct subclass of object, never seems to call object.__init__() (or the equivalent "super(Col, self).__init__()"). This should be easy to fix? (my suspicion is strengthened by the fact that if I reverse the order of the superclasses of NewChild in it's declaration to "class NewChild(SomeGUIMixIn, StringCol)", at least my constructor in SomeGUIMixIn and it's superclasses are called. Please correct me if I'm wrong! I'm not experienced with Python. Best regards, Jostein Bø Fløystad lil...@gm... ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-03 17:02 Message: Logged In: YES user_id=4799 Yes, you are right. I changed all Parent.__init__(super) calls to super(ClassName, self).__init__() and added such a call to Col and SOCol classes. That should fix your problem. Commited at the revision 1456 and backported to 0.7-branch. Thank you for the inspiration! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1378359&group_id=74338 |
|
From: <sub...@co...> - 2006-01-03 14:01:31
|
Author: phd
Date: 2006-01-03 14:01:22 +0000 (Tue, 03 Jan 2006)
New Revision: 1456
Modified:
SQLObject/trunk/sqlobject/col.py
Log:
Fixed the bug N 1378359: always call super().__init__().
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2006-01-03 12:23:20 UTC (rev 1455)
+++ SQLObject/trunk/sqlobject/col.py 2006-01-03 14:01:22 UTC (rev 1456)
@@ -128,6 +128,8 @@
origName=None,
extra_vars=None):
+ super(SOCol, self).__init__()
+
# This isn't strictly true, since we *could* use backquotes or
# " or something (database-specific) around column names, but
# why would anyone *want* to use a name like that?
@@ -380,6 +382,7 @@
baseClass = SOCol
def __init__(self, name=None, **kw):
+ super(Col, self).__init__()
self.__dict__['_name'] = name
self.__dict__['_kw'] = kw
self.__dict__['creationOrder'] = creationOrder.next()
@@ -429,7 +432,7 @@
elif self.varchar == 'auto':
self.varchar = True
- SOCol.__init__(self, **kw)
+ super(SOStringLikeCol, self).__init__(**kw)
def autoConstraints(self):
constraints = [consts.isString]
@@ -718,7 +721,7 @@
kw['origName'] = kw['name']
if not kw['name'].upper().endswith('ID'):
kw['name'] = style.instanceAttrToIDAttr(kw['name'])
- SOKeyCol.__init__(self, **kw)
+ super(SOForeignKey, self).__init__(**kw)
def postgresCreateSQL(self):
sql = SOKeyCol.postgresCreateSQL(self)
@@ -812,7 +815,7 @@
baseClass = SOForeignKey
def __init__(self, foreignKey=None, **kw):
- KeyCol.__init__(self, foreignKey=foreignKey, **kw)
+ super(ForeignKey, self).__init__(foreignKey=foreignKey, **kw)
class SOEnumCol(SOCol):
@@ -820,7 +823,7 @@
self.enumValues = popKey(kw, 'enumValues', None)
assert self.enumValues is not None, \
'You must provide an enumValues keyword argument'
- SOCol.__init__(self, **kw)
+ super(SOEnumCol, self).__init__(**kw)
def autoConstraints(self):
return [consts.isString, consts.InList(self.enumValues)]
@@ -959,7 +962,7 @@
datetimeFormat = popKey(kw, 'datetimeFormat')
if datetimeFormat:
self.datetimeFormat = datetimeFormat
- SOCol.__init__(self, **kw)
+ super(SODateTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SODateTimeCol, self).createValidators()
@@ -1024,7 +1027,7 @@
def __init__(self, **kw):
dateFormat = popKey(kw, 'dateFormat')
if dateFormat: self.dateFormat = dateFormat
- SOCol.__init__(self, **kw)
+ super(SODateCol, self).__init__(**kw)
def createValidators(self):
"""Create a validator for the column. Can be overriden in descendants."""
@@ -1082,7 +1085,7 @@
timeFormat = popKey(kw, 'timeFormat')
if timeFormat:
self.timeFormat = timeFormat
- SOCol.__init__(self, **kw)
+ super(SOTimeCol, self).__init__(**kw)
def createValidators(self):
_validators = super(SOTimeCol, self).createValidators()
@@ -1166,7 +1169,7 @@
self.precision = popKey(kw, 'precision', NoDefault)
assert self.precision is not NoDefault, \
"You must give a precision argument"
- SOCol.__init__(self, **kw)
+ super(SODecimalCol, self).__init__(**kw)
def _sqlType(self):
return 'DECIMAL(%i, %i)' % (self.size, self.precision)
@@ -1183,7 +1186,7 @@
def __init__(self, **kw):
pushKey(kw, 'size', 10)
pushKey(kw, 'precision', 2)
- SODecimalCol.__init__(self, **kw)
+ super(SOCurrencyCol, self).__init__(**kw)
class CurrencyCol(DecimalCol):
baseClass = SOCurrencyCol
@@ -1279,7 +1282,7 @@
def __init__(self, **kw):
self.pickleProtocol = popKey(kw, 'pickleProtocol', 1)
- SOBLOBCol.__init__(self, **kw)
+ super(SOPickleCol, self).__init__(**kw)
def createValidators(self):
return [PickleValidator(
|
|
From: SourceForge.net <no...@so...> - 2006-01-03 13:51:19
|
Bugs item #1387369, was opened at 2005-12-21 21:03 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1387369&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: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: tables not created in correct order Initial Comment: When I have this code: class ClassB(SQLObject): ... var1=StringCol() ... class ClassA(SQLObject): ... var2=ForeignKey('ClassB') ... I get an error that relation 'classb' does not exist. So when I execute tg-admin sql create it tries to create the ClassA table first, not checking for the dependencies and create ClassB first. When I created the ClassB table manually (via tg-admin shell), it went all ok. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-03 16:51 Message: Logged In: YES user_id=4799 In any case, is the problem a problem of SQLObject or tg-admin? I think the latter. ---------------------------------------------------------------------- Comment By: Stephen Thorne (jerub) Date: 2005-12-22 04:51 Message: Logged In: YES user_id=100823 I have experenced a similar problem in the past with SQLObject based projects. The general solution seems to be, with databases like postgrsql, to create the foreignkeys after all the tables have been created. This is a code snippet that I have used in the past for creating a bunch of tables correctly (used with SQLObject 0.6.0, so don't be surprised if it doesn't work with the latest SQLObject): fkeys = [] tablename = [] pgCSQL = sqlobject.ForeignKey.baseClass.postgresCreateSQL def newfk(c): fkeys.append((tablename[-1], pgCSQL(c).split(',')[1])) return pgCSQL(c).split(',')[0] sqlobject.ForeignKey.baseClass.postgresCreateSQL = newfk import database import views c = database.__connection__ c.autoCommit = True for x in database.__all__: o = getattr(database, x) tablename.append(o._table) o.createTable() for table, key in fkeys: c.query("ALTER TABLE %s ADD %s" % (table, key)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1387369&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-03 13:38:57
|
Bugs item #1344338, was opened at 2005-10-31 17:28 Message generated for change (Comment added) made by adustman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1344338&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: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Andy Dustman (adustman) Assigned to: Nobody/Anonymous (nobody) Summary: 0.7.0: autoCommit from URI wrong type Initial Comment: In dbconnection.py, when the URI is parsed, there is no special treatment or type conversion of the autoCommit parameter, so it is always stored as a string. In the MySQL case (mysql.mysqlconnection), this causes the call to conn.autocommit() to always, since that API function requires an integer (booleans work too). A workaround for this is to change conn.autocommit(self.autoCommit) to conn.autocommit(int(self.autoCommit)), though only works if an integer is used as a parameter; it fails if True or False is used. Note that sybase support has this sequence in SybaseConnection.__init__(): autoCommit = kw.get('autoCommit') if autoCommit: autoCommmit = int(autoCommit) else: autoCommit = None kw['autoCommit'] = autoCommit DBAPI.__init__(self, **kw) A similar block of code would also work for MySQLdb. ---------------------------------------------------------------------- >Comment By: Andy Dustman (adustman) Date: 2006-01-03 08:38 Message: Logged In: YES user_id=71372 Either will work. The Python C API turns bool into int. Actual boolean values would be more readable. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-03 07:32 Message: Logged In: YES user_id=4799 Documentation for MySQLdb says "Set the autocommit mode. True values enable; False value disable." What are those True and False - bools or ints? Should I write conn.autocommit(int(self.autoCommit)) or conn.autocommit(bool(self.autoCommit)) ? ---------------------------------------------------------------------- Comment By: Mike Kent (mrmakent) Date: 2005-12-09 12:11 Message: Logged In: YES user_id=1401261 I just ran into this same problem using SQLObject with TurboGears. Passing autoCommit as an empty string: mysql://server:port/db?autoCommit=&debug= as the previous commenter suggested did NOT work; I got the same TypeError exception. ---------------------------------------------------------------------- Comment By: Andy Dustman (adustman) Date: 2005-11-02 16:05 Message: Logged In: YES user_id=71372 That doesn't work; I tried it previously. It results in SQLObject trying to do conn.autocommit(''), which still results in a TypeError. Even though '' == False, it is not an integer, and thismethod requires an integer (or boolean). ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-11-02 15:42 Message: Logged In: YES user_id=4799 Pass autoCommit as an empty string: mysql://server:port/db?autoCommit=&debug= ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1344338&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-03 13:29:20
|
Bugs item #1375617, was opened at 2005-12-07 22:27 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1375617&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: Duplicate Priority: 5 Submitted By: Aaron Swartz (aaronsw) Assigned to: Nobody/Anonymous (nobody) Summary: Unicode queries choke Initial Comment: Using SQLObject 0.7rc1: >>> db.Item.select(db.Item.q.title == u'foo').count() [...] TypeError: argument 1 must be str, not unicode ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-03 16:29 Message: Logged In: YES user_id=4799 This is dup for bug N 1243224. .select() and .selectBy() require str, not unicode. db.Item.select(db.Item.q.title == u'foo'.encode(dbEncoding)).count() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1375617&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-03 13:26:55
|
Bugs item #1374599, was opened at 2005-12-06 19:34 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374599&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: None Priority: 5 Submitted By: dvd (dvd-00) Assigned to: Nobody/Anonymous (nobody) Summary: no such column with 0.7.0 Initial Comment: I'm tring SQLObject (v 0.7.0 easy-install) this is my first try: **************************************************** import sqlobject as _s class Projects(_s.SQLObject): project = _s.StringCol() flags = _s.MultipleJoin('ProjectFlags') sources = _s.MultipleJoin('ProjectSources') @staticmethod def newProject(pjname, **kwd): x = Projects(project=pjname) for name, value in kwd.items(): ProjectFlags(project=x, name=name, value=value) return x class ProjectFlags(_s.SQLObject): project = _s.ForeignKey('Projects') name = _s.StringCol() value = _s.StringCol() import os.path db_filename = os.path.abspath('xxx.db') connection = _s.connectionForURI("sqlite:/:memory:") _s.sqlhub.processConnection = connection Projects.createTable() ProjectFlags.createTable() Projects.newProject("project01", fiter="*.tiff", max_iso=4700) p = Projects.get(1) print p print p.flags **************************************************** the last line raise: pysqlite2.dbapi2.OperationalError: no such column: projects_id all works fine if I change the ProjectFlags attribute "project" in "projects" Is this the normal behavior? ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-01-03 16:26 Message: Logged In: YES user_id=4799 It is normal. Either write projects = _s.ForeignKey('Projects') or flags = _s.MultipleJoin('ProjectFlags', joinColumn="project_id") ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374599&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-01-03 13:20:19
|
Bugs item #1374419, was opened at 2005-12-06 15:35 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&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 from repository >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ProgrammingError in _queryInsertID Initial Comment: Hi, i'm using SQLObject packaged with TurboGears on an existing PostgreSQL DB with the primary_key beeing a string. My model.py: -------------------------- [...] class Authreg(SQLObject): class sqlmeta: idType= StringType idName = "username" username = StringCol(alternateID = True) [...] -------------------------- Versions: The latest SQLObject from repository ('cause of the idType opportunity), python 2.4.2, PostgreSQL 7.4.9. Accessing the existing entrys works fine, changing those, too. Creating a new entry results in the following traceback. It seems, that SQLObject tries to receive a sequence from the DB although the primary_key is a StringType. Traceback: -------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run main() File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py", line 502, in main body = page_handler(*args, **cherrypy.request.paramMap) File "/usr/lib/python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/controllers.py", line 121, in newfunc output = func(self, *args, **kw) File "/home/project/foo/bla/bla/controllers.py", line 86, in change hash=new_hash) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1248, in __init__ self._create(id, **kw) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1277, in _create self._SO_finishCreate(id) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/main.py", line 1301, in _SO_finishCreate id, names, values) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/dbconnection.py", line 802, in queryInsertID return self._dbConnection._queryInsertID( File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1346-py2.4.egg/sqlobject/postgres/pgconnection.py", line 122, in _queryInsertID c.execute("SELECT NEXTVAL('%s')" % sequenceName) ProgrammingError: ERROR: relation "authreg_username_seq" does not exist SELECT NEXTVAL('authreg_username_seq') -------------------------- Ruben Lang ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-12-07 14:42 Message: Logged In: NO Hi, i think i know my fault. I'm using non-integer keys, and i'm not passing the id keyword to the constructor, instead i passed username (since this is my column used as key). Now i got to redesign a few things. Sorry for bothering you, Ruben Lang ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1374419&group_id=74338 |