sqlobject-cvs Mailing List for SQLObject (Page 139)
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-02-06 18:29:46
|
Bugs item #1415071, was opened at 2006-01-26 03:55 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1415071&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: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: How can I join a table with itself? in FAQ is Bogus Initial Comment: How can I join a table with itself? (From the FAQ: http://sqlobject.org/FAQ.html#how-can-i-join-a-table-with-itself) does not is any useful. The expected information is found here instead: http://sqlobject.org/SQLObject.html#how-can-i-join-a-table-with-itself This is some what bogus and ought to be fixed:) ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-06 21:29 Message: Logged In: YES user_id=4799 Fixed at the revision 1573 in the trunk. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1415071&group_id=74338 |
|
From: <sub...@co...> - 2006-02-06 18:29:04
|
Author: phd Date: 2006-02-06 11:28:58 -0700 (Mon, 06 Feb 2006) New Revision: 1573 Modified: SQLObject/docs/FAQ.txt Log: Fixed the bug 1415071. Modified: SQLObject/docs/FAQ.txt =================================================================== --- SQLObject/docs/FAQ.txt 2006-02-06 18:24:18 UTC (rev 1572) +++ SQLObject/docs/FAQ.txt 2006-02-06 18:28:58 UTC (rev 1573) @@ -98,11 +98,11 @@ How can I join a table with itself? ----------------------------------- -Use Alias from SQLBuilder_. +Use Alias from SQLBuilder_. See example_. .. _SQLBuilder: SQLBuilder.html +.. _example: SQLObject.html#how-can-i-join-a-table-with-itself - How Does Inheritance Work? -------------------------- |
|
From: <sub...@co...> - 2006-02-06 18:24:27
|
Author: phd
Date: 2006-02-06 11:24:18 -0700 (Mon, 06 Feb 2006)
New Revision: 1572
Modified:
home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py
home/phd/SQLObject/paramstyles/sqlobject/tests/test_basic.py
Log:
Merged patches from the revisions 1569:1570 from the trunk: fixed the bug 1410910: __getattr__ should raise AttributeError.
Modified: home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py 2006-02-06 18:22:10 UTC (rev 1571)
+++ home/phd/SQLObject/paramstyles/sqlobject/sqlbuilder.py 2006-02-06 18:24:18 UTC (rev 1572)
@@ -397,6 +397,8 @@
raise AttributeError
if attr == 'id':
return self.FieldClass(self.tableName, self.soClass.sqlmeta.idName, attr)
+ elif attr not in self.soClass.sqlmeta.columns:
+ raise AttributeError("%s instance has no attribute '%s'" % (self.soClass.__name__, attr))
else:
return self.FieldClass(self.tableName,
self.soClass.sqlmeta.columns[attr].dbName,
Modified: home/phd/SQLObject/paramstyles/sqlobject/tests/test_basic.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_basic.py 2006-02-06 18:22:10 UTC (rev 1571)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_basic.py 2006-02-06 18:24:18 UTC (rev 1572)
@@ -281,4 +281,12 @@
bob = TestSO1.selectBy(name='bob')[0]
assert bob.sqlmeta.asDict() == {
'passwd': 'tbq', 'name': 'bob', 'id': bob.id}
-
+
+def test_nonexisting_attr():
+ setupClass(Student)
+ try:
+ Student.select(Student.q.nonexisting)
+ except AttributeError:
+ pass
+ else:
+ assert 0, "Expected an AttributeError"
|
|
From: SourceForge.net <no...@so...> - 2006-02-06 18:23:32
|
Bugs item #1410910, was opened at 2006-01-20 19:10 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1410910&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 Submitted By: jt (jt01) >Assigned to: Oleg Broytmann (phd) Summary: 0.7.0 __getattr__ should raise AttributeError Initial Comment: If 'foo' is not an attribute of obj, obj.q.foo should catch KeyError and raise an AttributeError. sqlbuilder.py +362 -------------------------------------------------- return self.FieldClass(self.tableName, self.soClass.sqlmeta.columns[attr].dbName, attr) -------------------------------------------------- I suppose some others __getattr__ have the same problem. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-06 21:23 Message: Logged In: YES user_id=4799 Fixed at the revision 1570 in the trunk; backported to the 0.7 branch at the rev. 1571. Thank you! ---------------------------------------------------------------------- Comment By: jt (jt01) Date: 2006-01-20 19:14 Message: Logged In: YES user_id=1002407 and should have default value: getattr(object, 'method', default) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1410910&group_id=74338 |
|
From: <sub...@co...> - 2006-02-06 18:22:19
|
Author: phd
Date: 2006-02-06 11:22:10 -0700 (Mon, 06 Feb 2006)
New Revision: 1571
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/sqlbuilder.py
SQLObject/branches/0.7-bugfix/sqlobject/tests/test_basic.py
Log:
Fixed the bug 1410910: __getattr__ should raise AttributeError.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/sqlbuilder.py 2006-02-06 18:21:55 UTC (rev 1570)
+++ SQLObject/branches/0.7-bugfix/sqlobject/sqlbuilder.py 2006-02-06 18:22:10 UTC (rev 1571)
@@ -357,6 +357,8 @@
raise AttributeError
if attr == 'id':
return self.FieldClass(self.tableName, self.soClass.sqlmeta.idName, attr)
+ elif attr not in self.soClass.sqlmeta.columns:
+ raise AttributeError("%s instance has no attribute '%s'" % (self.soClass.__name__, attr))
else:
return self.FieldClass(self.tableName,
self.soClass.sqlmeta.columns[attr].dbName,
Modified: SQLObject/branches/0.7-bugfix/sqlobject/tests/test_basic.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/tests/test_basic.py 2006-02-06 18:21:55 UTC (rev 1570)
+++ SQLObject/branches/0.7-bugfix/sqlobject/tests/test_basic.py 2006-02-06 18:22:10 UTC (rev 1571)
@@ -275,3 +275,12 @@
assert dep1.other is None
assert dep2.other is None
assert dep3.other is obj2
+
+def test_nonexisting_attr():
+ setupClass(Student)
+ try:
+ Student.select(Student.q.nonexisting)
+ except AttributeError:
+ pass
+ else:
+ assert 0, "Expected an AttributeError"
|
|
From: <sub...@co...> - 2006-02-06 18:22:07
|
Author: phd
Date: 2006-02-06 11:21:55 -0700 (Mon, 06 Feb 2006)
New Revision: 1570
Modified:
SQLObject/trunk/sqlobject/sqlbuilder.py
SQLObject/trunk/sqlobject/tests/test_basic.py
Log:
Fixed the bug 1410910: __getattr__ should raise AttributeError.
Modified: SQLObject/trunk/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlbuilder.py 2006-02-06 17:30:14 UTC (rev 1569)
+++ SQLObject/trunk/sqlobject/sqlbuilder.py 2006-02-06 18:21:55 UTC (rev 1570)
@@ -360,6 +360,8 @@
raise AttributeError
if attr == 'id':
return self.FieldClass(self.tableName, self.soClass.sqlmeta.idName, attr)
+ elif attr not in self.soClass.sqlmeta.columns:
+ raise AttributeError("%s instance has no attribute '%s'" % (self.soClass.__name__, attr))
else:
return self.FieldClass(self.tableName,
self.soClass.sqlmeta.columns[attr].dbName,
Modified: SQLObject/trunk/sqlobject/tests/test_basic.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_basic.py 2006-02-06 17:30:14 UTC (rev 1569)
+++ SQLObject/trunk/sqlobject/tests/test_basic.py 2006-02-06 18:21:55 UTC (rev 1570)
@@ -281,4 +281,12 @@
bob = TestSO1.selectBy(name='bob')[0]
assert bob.sqlmeta.asDict() == {
'passwd': 'tbq', 'name': 'bob', 'id': bob.id}
-
+
+def test_nonexisting_attr():
+ setupClass(Student)
+ try:
+ Student.select(Student.q.nonexisting)
+ except AttributeError:
+ pass
+ else:
+ assert 0, "Expected an AttributeError"
|
|
From: SourceForge.net <no...@so...> - 2006-02-06 17:44:11
|
Bugs item #1334786, was opened at 2005-10-22 13:30 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1334786&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: M. Dietrich (mdt) Assigned to: Nobody/Anonymous (nobody) Summary: infinitiv recursion in Transaction.__del__ Initial Comment: using ThreadConnections i get a Exception exceptions.RuntimeError: 'maximum recursion depth exceeded' in <bound method Transaction.__del__ of <sqlobject.dbconnection.Transaction object at 0xaedb714c>> ignored , commenting __del__() works in the first place. can't figure out what this __del__ is for... ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-06 20:44 Message: Logged In: YES user_id=4799 I cannot reproduce it. When Postgres is not started your program is just reports Traceback (most recent call last): File "./test1.py", line 10, in ? sqlhub.threadConnection = connection.transaction() File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1534-py2.4.egg/sqlobject/dbconnection.py", line 354, in transaction return Transaction(self) File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1534-py2.4.egg/sqlobject/dbconnection.py", line 731, in __init__ self._connection = dbConnection.getConnection() File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1534-py2.4.egg/sqlobject/dbconnection.py", line 226, in getConnection conn = self.makeConnection() File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1534-py2.4.egg/sqlobject/postgres/pgconnection.py", line 108, in makeConnection raise self.module.OperationalError("%s; used connection string %r" % (e, self.dsn)) psycopg.OperationalError: could not connect to server: @â Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? ; used connection string 'dbname=test' Exception exceptions.AttributeError: "PostgresConnection instance has no attribute '_connection'" in <bound method Transaction.__del__ of <sqlobject.dbconnection.Transaction object at 0xb7b6ddec>> ignored ---------------------------------------------------------------------- Comment By: Didrik Pinte (dpinte) Date: 2006-01-24 12:20 Message: Logged In: YES user_id=970259 Same here, I can reproduce it. It happens when the database is not started. Here is a test code : Step 1 : Shut down you postgres server Step 2 : Run the following ------------------------- import sqlobject scheme = "postgres://myusername:mypassword@localhost/mydb" connection = sqlobject.connectionForURI(scheme) sqlobject.sqlhub.processConnection = connection sqlhub.threadConnection = connection.transaction() -------------------------- Didrik ---------------------------------------------------------------------- Comment By: xiao hai tong (haitong) Date: 2005-12-04 20:35 Message: Logged In: YES user_id=146934 I encount it too. once is too many connection crash my pgsql server on windows, then may of such exceptions reported. other time: a multi thread test program. I want to retry my transaction when excecption occured during commit, I commet the threadConnection.rollback(), just set threadConnection = g_conn.transaction(), and redo the transaction after seconds, such exceptions occurred. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-10-25 20:12 Message: Logged In: YES user_id=4799 Can you make a little test program that demonstrates the problem? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1334786&group_id=74338 |
|
From: <sub...@co...> - 2006-02-06 17:30:24
|
Author: phd
Date: 2006-02-06 10:30:14 -0700 (Mon, 06 Feb 2006)
New Revision: 1569
Modified:
home/phd/SQLObject/paramstyles/sqlobject/col.py
home/phd/SQLObject/paramstyles/sqlobject/maxdb/maxdbconnection.py
home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
Log:
Merged patches from the revisions 1561:1568 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/col.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-02-06 04:34:14 UTC (rev 1568)
+++ home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-02-06 17:30:14 UTC (rev 1569)
@@ -777,6 +777,9 @@
sql = ', '.join([sql, constraint])
return sql
+ def mysqlCreateReferenceConstraint(self):
+ return None
+
def sybaseCreateSQL(self):
sql = SOKeyCol.sybaseCreateSQL(self)
other = findClass(self.foreignKey)
@@ -788,6 +791,10 @@
sql = ' '.join([sql, reference])
return sql
+ def sybaseCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
def mssqlCreateSQL(self):
sql = SOKeyCol.mssqlCreateSQL(self)
other = findClass(self.foreignKey)
@@ -799,6 +806,10 @@
sql = ' '.join([sql, reference])
return sql
+ def mssqlCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
def maxdbCreateSQL(self):
other = findClass(self.foreignKey)
fidName = self.dbName
@@ -810,6 +821,10 @@
sql=sql + 'FOREIGN KEY (%s) REFERENCES %s(%s)'%(fidName,tName,idName)
return sql
+ def maxdbCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
class ForeignKey(KeyCol):
baseClass = SOForeignKey
Modified: home/phd/SQLObject/paramstyles/sqlobject/maxdb/maxdbconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/maxdb/maxdbconnection.py 2006-02-06 04:34:14 UTC (rev 1568)
+++ home/phd/SQLObject/paramstyles/sqlobject/maxdb/maxdbconnection.py 2006-02-06 17:30:14 UTC (rev 1569)
@@ -169,6 +169,9 @@
self.query("CREATE SEQUENCE %s"
% self.createSequenceName(soClass.sqlmeta.table))
+ def createReferenceConstraint(self, soClass, col):
+ return col.maxdbCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.maxdbCreateSQL()
Modified: home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2006-02-06 04:34:14 UTC (rev 1568)
+++ home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2006-02-06 17:30:14 UTC (rev 1569)
@@ -148,6 +148,9 @@
else:
return query
+ def createReferenceConstraint(self, soClass, col):
+ return col.mssqlCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.mssqlCreateSQL()
Modified: home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-02-06 04:34:14 UTC (rev 1568)
+++ home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-02-06 17:30:14 UTC (rev 1569)
@@ -92,6 +92,9 @@
return "%s LIMIT %i, -1" % (query, start)
return "%s LIMIT %i, %i" % (query, start, end-start)
+ def createReferenceConstraint(self, soClass, col):
+ return col.mysqlCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.mysqlCreateSQL()
|
|
From: <sub...@co...> - 2006-02-06 04:34:20
|
Author: ianb Date: 2006-02-05 21:34:14 -0700 (Sun, 05 Feb 2006) New Revision: 1568 Added: MetaSQLObject/trunk/MetaSQLObject.egg-info/ MetaSQLObject/trunk/MetaSQLObject.egg-info/paster_plugins.txt MetaSQLObject/trunk/docs/ MetaSQLObject/trunk/metasqlobject/ MetaSQLObject/trunk/metasqlobject/__init__.py MetaSQLObject/trunk/metasqlobject/boundattributes.py MetaSQLObject/trunk/metasqlobject/classregistry.py MetaSQLObject/trunk/metasqlobject/declarative.py MetaSQLObject/trunk/metasqlobject/threadinglocal.py MetaSQLObject/trunk/setup.cfg MetaSQLObject/trunk/setup.py Log: Initial setup, plus some copied files from SQLObject (that have not yet been converted) Property changes on: MetaSQLObject/trunk/MetaSQLObject.egg-info ___________________________________________________________________ Name: svn:ignore + top_level.txt entry_points.txt requires.txt PKG-INFO namespace_packages.txt SOURCES.txt not-zip-safe Added: MetaSQLObject/trunk/MetaSQLObject.egg-info/paster_plugins.txt =================================================================== --- MetaSQLObject/trunk/MetaSQLObject.egg-info/paster_plugins.txt 2006-02-06 04:30:52 UTC (rev 1567) +++ MetaSQLObject/trunk/MetaSQLObject.egg-info/paster_plugins.txt 2006-02-06 04:34:14 UTC (rev 1568) @@ -0,0 +1 @@ +PasteScript Property changes on: MetaSQLObject/trunk/MetaSQLObject.egg-info/paster_plugins.txt ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedRevision Name: svn:eol-style + native Added: MetaSQLObject/trunk/metasqlobject/__init__.py =================================================================== --- MetaSQLObject/trunk/metasqlobject/__init__.py 2006-02-06 04:30:52 UTC (rev 1567) +++ MetaSQLObject/trunk/metasqlobject/__init__.py 2006-02-06 04:34:14 UTC (rev 1568) @@ -0,0 +1 @@ +# Property changes on: MetaSQLObject/trunk/metasqlobject/__init__.py ___________________________________________________________________ Name: svn:eol-style + native Copied: MetaSQLObject/trunk/metasqlobject/boundattributes.py (from rev 1562, SQLObject/trunk/sqlobject/boundattributes.py) Copied: MetaSQLObject/trunk/metasqlobject/classregistry.py (from rev 1562, SQLObject/trunk/sqlobject/classregistry.py) Copied: MetaSQLObject/trunk/metasqlobject/declarative.py (from rev 1562, SQLObject/trunk/sqlobject/declarative.py) Copied: MetaSQLObject/trunk/metasqlobject/threadinglocal.py (from rev 1562, SQLObject/trunk/sqlobject/util/threadinglocal.py) Added: MetaSQLObject/trunk/setup.cfg =================================================================== --- MetaSQLObject/trunk/setup.cfg 2006-02-06 04:30:52 UTC (rev 1567) +++ MetaSQLObject/trunk/setup.cfg 2006-02-06 04:34:14 UTC (rev 1568) @@ -0,0 +1,31 @@ +[egg_info] +tag_build = dev +tag_svn_revision = true + +[pudge] +theme = pythonpaste.org +docs = docs/index.txt +doc_base = docs/ +dest = docs/html +modules = metasqlobject +title = Meta SQLObject +mailing_list_url = http://sqlobject.org/community.html +settings = normal_link_color=#039 + visited_color=#093 + hover_color=#ddf + body_outer_bg_color=#46a + body_border_color=#09f + nav_container_color=#79f + nav_button_color=#037 + nav_border_color=#05f + no_about=true + +[publish] +doc-dir = docs/html +make-dirs = 1 + +## For live documentation: +doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/metasqlobject/ + +## For in-development documentation: +#doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/devel/ Added: MetaSQLObject/trunk/setup.py =================================================================== --- MetaSQLObject/trunk/setup.py 2006-02-06 04:30:52 UTC (rev 1567) +++ MetaSQLObject/trunk/setup.py 2006-02-06 04:34:14 UTC (rev 1568) @@ -0,0 +1,26 @@ +from setuptools import setup, find_packages +import sys, os + +version = '0.0' + +setup(name='MetaSQLObject', + version=version, + description="Metaprogramming techniques used in SQLObject", + long_description="""\ +""", + keywords='sqlobject metaprogramming', + author='Ian Bicking', + author_email='ia...@co...', + url='http://sqlobject.org/metasqlobject/', + license='MIT', + packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + include_package_data=True, + zip_safe=False, + install_requires=[ + # -*- Extra requirements: -*- + ], + entry_points=""" + # -*- Entry points: -*- + """, + ) + Property changes on: MetaSQLObject/trunk/setup.py ___________________________________________________________________ Name: svn:eol-style + native |
|
From: <sub...@co...> - 2006-02-06 04:30:56
|
Author: ianb Date: 2006-02-05 21:30:52 -0700 (Sun, 05 Feb 2006) New Revision: 1567 Added: MetaSQLObject/ MetaSQLObject/branches/ MetaSQLObject/tags/ MetaSQLObject/trunk/ Log: New project MetaSQLObject |
|
From: SourceForge.net <no...@so...> - 2006-02-05 17:57:42
|
Bugs item #1424667, was opened at 2006-02-05 18:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424667&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: DBM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl Bartel (karlb) Assigned to: Nobody/Anonymous (nobody) Summary: 'maximum recursion depth exceeded' when __len__ is defined Initial Comment: class BugListEntry(SQLObject): bug_list = ForeignKey('BugList') class BugList(SQLObject): entries = MultipleJoin('BugListEntry') def __len__(self): return len(self.entries) When I'm calling 'BugList()' I get a 'RuntimeError: maximum recursion depth exceeded'. Is this a bug in SQLObject, or am I doing something wrong? It works fine when I'm removing the '__len__' method. I'm using SQLObject as a part of TurboGears 8.8 with an SQLite database. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424667&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-05 04:29:45
|
Bugs item #1040526, was opened at 2004-10-05 04:51 Message generated for change (Comment added) made by garrett1020 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1040526&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: SQLObject from repository Status: Open Resolution: None Priority: 5 Submitted By: Marcin Wojdyr (wojdyr) Assigned to: Nobody/Anonymous (nobody) Summary: too many DB selects in person.addresses case Initial Comment: I see the same number of queries as Robert Marcin http://sourceforge.net/mailarchive/message.php?msg_id=9673722 >> First about MultipleJoin: as Robert wrote in >> http://sourceforge.net/mailarchive/forum.php?thread_id=5435228&forum_id=30269 >> >> person.addresses will generate n+1 queries to DB. > > > I don"t think that is what happens...? It"s certainly not intended to > cause that many selects. Unfortunately, it does, at least it does when using Postgres, a fresh install of SQLObject 0.6, Python 2.3.3, W2000 :-( The first select is : SELECT id FROM address WHERE person_id = ### which returns "n" id"s then for every id in the returned list there is : SELECT column(s)... FROM address WHERE id = #### i.e. n+1 queries to DB. Robert ---------------------------------------------------------------------- Comment By: Garrett Smith (garrett1020) Date: 2006-02-04 22:29 Message: Logged In: YES user_id=448609 Based on the code, this behavior appears very much by design. I recommend turning MultipleJoin into a descriptor that implements a standard select, which would avoid the multiple calls to the DB. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1040526&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-05 04:25:43
|
Bugs item #1424369, was opened at 2006-02-04 22:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424369&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: Open Resolution: None Priority: 5 Submitted By: Garrett Smith (garrett1020) Assigned to: Nobody/Anonymous (nobody) Summary: selectBy doesn't protest invalid columns Initial Comment: I mistakenly used 'ownerId' rather than 'ownerID' in a selectBy call. Rather than raise an exception, the SQLObject generated a select with the following where clause: WHERE 1 = 1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1424369&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-04 03:19:27
|
Patches item #1423877, was opened at 2006-02-04 03:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1423877&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rick Richardson (rovar) Assigned to: Nobody/Anonymous (nobody) Summary: createTable broken for mysql in 0.8dev Initial Comment: There was no mysqlCreateReferenceConstraint so it was referring to the base class which threw a horrible assert. I have created the constraint stuff in the style of the pg version. NOTE: The PG version could easily create constraint name duplicates. This is a nono in mysql and other databases. I have modified the naming convention so that they're far less likely to clash. patch included. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1423877&group_id=74338 |
|
From: <sub...@co...> - 2006-02-04 00:55:31
|
Author: ianb
Date: 2006-02-03 17:55:23 -0700 (Fri, 03 Feb 2006)
New Revision: 1563
Modified:
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/maxdb/maxdbconnection.py
SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
Log:
Added implementations of createReferenceConstraints for database backends besides postgres and sqlite. Which implies table creation was totally broken before this for all those backends :(
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2006-02-03 19:08:46 UTC (rev 1562)
+++ SQLObject/trunk/sqlobject/col.py 2006-02-04 00:55:23 UTC (rev 1563)
@@ -777,6 +777,9 @@
sql = ', '.join([sql, constraint])
return sql
+ def mysqlCreateReferenceConstraint(self):
+ return None
+
def sybaseCreateSQL(self):
sql = SOKeyCol.sybaseCreateSQL(self)
other = findClass(self.foreignKey)
@@ -788,6 +791,10 @@
sql = ' '.join([sql, reference])
return sql
+ def sybaseCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
def mssqlCreateSQL(self):
sql = SOKeyCol.mssqlCreateSQL(self)
other = findClass(self.foreignKey)
@@ -799,6 +806,10 @@
sql = ' '.join([sql, reference])
return sql
+ def mssqlCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
def maxdbCreateSQL(self):
other = findClass(self.foreignKey)
fidName = self.dbName
@@ -810,6 +821,10 @@
sql=sql + 'FOREIGN KEY (%s) REFERENCES %s(%s)'%(fidName,tName,idName)
return sql
+ def maxdbCreateReferenceConstraint(self):
+ # @@: Code from above should be moved here
+ return None
+
class ForeignKey(KeyCol):
baseClass = SOForeignKey
Modified: SQLObject/trunk/sqlobject/maxdb/maxdbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/maxdb/maxdbconnection.py 2006-02-03 19:08:46 UTC (rev 1562)
+++ SQLObject/trunk/sqlobject/maxdb/maxdbconnection.py 2006-02-04 00:55:23 UTC (rev 1563)
@@ -169,6 +169,9 @@
self.query("CREATE SEQUENCE %s"
% self.createSequenceName(soClass.sqlmeta.table))
+ def createReferenceConstraint(self, soClass, col):
+ return col.maxdbCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.maxdbCreateSQL()
Modified: SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2006-02-03 19:08:46 UTC (rev 1562)
+++ SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2006-02-04 00:55:23 UTC (rev 1563)
@@ -148,6 +148,9 @@
else:
return query
+ def createReferenceConstraint(self, soClass, col):
+ return col.mssqlCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.mssqlCreateSQL()
Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-02-03 19:08:46 UTC (rev 1562)
+++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-02-04 00:55:23 UTC (rev 1563)
@@ -92,6 +92,9 @@
return "%s LIMIT %i, -1" % (query, start)
return "%s LIMIT %i, %i" % (query, start, end-start)
+ def createReferenceConstraint(self, soClass, col):
+ return col.mysqlCreateReferenceConstraint()
+
def createColumn(self, soClass, col):
return col.mysqlCreateSQL()
|
|
From: <sub...@co...> - 2006-02-03 19:08:55
|
Author: phd
Date: 2006-02-03 12:08:46 -0700 (Fri, 03 Feb 2006)
New Revision: 1562
Modified:
home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
home/phd/SQLObject/paramstyles/sqlobject/tests/test_select.py
Log:
Merged patches from the revisions 1559:1561 from the trunk: applied the patch 1422132: do not allow selectBy(nonexistantcolumn=foo).
Modified: home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2006-02-03 19:07:34 UTC (rev 1561)
+++ home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2006-02-03 19:08:46 UTC (rev 1562)
@@ -16,6 +16,7 @@
import sqlbuilder
from cache import CacheSet
import col
+popKey = col.popKey
from joins import sorter
from converters import sqlrepr
import classregistry
@@ -695,16 +696,20 @@
ops = {None: "IS"}
data = {}
if 'id' in kw:
- data[soClass.sqlmeta.idName] = kw['id']
+ data[soClass.sqlmeta.idName] = popKey(kw, 'id')
for key, col in soClass.sqlmeta.columns.items():
if key in kw:
- data[col.dbName] = kw[key]
+ data[col.dbName] = popKey(kw, key)
elif col.foreignName in kw:
- obj = kw[col.foreignName]
+ obj = popKey(kw, col.foreignName)
if obj is None:
data[col.dbName] = None
else:
data[col.dbName] = obj.id
+ if kw:
+ # pick the first key from kw to use to raise the error,
+ raise TypeError, "got an unexpected keyword argument(s): %r" % kw.keys()
+
if not data:
return None
return ' AND '.join(
Modified: home/phd/SQLObject/paramstyles/sqlobject/tests/test_select.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/tests/test_select.py 2006-02-03 19:07:34 UTC (rev 1561)
+++ home/phd/SQLObject/paramstyles/sqlobject/tests/test_select.py 2006-02-03 19:08:46 UTC (rev 1562)
@@ -91,6 +91,13 @@
b = IterTest(name='b')
assert IterTest.selectBy().count() == 2
+def test_selectBy_kwargs():
+ setupClass(IterTest)
+ try:
+ b = IterTest(nonexistant='b')
+ except TypeError:
+ return
+ assert False, "IterTest(nonexistant='b') should raise TypeError"
class Counter2(SQLObject):
|
|
From: SourceForge.net <no...@so...> - 2006-02-03 19:08:03
|
Patches item #1422132, was opened at 2006-02-02 06:44 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1422132&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: Accepted Priority: 5 Submitted By: Stephen Thorne (jerub) >Assigned to: Oleg Broytmann (phd) Summary: [patch] selectBy(nonexistantcolumn=foo) passes silently Initial Comment: When doing a query on a table, for instance: Foo.selectBy(food="bar") where 'food' is a typo, and 'foo' is the correct column name, no error will occur, and this is equivilnet to: Foo.select() Attached is a patch to both dbconnection.py and tests/test_select.py, adding an exception to the code for the case where unexpected kwargs are passed, and a test for that behaviour. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-03 22:07 Message: Logged In: YES user_id=4799 Applied to the revision 1560 to the trunk, r1561 to the 0.7-branch. Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1422132&group_id=74338 |
|
From: <sub...@co...> - 2006-02-03 19:07:45
|
Author: phd
Date: 2006-02-03 12:07:34 -0700 (Fri, 03 Feb 2006)
New Revision: 1561
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
SQLObject/branches/0.7-bugfix/sqlobject/tests/test_select.py
Log:
Applied the patch 1422132: do not allow selectBy(nonexistantcolumn=foo).
Modified: SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-02-03 19:06:10 UTC (rev 1560)
+++ SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-02-03 19:07:34 UTC (rev 1561)
@@ -16,6 +16,7 @@
import sqlbuilder
from cache import CacheSet
import col
+popKey = col.popKey
from joins import sorter
from converters import sqlrepr
import classregistry
@@ -630,16 +631,20 @@
ops = {None: "IS"}
data = {}
if 'id' in kw:
- data[soClass.sqlmeta.idName] = kw['id']
+ data[soClass.sqlmeta.idName] = popKey(kw, 'id')
for key, col in soClass.sqlmeta.columns.items():
if key in kw:
- data[col.dbName] = kw[key]
+ data[col.dbName] = popKey(kw, key)
elif col.foreignName in kw:
- obj = kw[col.foreignName]
+ obj = popKey(kw, col.foreignName)
if obj is None:
data[col.dbName] = None
else:
data[col.dbName] = obj.id
+ if kw:
+ # pick the first key from kw to use to raise the error,
+ raise TypeError, "got an unexpected keyword argument(s): %r" % kw.keys()
+
if not data:
return None
return ' AND '.join(
Modified: SQLObject/branches/0.7-bugfix/sqlobject/tests/test_select.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/tests/test_select.py 2006-02-03 19:06:10 UTC (rev 1560)
+++ SQLObject/branches/0.7-bugfix/sqlobject/tests/test_select.py 2006-02-03 19:07:34 UTC (rev 1561)
@@ -77,6 +77,13 @@
b = IterTest(name='b')
assert IterTest.selectBy().count() == 2
+def test_selectBy_kwargs():
+ setupClass(IterTest)
+ try:
+ b = IterTest(nonexistant='b')
+ except TypeError:
+ return
+ assert False, "IterTest(nonexistant='b') should raise TypeError"
class Counter2(SQLObject):
|
|
From: <sub...@co...> - 2006-02-03 19:06:20
|
Author: phd
Date: 2006-02-03 12:06:10 -0700 (Fri, 03 Feb 2006)
New Revision: 1560
Modified:
SQLObject/trunk/sqlobject/dbconnection.py
SQLObject/trunk/sqlobject/tests/test_select.py
Log:
Applied the patch 1422132: do not allow selectBy(nonexistantcolumn=foo).
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2006-02-02 22:43:28 UTC (rev 1559)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2006-02-03 19:06:10 UTC (rev 1560)
@@ -16,6 +16,7 @@
import sqlbuilder
from cache import CacheSet
import col
+popKey = col.popKey
from joins import sorter
from converters import sqlrepr
import classregistry
@@ -682,16 +683,20 @@
ops = {None: "IS"}
data = {}
if 'id' in kw:
- data[soClass.sqlmeta.idName] = kw['id']
+ data[soClass.sqlmeta.idName] = popKey(kw, 'id')
for key, col in soClass.sqlmeta.columns.items():
if key in kw:
- data[col.dbName] = kw[key]
+ data[col.dbName] = popKey(kw, key)
elif col.foreignName in kw:
- obj = kw[col.foreignName]
+ obj = popKey(kw, col.foreignName)
if obj is None:
data[col.dbName] = None
else:
data[col.dbName] = obj.id
+ if kw:
+ # pick the first key from kw to use to raise the error,
+ raise TypeError, "got an unexpected keyword argument(s): %r" % kw.keys()
+
if not data:
return None
return ' AND '.join(
Modified: SQLObject/trunk/sqlobject/tests/test_select.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_select.py 2006-02-02 22:43:28 UTC (rev 1559)
+++ SQLObject/trunk/sqlobject/tests/test_select.py 2006-02-03 19:06:10 UTC (rev 1560)
@@ -91,6 +91,13 @@
b = IterTest(name='b')
assert IterTest.selectBy().count() == 2
+def test_selectBy_kwargs():
+ setupClass(IterTest)
+ try:
+ b = IterTest(nonexistant='b')
+ except TypeError:
+ return
+ assert False, "IterTest(nonexistant='b') should raise TypeError"
class Counter2(SQLObject):
|
|
From: SourceForge.net <no...@so...> - 2006-02-03 19:02:57
|
Patches item #1421263, was opened at 2006-02-01 11:39 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: configurable client character set (encoding) for MySQL Initial Comment: This patch adds 'client_encoding' parameter to MySQLConnection class which is used to configure MySQL connection with "SET NAMES" command. This is the only way for MySQL 4.x on Windows to configure client encoding and is crucial for non-ascii databases. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-03 22:02 Message: Logged In: YES user_id=4799 At least add docs, please. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-03 19:53 Message: Logged In: YES user_id=113894 I can add the docs but not the tests, sorry (see my other comment). If you won't accept the patch without tests please let me know. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-02-03 19:28 Message: Logged In: YES user_id=4799 Patch, documentation and, if possible, tests. Thank you in advance! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-03 19:02:22
|
Patches item #1417339, was opened at 2006-01-28 14:51 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: debug SQL queries recorded through logging module Initial Comment: The patch adds support for standard logging module for DBConnection classes which is crucial for using sqlobject in cgi scripts -- you can't use STDOUT because it is sent to the browser. Logging is activated if user specifies logger key, the key also serves as a logger name to be used. This is a duplicate of the previous ticket, only with a file attacheed (hope so). ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-03 22:02 Message: Logged In: YES user_id=4799 Can I remove setupLogging() from dbtest.py? PS. What's the problem with tests? ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-03 19:52 Message: Logged In: YES user_id=113894 Oleg, I spent half an hour the other day trying to create/run a test but haven't succeed. So, no, I cannot provide a test. I you're not willing to submit the patch in the current form, well, so be it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-02-03 19:27 Message: Logged In: YES user_id=4799 I see you patch sqlobject/tests/dbtest.py but do not create any test. If it's not too hard can you also add a test that at least call setupLogging() and run a few SQL queries to make sure logging works. Even better - log to a file and test if the file contains what is expected. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-01 11:36 Message: Logged In: YES user_id=113894 Here is new patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 19:57 Message: Logged In: YES user_id=4799 Aha, that's better. Can you aslo add a test that sets up a logger (logging to a stderr or a separate file) and a patch for documentation (describe the "logger" keyword in a DB URI)? ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-01-31 19:04 Message: Logged In: YES user_id=113894 Oleg, I was considered checking for logging module but then decided that if a person specifies 'logger' parameter to db connection then he should know what he's doing. If you insist, I can add some way of handling this error but please elaborate how exactly do you want me to handle it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 18:39 Message: Logged In: YES user_id=4799 Module logging is only available in Python 2.3. SQLObject is supposed to work with Python 2.2. You have to catch ImportError and provide a graceful fallback. After 0.8 I'd like to deprecate support for Python 2.2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-03 16:53:52
|
Patches item #1421263, was opened at 2006-02-01 10:39 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: configurable client character set (encoding) for MySQL Initial Comment: This patch adds 'client_encoding' parameter to MySQLConnection class which is used to configure MySQL connection with "SET NAMES" command. This is the only way for MySQL 4.x on Windows to configure client encoding and is crucial for non-ascii databases. ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-03 18:53 Message: Logged In: YES user_id=113894 I can add the docs but not the tests, sorry (see my other comment). If you won't accept the patch without tests please let me know. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-02-03 18:28 Message: Logged In: YES user_id=4799 Patch, documentation and, if possible, tests. Thank you in advance! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-03 16:52:50
|
Patches item #1417339, was opened at 2006-01-28 13:51 Message generated for change (Comment added) made by mfi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: debug SQL queries recorded through logging module Initial Comment: The patch adds support for standard logging module for DBConnection classes which is crucial for using sqlobject in cgi scripts -- you can't use STDOUT because it is sent to the browser. Logging is activated if user specifies logger key, the key also serves as a logger name to be used. This is a duplicate of the previous ticket, only with a file attacheed (hope so). ---------------------------------------------------------------------- >Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-03 18:52 Message: Logged In: YES user_id=113894 Oleg, I spent half an hour the other day trying to create/run a test but haven't succeed. So, no, I cannot provide a test. I you're not willing to submit the patch in the current form, well, so be it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-02-03 18:27 Message: Logged In: YES user_id=4799 I see you patch sqlobject/tests/dbtest.py but do not create any test. If it's not too hard can you also add a test that at least call setupLogging() and run a few SQL queries to make sure logging works. Even better - log to a file and test if the file contains what is expected. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-01 10:36 Message: Logged In: YES user_id=113894 Here is new patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 18:57 Message: Logged In: YES user_id=4799 Aha, that's better. Can you aslo add a test that sets up a logger (logging to a stderr or a separate file) and a patch for documentation (describe the "logger" keyword in a DB URI)? ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-01-31 18:04 Message: Logged In: YES user_id=113894 Oleg, I was considered checking for logging module but then decided that if a person specifies 'logger' parameter to db connection then he should know what he's doing. If you insist, I can add some way of handling this error but please elaborate how exactly do you want me to handle it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 17:39 Message: Logged In: YES user_id=4799 Module logging is only available in Python 2.3. SQLObject is supposed to work with Python 2.2. You have to catch ImportError and provide a graceful fallback. After 0.8 I'd like to deprecate support for Python 2.2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-03 16:28:58
|
Patches item #1421263, was opened at 2006-02-01 11:39 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: configurable client character set (encoding) for MySQL Initial Comment: This patch adds 'client_encoding' parameter to MySQLConnection class which is used to configure MySQL connection with "SET NAMES" command. This is the only way for MySQL 4.x on Windows to configure client encoding and is crucial for non-ascii databases. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-03 19:28 Message: Logged In: YES user_id=4799 Patch, documentation and, if possible, tests. Thank you in advance! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1421263&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-02-03 16:27:15
|
Patches item #1417339, was opened at 2006-01-28 14:51 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim F. Ischenko (mfi) Assigned to: Nobody/Anonymous (nobody) Summary: debug SQL queries recorded through logging module Initial Comment: The patch adds support for standard logging module for DBConnection classes which is crucial for using sqlobject in cgi scripts -- you can't use STDOUT because it is sent to the browser. Logging is activated if user specifies logger key, the key also serves as a logger name to be used. This is a duplicate of the previous ticket, only with a file attacheed (hope so). ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-02-03 19:27 Message: Logged In: YES user_id=4799 I see you patch sqlobject/tests/dbtest.py but do not create any test. If it's not too hard can you also add a test that at least call setupLogging() and run a few SQL queries to make sure logging works. Even better - log to a file and test if the file contains what is expected. ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-02-01 11:36 Message: Logged In: YES user_id=113894 Here is new patch ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 19:57 Message: Logged In: YES user_id=4799 Aha, that's better. Can you aslo add a test that sets up a logger (logging to a stderr or a separate file) and a patch for documentation (describe the "logger" keyword in a DB URI)? ---------------------------------------------------------------------- Comment By: Maxim F. Ischenko (mfi) Date: 2006-01-31 19:04 Message: Logged In: YES user_id=113894 Oleg, I was considered checking for logging module but then decided that if a person specifies 'logger' parameter to db connection then he should know what he's doing. If you insist, I can add some way of handling this error but please elaborate how exactly do you want me to handle it. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-01-31 18:39 Message: Logged In: YES user_id=4799 Module logging is only available in Python 2.3. SQLObject is supposed to work with Python 2.2. You have to catch ImportError and provide a graceful fallback. After 0.8 I'd like to deprecate support for Python 2.2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338 |