sqlobject-cvs Mailing List for SQLObject (Page 126)
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: <sub...@co...> - 2006-06-16 00:21:19
|
Author: ianb Date: 2006-06-15 18:21:13 -0600 (Thu, 15 Jun 2006) New Revision: 1817 Modified: SQLObject/docs/index.comments.txt Log: in page: http://pythonpaste.org/ Delete comment Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-06-15 16:42:53 UTC (rev 1816) +++ SQLObject/docs/index.comments.txt 2006-06-16 00:21:13 UTC (rev 1817) @@ -37,11 +37,3 @@ ip: 68.98.143.137 testing -==== $(example) c +++++ ----------------------------------------- -date: 2006-06-14T17:23:52 -id: 6 -ip: 80.41.71.249 -username: fred - -test22 |
|
From: <sub...@co...> - 2006-06-15 16:42:57
|
Author: phd
Date: 2006-06-15 10:42:53 -0600 (Thu, 15 Jun 2006)
New Revision: 1816
Modified:
home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
home/phd/SQLObject/paramstyles/sqlobject/postgres/pgconnection.py
Log:
Merged patches from the revisions 1813:1815 from the trunk: a patch by Ivan Horvath <i.h...@al...> for use_unicode with fromDatabase.
Modified: home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-06-15 16:41:48 UTC (rev 1815)
+++ home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-06-15 16:42:53 UTC (rev 1816)
@@ -145,6 +145,9 @@
if field == 'id':
continue
colClass, kw = self.guessClass(t)
+ if self.kw['use_unicode'] and colClass is col.StringCol:
+ colClass = col.UnicodeCol
+ if self.client_encoding: kw['dbEncoding'] = self.client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
if default and t.startswith('int'):
@@ -180,18 +183,18 @@
elif t.startswith('tinyblob'):
return col.BLOBCol, {"length": 2**8-1}
elif t.startswith('tinytext'):
- return col.BLOBCol, {"length": 2**8-1, "varchar": True}
+ return col.StringCol, {"length": 2**8-1, "varchar": True}
elif t.startswith('blob'):
return col.BLOBCol, {"length": 2**16-1}
elif t.startswith('text'):
- return col.BLOBCol, {"length": 2**16-1, "varchar": True}
+ return col.StringCol, {"length": 2**16-1, "varchar": True}
elif t.startswith('mediumblob'):
return col.BLOBCol, {"length": 2**24-1}
elif t.startswith('mediumtext'):
- return col.BLOBCol, {"length": 2**24-1, "varchar": True}
+ return col.StringCol, {"length": 2**24-1, "varchar": True}
elif t.startswith('longblob'):
return col.BLOBCol, {"length": 2**32}
elif t.startswith('longtext'):
- return col.BLOBCol, {"length": 2**32, "varchar": True}
+ return col.StringCol, {"length": 2**32, "varchar": True}
else:
return col.Col, {}
Modified: home/phd/SQLObject/paramstyles/sqlobject/postgres/pgconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/postgres/pgconnection.py 2006-06-15 16:41:48 UTC (rev 1815)
+++ home/phd/SQLObject/paramstyles/sqlobject/postgres/pgconnection.py 2006-06-15 16:42:53 UTC (rev 1816)
@@ -238,7 +238,7 @@
if field == primaryKey:
continue
colClass, kw = self.guessClass(t)
- if self.unicodeCols and colClass == col.StringCol:
+ if self.unicodeCols and colClass is col.StringCol:
colClass = col.UnicodeCol
kw['dbEncoding'] = client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
@@ -327,7 +327,6 @@
conn.close()
-
# Converter for psycopg Binary type.
def PsycoBinaryConverter(value, db):
assert db == 'postgres'
|
|
From: <sub...@co...> - 2006-06-15 16:41:55
|
Author: phd
Date: 2006-06-15 10:41:48 -0600 (Thu, 15 Jun 2006)
New Revision: 1815
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
SQLObject/branches/0.7-bugfix/sqlobject/postgres/pgconnection.py
Log:
A patch by Ivan Horvath <i.h...@al...> for use_unicode with fromDatabase.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-06-15 16:41:29 UTC (rev 1814)
+++ SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-06-15 16:41:48 UTC (rev 1815)
@@ -134,6 +134,9 @@
if field == 'id':
continue
colClass, kw = self.guessClass(t)
+ if self.kw['use_unicode'] and colClass is col.StringCol:
+ colClass = col.UnicodeCol
+ if self.client_encoding: kw['dbEncoding'] = self.client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
if default and t.startswith('int'):
@@ -169,18 +172,18 @@
elif t.startswith('tinyblob'):
return col.BLOBCol, {"length": 2**8-1}
elif t.startswith('tinytext'):
- return col.BLOBCol, {"length": 2**8-1, "varchar": True}
+ return col.StringCol, {"length": 2**8-1, "varchar": True}
elif t.startswith('blob'):
return col.BLOBCol, {"length": 2**16-1}
elif t.startswith('text'):
- return col.BLOBCol, {"length": 2**16-1, "varchar": True}
+ return col.StringCol, {"length": 2**16-1, "varchar": True}
elif t.startswith('mediumblob'):
return col.BLOBCol, {"length": 2**24-1}
elif t.startswith('mediumtext'):
- return col.BLOBCol, {"length": 2**24-1, "varchar": True}
+ return col.StringCol, {"length": 2**24-1, "varchar": True}
elif t.startswith('longblob'):
return col.BLOBCol, {"length": 2**32}
elif t.startswith('longtext'):
- return col.BLOBCol, {"length": 2**32, "varchar": True}
+ return col.StringCol, {"length": 2**32, "varchar": True}
else:
return col.Col, {}
Modified: SQLObject/branches/0.7-bugfix/sqlobject/postgres/pgconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/postgres/pgconnection.py 2006-06-15 16:41:29 UTC (rev 1814)
+++ SQLObject/branches/0.7-bugfix/sqlobject/postgres/pgconnection.py 2006-06-15 16:41:48 UTC (rev 1815)
@@ -249,7 +249,7 @@
if field == primaryKey:
continue
colClass, kw = self.guessClass(t)
- if self.unicodeCols and colClass == col.StringCol:
+ if self.unicodeCols and colClass is col.StringCol:
colClass = col.UnicodeCol
kw['dbEncoding'] = client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
@@ -338,7 +338,6 @@
conn.close()
-
# Converter for psycopg Binary type.
def PsycoBinaryConverter(value, db):
assert db == 'postgres'
|
|
From: <sub...@co...> - 2006-06-15 16:41:40
|
Author: phd
Date: 2006-06-15 10:41:29 -0600 (Thu, 15 Jun 2006)
New Revision: 1814
Modified:
SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
SQLObject/trunk/sqlobject/postgres/pgconnection.py
Log:
A patch by Ivan Horvath <i.h...@al...> for use_unicode with fromDatabase.
Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-06-14 23:23:52 UTC (rev 1813)
+++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-06-15 16:41:29 UTC (rev 1814)
@@ -145,6 +145,9 @@
if field == 'id':
continue
colClass, kw = self.guessClass(t)
+ if self.kw['use_unicode'] and colClass is col.StringCol:
+ colClass = col.UnicodeCol
+ if self.client_encoding: kw['dbEncoding'] = self.client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
if default and t.startswith('int'):
@@ -180,18 +183,18 @@
elif t.startswith('tinyblob'):
return col.BLOBCol, {"length": 2**8-1}
elif t.startswith('tinytext'):
- return col.BLOBCol, {"length": 2**8-1, "varchar": True}
+ return col.StringCol, {"length": 2**8-1, "varchar": True}
elif t.startswith('blob'):
return col.BLOBCol, {"length": 2**16-1}
elif t.startswith('text'):
- return col.BLOBCol, {"length": 2**16-1, "varchar": True}
+ return col.StringCol, {"length": 2**16-1, "varchar": True}
elif t.startswith('mediumblob'):
return col.BLOBCol, {"length": 2**24-1}
elif t.startswith('mediumtext'):
- return col.BLOBCol, {"length": 2**24-1, "varchar": True}
+ return col.StringCol, {"length": 2**24-1, "varchar": True}
elif t.startswith('longblob'):
return col.BLOBCol, {"length": 2**32}
elif t.startswith('longtext'):
- return col.BLOBCol, {"length": 2**32, "varchar": True}
+ return col.StringCol, {"length": 2**32, "varchar": True}
else:
return col.Col, {}
Modified: SQLObject/trunk/sqlobject/postgres/pgconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/postgres/pgconnection.py 2006-06-14 23:23:52 UTC (rev 1813)
+++ SQLObject/trunk/sqlobject/postgres/pgconnection.py 2006-06-15 16:41:29 UTC (rev 1814)
@@ -238,7 +238,7 @@
if field == primaryKey:
continue
colClass, kw = self.guessClass(t)
- if self.unicodeCols and colClass == col.StringCol:
+ if self.unicodeCols and colClass is col.StringCol:
colClass = col.UnicodeCol
kw['dbEncoding'] = client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
@@ -327,7 +327,6 @@
conn.close()
-
# Converter for psycopg Binary type.
def PsycoBinaryConverter(value, db):
assert db == 'postgres'
|
|
From: <sub...@co...> - 2006-06-14 23:23:59
|
Author: ianb Date: 2006-06-14 17:23:52 -0600 (Wed, 14 Jun 2006) New Revision: 1813 Modified: SQLObject/docs/index.comments.txt Log: in page: http://pythonpaste.org/ by: fred Add comment Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-06-14 23:23:15 UTC (rev 1812) +++ SQLObject/docs/index.comments.txt 2006-06-14 23:23:52 UTC (rev 1813) @@ -37,3 +37,11 @@ ip: 68.98.143.137 testing +==== $(example) c +++++ +---------------------------------------- +date: 2006-06-14T17:23:52 +id: 6 +ip: 80.41.71.249 +username: fred + +test22 |
|
From: <sub...@co...> - 2006-06-14 23:23:25
|
Author: ianb Date: 2006-06-14 17:23:15 -0600 (Wed, 14 Jun 2006) New Revision: 1812 Modified: SQLObject/docs/index.comments.txt Log: in page: http://pythonpaste.org/ Modified: SQLObject/docs/index.comments.txt =================================================================== --- SQLObject/docs/index.comments.txt 2006-06-14 15:15:12 UTC (rev 1811) +++ SQLObject/docs/index.comments.txt 2006-06-14 23:23:15 UTC (rev 1812) @@ -29,7 +29,7 @@ ip: 216.80.121.210 username: Adrian H. -Just spamming this page with another test! :) +Just spamming this page with another tesxt! :) ==== $(example) c +++ ---------------------------------------- date: 2006-04-14T22:41:40 |
|
From: <sub...@co...> - 2006-06-14 15:15:25
|
Author: phd
Date: 2006-06-14 09:15:12 -0600 (Wed, 14 Jun 2006)
New Revision: 1811
Modified:
home/phd/SQLObject/paramstyles/sqlobject/col.py
home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py
Log:
Merged patches from the revisions 1802:1810 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/col.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-06-14 15:09:41 UTC (rev 1810)
+++ home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-06-14 15:15:12 UTC (rev 1811)
@@ -958,7 +958,7 @@
except:
raise validators.Invalid("expected an date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
- return datetime.datetime(*stime[:7])
+ return datetime.datetime(*stime[:6])
def from_python(self, value, state):
if value is None:
Modified: home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2006-06-14 15:09:41 UTC (rev 1810)
+++ home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2006-06-14 15:15:12 UTC (rev 1811)
@@ -57,14 +57,15 @@
auth = getattr(self, 'user', None) or ''
if auth:
if self.password:
- auth = auth + '@' + self.password
- auth = auth + ':'
+ auth = auth + ':' + self.password
+ auth = auth + '@'
else:
assert not getattr(self, 'password', None), (
'URIs cannot express passwords without usernames')
uri = '%s://%s' % (self.dbName, auth)
if self.host:
- uri += self.host + '/'
+ uri += self.host
+ uri += '/'
db = self.db
if db.startswith('/'):
db = path[1:]
Modified: home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py 2006-06-14 15:09:41 UTC (rev 1810)
+++ home/phd/SQLObject/paramstyles/sqlobject/sqlite/sqliteconnection.py 2006-06-14 15:15:12 UTC (rev 1811)
@@ -61,7 +61,10 @@
if 'mode' in kw:
opts['mode'] = int(popKey(kw, 'mode'), 0)
if 'timeout' in kw:
- opts['timeout'] = float(popKey(kw, 'timeout'))
+ if using_sqlite2:
+ opts['timeout'] = float(popKey(kw, 'timeout'))
+ else:
+ opts['timeout'] = int(float(popKey(kw, 'timeout')) * 1000)
if 'check_same_thread' in kw:
opts["check_same_thread"] = bool(popKey(kw, 'check_same_thread'))
# use only one connection for sqlite - supports multiple)
|
|
From: SourceForge.net <no...@so...> - 2006-06-14 15:10:38
|
Bugs item #1496321, was opened at 2006-05-28 13:44 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1496321&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: Markus Gritsch (markus_gritsch) Assigned to: Oleg Broytmann (phd) Summary: Regression in DateTimeValidator Initial Comment: The following change in the class DateTimeValidator leads to different return values: SQLObject-0.7.0: secs = time.mktime(stime) return datetime.datetime.fromtimestamp(secs) SQLObject-0.7.1b1: return datetime.datetime(*stime[:7]) I think only the first 6 items of stime should be used instead of also including the microseconds. When I change the line to return datetime.datetime(*stime[:6]) everything works fine again. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-06-14 19:10 Message: Logged In: YES user_id=4799 Applied in the revision 1809 to the trunk. Thank you! ---------------------------------------------------------------------- Comment By: Markus Gritsch (markus_gritsch) Date: 2006-06-12 18:35 Message: Logged In: YES user_id=553904 Since the 7th item of stime is the day-of-the-week, the script below prints out 2006-06-11 00:00:00.000006 wrongly taking the 6th day-of-the-week as the microseconds. --- import datetime from sqlobject import * sqlhub.processConnection = connectionForURI('sqlite:/:memory:') class Test(SQLObject): time = DateTimeCol() Test.createTable() t = Test(time=datetime.datetime(2006, 6, 11)) print Test.selectBy(id=1)[0].time ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-06-07 16:53 Message: Logged In: YES user_id=4799 Can you write a short test script that demonstrates the problem? ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-06-07 16:49 Message: Logged In: YES user_id=4799 Can you write a short test script that demonstrates the problem? ---------------------------------------------------------------------- Comment By: Markus Gritsch (markus_gritsch) Date: 2006-06-04 20:56 Message: Logged In: YES user_id=553904 Additional note: The 7th value is not the micro-seconds, but the day-of-the-week. So the line should be definitely changed to the one I suggested. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1496321&group_id=74338 |
|
From: <sub...@co...> - 2006-06-14 15:09:49
|
Author: phd
Date: 2006-06-14 09:09:41 -0600 (Wed, 14 Jun 2006)
New Revision: 1810
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/col.py
Log:
A patch by Markus Gritsch <mar...@us...> for DateTimeValidator (bug 1496321 ).
Modified: SQLObject/branches/0.7-bugfix/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/col.py 2006-06-14 15:09:25 UTC (rev 1809)
+++ SQLObject/branches/0.7-bugfix/sqlobject/col.py 2006-06-14 15:09:41 UTC (rev 1810)
@@ -945,7 +945,7 @@
except:
raise validators.Invalid("expected an date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
- return datetime.datetime(*stime[:7])
+ return datetime.datetime(*stime[:6])
def from_python(self, value, state):
if value is None:
|
|
From: <sub...@co...> - 2006-06-14 15:09:32
|
Author: phd
Date: 2006-06-14 09:09:25 -0600 (Wed, 14 Jun 2006)
New Revision: 1809
Modified:
SQLObject/trunk/sqlobject/col.py
Log:
A patch by Markus Gritsch <mar...@us...> for DateTimeValidator (bug 1496321 ).
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2006-06-14 14:46:47 UTC (rev 1808)
+++ SQLObject/trunk/sqlobject/col.py 2006-06-14 15:09:25 UTC (rev 1809)
@@ -958,7 +958,7 @@
except:
raise validators.Invalid("expected an date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
- return datetime.datetime(*stime[:7])
+ return datetime.datetime(*stime[:6])
def from_python(self, value, state):
if value is None:
|
|
From: SourceForge.net <no...@so...> - 2006-06-14 15:07:33
|
Bugs item #1505829, was opened at 2006-06-14 11:55 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1505829&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 from repository >Status: Closed >Resolution: Out of Date Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: client_encoding problem Initial Comment: client_encoding param from connection string works strange with threading. For example with cherrypy, when i'm selecting row, first select is ok, then: UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-3: when threading was disabled: server.threadPool = 1 all was fine. Additional link: http://groups.google.com/group/turbogears-ru/browse_thread/thread/355655bd1607a988/a7e80647563ec92b#a7e80647563ec92b ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2006-06-14 19:07 Message: Logged In: YES user_id=4799 The patch was applied to the trunk long ago. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-06-14 15:39 Message: Logged In: NO This patch fixing trouble: sqlobject/mysql/mysqlconnection.py 66,67d65 < if self.client_encoding: < cursor.execute('SET NAMES ' + self.client_encoding) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1505829&group_id=74338 |
|
From: <sub...@co...> - 2006-06-14 14:46:57
|
Author: phd
Date: 2006-06-14 08:46:47 -0600 (Wed, 14 Jun 2006)
New Revision: 1808
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py
Log:
A patch by Dan Pascu <da...@ag...> for sqlite timeout specification.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-06-14 14:46:29 UTC (rev 1807)
+++ SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-06-14 14:46:47 UTC (rev 1808)
@@ -61,7 +61,10 @@
if 'mode' in kw:
opts['mode'] = int(popKey(kw, 'mode'), 0)
if 'timeout' in kw:
- opts['timeout'] = float(popKey(kw, 'timeout'))
+ if using_sqlite2:
+ opts['timeout'] = float(popKey(kw, 'timeout'))
+ else:
+ opts['timeout'] = int(float(popKey(kw, 'timeout')) * 1000)
if 'check_same_thread' in kw:
opts["check_same_thread"] = bool(popKey(kw, 'check_same_thread'))
# use only one connection for sqlite - supports multiple)
|
|
From: <sub...@co...> - 2006-06-14 14:46:37
|
Author: phd
Date: 2006-06-14 08:46:29 -0600 (Wed, 14 Jun 2006)
New Revision: 1807
Modified:
SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
Log:
A patch by Dan Pascu <da...@ag...> for sqlite timeout specification.
Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2006-06-13 21:27:16 UTC (rev 1806)
+++ SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2006-06-14 14:46:29 UTC (rev 1807)
@@ -61,7 +61,10 @@
if 'mode' in kw:
opts['mode'] = int(popKey(kw, 'mode'), 0)
if 'timeout' in kw:
- opts['timeout'] = float(popKey(kw, 'timeout'))
+ if using_sqlite2:
+ opts['timeout'] = float(popKey(kw, 'timeout'))
+ else:
+ opts['timeout'] = int(float(popKey(kw, 'timeout')) * 1000)
if 'check_same_thread' in kw:
opts["check_same_thread"] = bool(popKey(kw, 'check_same_thread'))
# use only one connection for sqlite - supports multiple)
|
|
From: SourceForge.net <no...@so...> - 2006-06-14 11:39:24
|
Bugs item #1505829, was opened at 2006-06-14 00:55 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1505829&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 from repository Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: client_encoding problem Initial Comment: client_encoding param from connection string works strange with threading. For example with cherrypy, when i'm selecting row, first select is ok, then: UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-3: when threading was disabled: server.threadPool = 1 all was fine. Additional link: http://groups.google.com/group/turbogears-ru/browse_thread/thread/355655bd1607a988/a7e80647563ec92b#a7e80647563ec92b ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-06-14 04:39 Message: Logged In: NO This patch fixing trouble: sqlobject/mysql/mysqlconnection.py 66,67d65 < if self.client_encoding: < cursor.execute('SET NAMES ' + self.client_encoding) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1505829&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2006-06-14 07:55:32
|
Bugs item #1505829, was opened at 2006-06-14 00:55 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=1505829&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 from repository Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: client_encoding problem Initial Comment: client_encoding param from connection string works strange with threading. For example with cherrypy, when i'm selecting row, first select is ok, then: UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-3: when threading was disabled: server.threadPool = 1 all was fine. Additional link: http://groups.google.com/group/turbogears-ru/browse_thread/thread/355655bd1607a988/a7e80647563ec92b#a7e80647563ec92b ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1505829&group_id=74338 |
|
From: <sub...@co...> - 2006-06-13 21:27:18
|
Author: ianb
Date: 2006-06-13 15:27:16 -0600 (Tue, 13 Jun 2006)
New Revision: 1806
Modified:
SQLObject/trunk/sqlobject/dbconnection.py
Log:
merged r1804:1805 to trunk
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2006-06-13 21:25:24 UTC (rev 1805)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2006-06-13 21:27:16 UTC (rev 1806)
@@ -56,14 +56,15 @@
auth = getattr(self, 'user', None) or ''
if auth:
if self.password:
- auth = auth + '@' + self.password
- auth = auth + ':'
+ auth = auth + ':' + self.password
+ auth = auth + '@'
else:
assert not getattr(self, 'password', None), (
'URIs cannot express passwords without usernames')
uri = '%s://%s' % (self.dbName, auth)
if self.host:
- uri += self.host + '/'
+ uri += self.host
+ uri += '/'
db = self.db
if db.startswith('/'):
db = path[1:]
|
|
From: <sub...@co...> - 2006-06-13 21:25:38
|
Author: ianb
Date: 2006-06-13 15:25:24 -0600 (Tue, 13 Jun 2006)
New Revision: 1805
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
Log:
Fix the .uri() method on dbconnections
Modified: SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-06-13 19:45:55 UTC (rev 1804)
+++ SQLObject/branches/0.7-bugfix/sqlobject/dbconnection.py 2006-06-13 21:25:24 UTC (rev 1805)
@@ -56,14 +56,15 @@
auth = getattr(self, 'user', None) or ''
if auth:
if self.password:
- auth = auth + '@' + self.password
- auth = auth + ':'
+ auth = auth + ':' + self.password
+ auth = auth + '@'
else:
assert not getattr(self, 'password', None), (
'URIs cannot express passwords without usernames')
uri = '%s://%s' % (self.dbName, auth)
if self.host:
- uri += self.host + '/'
+ uri += self.host
+ uri += '/'
db = self.db
if db.startswith('/'):
db = path[1:]
|
|
From: SourceForge.net <no...@so...> - 2006-06-12 14:35:23
|
Bugs item #1496321, was opened at 2006-05-28 11:44 Message generated for change (Comment added) made by markus_gritsch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1496321&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Markus Gritsch (markus_gritsch) Assigned to: Oleg Broytmann (phd) Summary: Regression in DateTimeValidator Initial Comment: The following change in the class DateTimeValidator leads to different return values: SQLObject-0.7.0: secs = time.mktime(stime) return datetime.datetime.fromtimestamp(secs) SQLObject-0.7.1b1: return datetime.datetime(*stime[:7]) I think only the first 6 items of stime should be used instead of also including the microseconds. When I change the line to return datetime.datetime(*stime[:6]) everything works fine again. ---------------------------------------------------------------------- >Comment By: Markus Gritsch (markus_gritsch) Date: 2006-06-12 16:35 Message: Logged In: YES user_id=553904 Since the 7th item of stime is the day-of-the-week, the script below prints out 2006-06-11 00:00:00.000006 wrongly taking the 6th day-of-the-week as the microseconds. --- import datetime from sqlobject import * sqlhub.processConnection = connectionForURI('sqlite:/:memory:') class Test(SQLObject): time = DateTimeCol() Test.createTable() t = Test(time=datetime.datetime(2006, 6, 11)) print Test.selectBy(id=1)[0].time ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-06-07 14:53 Message: Logged In: YES user_id=4799 Can you write a short test script that demonstrates the problem? ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-06-07 14:49 Message: Logged In: YES user_id=4799 Can you write a short test script that demonstrates the problem? ---------------------------------------------------------------------- Comment By: Markus Gritsch (markus_gritsch) Date: 2006-06-04 18:56 Message: Logged In: YES user_id=553904 Additional note: The 7th value is not the micro-seconds, but the day-of-the-week. So the line should be definitely changed to the one I suggested. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1496321&group_id=74338 |
|
From: green t. <gre...@ti...> - 2006-06-07 18:29:47
|
<html>
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-=
1">
<title>Greentable: Where Millionaires Really are Made</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:204;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:595.3pt 841.9pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:35.4p=
t'>
<div class=3DSection1>
<p class=3DMsoNormal><span lang=3DEN-US
style=3D'font-size:14.0pt;font-family:Tahoma;
color:#339966;mso-ansi-language:EN-US'>Greentable: <u>Where Millionaires
<span
class=3DGramE>Really</span> are Made</u>!</span><span lang=3DEN-US
style=3D'font-size:11.0pt;font-family:Tahoma;mso-ansi-language:EN-US'><br=
>
<br>
Greentable offers over 85 cutting edge games including<span
class=3DGramE>:Video</span>
Poker, Blackjack,Roulette, Craps, Slots, Live Dealers and Arcade Games!<b=
r>
<br>
Enjoy live tournaments and competitions while playing against your friend=
s
and
chatting with the live dealers.<br>
<br>
Relax knowing you will experience Fast Withdrawals and a Guaranteed Payou=
t
Ratio of at least 97.5%!<br>
<br>
Spin your way to Millions on the Progressive Slot Machines – Over
$700,000 in jackpot money has been won already in May.<span
style=3D'mso-spacerun:yes'>=A0 </span>You can also enjoy Progressive Jack=
pots
in
both Blackjack and Video Poker!<br>
<br>
On January 13th, one lucky player won $1.7 MILLION with one spin!<br>
<br>
<b style=3D'mso-bidi-font-weight:normal'>Join today and enjoy a $300 WELC=
OME
BONUS!</b><br>
<br>
</span><span style=3D'font-size:11.0pt;font-family:Tahoma'><a
href=3D"http://greentable-casino.info/"><span lang=3DEN-US
style=3D'mso-ansi-language:
EN-US'>http://greentable-casino.info</span></a></span><span lang=3DEN-US
style=3D'font-size:11.0pt;font-family:Tahoma;mso-ansi-language:EN-US'><br=
>
Play Now On Greentable!<o:p></o:p></span></p>
</div>
</body>
</html>
|
|
From: <sub...@co...> - 2006-06-07 16:05:08
|
Author: phd
Date: 2006-06-07 10:04:57 -0600 (Wed, 07 Jun 2006)
New Revision: 1802
Modified:
home/phd/SQLObject/paramstyles/sqlobject/main.py
home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
Log:
Merged patches from the revisions 1797:1801 from the trunk: patches by Ivan Horvath <i.h...@al...>
Modified: home/phd/SQLObject/paramstyles/sqlobject/main.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/main.py 2006-06-07 16:03:36 UTC (rev 1801)
+++ home/phd/SQLObject/paramstyles/sqlobject/main.py 2006-06-07 16:04:57 UTC (rev 1802)
@@ -432,6 +432,8 @@
conn = connection or soClass._connection
for columnDef in conn.columnsFromSchema(sqlmeta.table, soClass):
if columnDef.name not in sqlmeta.columnDefinitions:
+ if isinstance(columnDef.name, unicode):
+ columnDef.name = columnDef.name.encode('ascii')
sqlmeta.addColumn(columnDef)
addColumnsFromDatabase = classmethod(addColumnsFromDatabase)
@@ -1233,6 +1235,7 @@
raise TypeError, "%s() did not get expected keyword argument %s" % (self.__class__.__name__, column.name)
# Otherwise we put it in as though they did pass
# that keyword:
+
kw[column.name] = default
self.set(**kw)
Modified: home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-06-07 16:03:36 UTC (rev 1801)
+++ home/phd/SQLObject/paramstyles/sqlobject/mysql/mysqlconnection.py 2006-06-07 16:04:57 UTC (rev 1802)
@@ -147,7 +147,10 @@
colClass, kw = self.guessClass(t)
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
- kw['default'] = default
+ if default and t.startswith('int'):
+ kw['default'] = int(default)
+ else:
+ kw['default'] = default
# @@ skip key...
# @@ skip extra...
results.append(colClass(**kw))
|
|
From: <sub...@co...> - 2006-06-07 16:03:49
|
Author: phd
Date: 2006-06-07 10:03:36 -0600 (Wed, 07 Jun 2006)
New Revision: 1801
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/main.py
SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
Log:
Merged two patches by Ivan Horvath <i.h...@al...> from the trunk:
convert default to int, convert unicode column names to ascii.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/main.py 2006-06-07 16:02:47 UTC (rev 1800)
+++ SQLObject/branches/0.7-bugfix/sqlobject/main.py 2006-06-07 16:03:36 UTC (rev 1801)
@@ -420,6 +420,8 @@
conn = connection or soClass._connection
for columnDef in conn.columnsFromSchema(sqlmeta.table, soClass):
if columnDef.name not in sqlmeta.columnDefinitions:
+ if isinstance(columnDef.name, unicode):
+ columnDef.name = columnDef.name.encode('ascii')
sqlmeta.addColumn(columnDef)
addColumnsFromDatabase = classmethod(addColumnsFromDatabase)
Modified: SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-06-07 16:02:47 UTC (rev 1800)
+++ SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-06-07 16:03:36 UTC (rev 1801)
@@ -136,7 +136,10 @@
colClass, kw = self.guessClass(t)
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
- kw['default'] = default
+ if default and t.startswith('int'):
+ kw['default'] = int(default)
+ else:
+ kw['default'] = default
# @@ skip key...
# @@ skip extra...
results.append(colClass(**kw))
|
|
From: <sub...@co...> - 2006-06-07 16:02:56
|
Author: phd
Date: 2006-06-07 10:02:47 -0600 (Wed, 07 Jun 2006)
New Revision: 1800
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/mssql/mssqlconnection.py
Log:
Removed trailing spaces.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/mssql/mssqlconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/mssql/mssqlconnection.py 2006-06-07 16:01:59 UTC (rev 1799)
+++ SQLObject/branches/0.7-bugfix/sqlobject/mssql/mssqlconnection.py 2006-06-07 16:02:47 UTC (rev 1800)
@@ -28,7 +28,7 @@
conn_str += "Data Source=%s;Initial Catalog=%s;"
- # MSDE does not allow SQL server login
+ # MSDE does not allow SQL server login
if kw.get("sspi"):
conn_str += "Integrated Security=SSPI;Persist Security Info=False"
self.make_conn_str = lambda keys: [conn_str % (keys.host, keys.db)]
@@ -176,7 +176,7 @@
(tableName,
column.dbName))
- # precision and scale is gotten from column table so that we can create
+ # precision and scale is gotten from column table so that we can create
# decimal columns if needed
SHOW_COLUMNS = """
select
|
|
From: <sub...@co...> - 2006-06-07 16:02:10
|
Author: phd
Date: 2006-06-07 10:01:59 -0600 (Wed, 07 Jun 2006)
New Revision: 1799
Modified:
SQLObject/trunk/sqlobject/main.py
Log:
A patch by Ivan Horvath <i.h...@al...>: convert unicode column names to ascii.
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2006-06-07 16:01:26 UTC (rev 1798)
+++ SQLObject/trunk/sqlobject/main.py 2006-06-07 16:01:59 UTC (rev 1799)
@@ -432,6 +432,8 @@
conn = connection or soClass._connection
for columnDef in conn.columnsFromSchema(sqlmeta.table, soClass):
if columnDef.name not in sqlmeta.columnDefinitions:
+ if isinstance(columnDef.name, unicode):
+ columnDef.name = columnDef.name.encode('ascii')
sqlmeta.addColumn(columnDef)
addColumnsFromDatabase = classmethod(addColumnsFromDatabase)
@@ -1233,6 +1235,7 @@
raise TypeError, "%s() did not get expected keyword argument %s" % (self.__class__.__name__, column.name)
# Otherwise we put it in as though they did pass
# that keyword:
+
kw[column.name] = default
self.set(**kw)
|
|
From: <sub...@co...> - 2006-06-07 16:01:41
|
Author: phd
Date: 2006-06-07 10:01:26 -0600 (Wed, 07 Jun 2006)
New Revision: 1798
Modified:
SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
Log:
A patch by Ivan Horvath <i.h...@al...>: convert default value to int.
Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-06-03 15:51:26 UTC (rev 1797)
+++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-06-07 16:01:26 UTC (rev 1798)
@@ -147,7 +147,10 @@
colClass, kw = self.guessClass(t)
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
- kw['default'] = default
+ if default and t.startswith('int'):
+ kw['default'] = int(default)
+ else:
+ kw['default'] = default
# @@ skip key...
# @@ skip extra...
results.append(colClass(**kw))
|
|
From: SourceForge.net <no...@so...> - 2006-06-07 13:12:50
|
Patches item #1496016, was opened at 2006-05-27 16:49 Message generated for change (Comment added) made by nitwit You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1496016&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: Neil Muller (nitwit) Assigned to: Nobody/Anonymous (nobody) Summary: Encode queries to unicode for MySQLdb 1.2.1 Initial Comment: MySQLdb 1.2.1 assumes that queries will be unicode objects rather than string objects. The attached patch aims to do the right thing. The assumption about alwasy encoding using the charset specified in the mysql URI is somewhat questionable, and it may be better to try and infer self.encoding from the locale instead. ---------------------------------------------------------------------- >Comment By: Neil Muller (nitwit) Date: 2006-06-07 15:11 Message: Logged In: YES user_id=698097 In my test cases, mysqldb required that the queries be unicode regardless of what use_unicode was set to, but I haven't looked into this closely. I'll review the logic of that carefully when I fix the other errors in the patch. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2006-06-07 14:37 Message: Logged In: YES user_id=4799 Your patch starts with "if MySQLdb.version_info[0]>0...". You probably want "if MySQLdb.version_info[0]>1..."? Your patch adds "use_unicode"... which is already there. ;) BTW, in case of MySQLbd 1.2.1+ where self.need_unicode=True you probbaly wants to always set use_unicode to 1, no? What if the user sets use_unicode=False? Would MySQLdb revert to ascii queries and responces? Infering self.encoding from the environment is the application's task, I think. Let's the user decide what encoding (s)he wants. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1496016&group_id=74338 |