sqlobject-cvs Mailing List for SQLObject (Page 48)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sub...@co...> - 2010-04-09 18:10:14
|
Author: phd Date: 2010-04-09 12:10:07 -0600 (Fri, 09 Apr 2010) New Revision: 4158 Modified: SQLObject/branches/0.12/sqlobject/col.py Log: Merged revision 4157 from branch 0.11. Modified: SQLObject/branches/0.12/sqlobject/col.py =================================================================== --- SQLObject/branches/0.12/sqlobject/col.py 2010-04-09 18:07:24 UTC (rev 4157) +++ SQLObject/branches/0.12/sqlobject/col.py 2010-04-09 18:10:07 UTC (rev 4158) @@ -546,7 +546,7 @@ if isinstance(value, unicode): return value if isinstance(value, array): # MySQL - return unicode(value.tostring(), self.db_encoding) + value = value.tostring() return unicode(value, self.db_encoding) def from_python(self, value, state): |
From: <sub...@co...> - 2010-04-09 18:07:32
|
Author: phd Date: 2010-04-09 12:07:24 -0600 (Fri, 09 Apr 2010) New Revision: 4157 Modified: SQLObject/branches/0.11/sqlobject/col.py Log: Just get the value - it will be converted to unicode anyway. Modified: SQLObject/branches/0.11/sqlobject/col.py =================================================================== --- SQLObject/branches/0.11/sqlobject/col.py 2010-03-22 17:38:29 UTC (rev 4156) +++ SQLObject/branches/0.11/sqlobject/col.py 2010-04-09 18:07:24 UTC (rev 4157) @@ -545,7 +545,7 @@ if isinstance(value, unicode): return value if isinstance(value, array): # MySQL - return unicode(value.tostring(), self.db_encoding) + value = value.tostring() return unicode(value, self.db_encoding) def from_python(self, value, state): |
From: <sub...@co...> - 2010-03-22 17:38:35
|
Author: phd Date: 2010-03-22 11:38:29 -0600 (Mon, 22 Mar 2010) New Revision: 4156 Modified: SQLObject/trunk/sqlobject/col.py Log: The internal representation for UnicodeCol is str for now, not unicode. Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2010-03-22 17:36:22 UTC (rev 4155) +++ SQLObject/trunk/sqlobject/col.py 2010-03-22 17:38:29 UTC (rev 4156) @@ -563,10 +563,10 @@ def from_python(self, value, state): if value is None: return None - if isinstance(value, (unicode, sqlbuilder.SQLExpression)): + if isinstance(value, (str, sqlbuilder.SQLExpression)): return value - if isinstance(value, str): - return unicode(value, self.dbEncoding) + if isinstance(value, unicode): + return value.encode(self.dbEncoding) raise validators.Invalid("expected a str or a unicode in the UnicodeCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) |
From: <sub...@co...> - 2010-03-22 17:36:28
|
Author: phd Date: 2010-03-22 11:36:22 -0600 (Mon, 22 Mar 2010) New Revision: 4155 Modified: SQLObject/trunk/sqlobject/dbconnection.py Log: Remove u'...' from the repr. Modified: SQLObject/trunk/sqlobject/dbconnection.py =================================================================== --- SQLObject/trunk/sqlobject/dbconnection.py 2010-03-22 17:28:11 UTC (rev 4154) +++ SQLObject/trunk/sqlobject/dbconnection.py 2010-03-22 17:36:22 UTC (rev 4155) @@ -38,7 +38,7 @@ try: text = text.encode(self.dbEncoding) except UnicodeEncodeError: - text = repr(text)[1:-1] + text = repr(text)[2:-1] # Remove u'...' from the repr logfile.write(text + '\n') class LogWriter: |
From: <sub...@co...> - 2010-03-22 17:28:17
|
Author: phd Date: 2010-03-22 11:28:11 -0600 (Mon, 22 Mar 2010) New Revision: 4154 Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py Log: Restored the unicode string. Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:18:36 UTC (rev 4153) +++ SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:28:11 UTC (rev 4154) @@ -10,7 +10,7 @@ col1 = UnicodeCol(alternateID=True, length=100) col2 = UnicodeCol(dbEncoding='latin1') -data = ['\xf0'.decode('latin1'), u'test', 'ascii test'] +data = [u'\u00f0', u'test', 'ascii test'] items = [] def setup(): |
From: <sub...@co...> - 2010-03-22 17:18:42
|
Author: phd Date: 2010-03-22 11:18:36 -0600 (Mon, 22 Mar 2010) New Revision: 4153 Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py Log: Merged revision 4151 from branch 011: removed debugging prints. Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:18:17 UTC (rev 4152) +++ SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:18:36 UTC (rev 4153) @@ -25,8 +25,6 @@ def test_create(): setup() for s, item in zip(data, items): - print type(item.col1), repr(item.col1) - print type(item.col2), repr(item.col1) assert item.col1 == s assert item.col2 == s |
From: <sub...@co...> - 2010-03-22 17:18:23
|
Author: phd Date: 2010-03-22 11:18:17 -0600 (Mon, 22 Mar 2010) New Revision: 4152 Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py Log: Merged revision 4151 from branch 011: removed debugging prints. Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:16:28 UTC (rev 4151) +++ SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:18:17 UTC (rev 4152) @@ -25,8 +25,6 @@ def test_create(): setup() for s, item in zip(data, items): - print type(item.col1), repr(item.col1) - print type(item.col2), repr(item.col1) assert item.col1 == s assert item.col2 == s |
From: <sub...@co...> - 2010-03-22 17:16:34
|
Author: phd Date: 2010-03-22 11:16:28 -0600 (Mon, 22 Mar 2010) New Revision: 4151 Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py Log: Removed debugging prints. Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 17:14:23 UTC (rev 4150) +++ SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 17:16:28 UTC (rev 4151) @@ -25,8 +25,6 @@ def test_create(): setup() for s, item in zip(data, items): - print type(item.col1), repr(item.col1) - print type(item.col2), repr(item.col1) assert item.col1 == s assert item.col2 == s |
From: <sub...@co...> - 2010-03-22 17:14:29
|
Author: phd Date: 2010-03-22 11:14:23 -0600 (Mon, 22 Mar 2010) New Revision: 4150 Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py Log: Merged revision 4148 from branch 011: compare directly to s. Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:13:39 UTC (rev 4149) +++ SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:14:23 UTC (rev 4150) @@ -8,9 +8,9 @@ class TestUnicode(SQLObject): count = IntCol(alternateID=True) col1 = UnicodeCol(alternateID=True, length=100) - col2 = UnicodeCol(dbEncoding='latin-1') + col2 = UnicodeCol(dbEncoding='latin1') -data = [u'\u00f0', u'test', 'ascii test'] +data = ['\xf0'.decode('latin1'), u'test', 'ascii test'] items = [] def setup(): @@ -25,8 +25,10 @@ def test_create(): setup() for s, item in zip(data, items): + print type(item.col1), repr(item.col1) + print type(item.col2), repr(item.col1) assert item.col1 == s - assert item.col1 == item.col2 + assert item.col2 == s conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 17:13:46
|
Author: phd Date: 2010-03-22 11:13:39 -0600 (Mon, 22 Mar 2010) New Revision: 4149 Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py Log: Merged revision 4148 from branch 011: compare directly to s. Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:12:23 UTC (rev 4148) +++ SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:13:39 UTC (rev 4149) @@ -8,7 +8,7 @@ class TestUnicode(SQLObject): count = IntCol(alternateID=True) col1 = UnicodeCol(alternateID=True, length=100) - col2 = UnicodeCol(dbEncoding='latin-1') + col2 = UnicodeCol(dbEncoding='latin1') data = [u'\u00f0', u'test', 'ascii test'] items = [] @@ -25,8 +25,10 @@ def test_create(): setup() for s, item in zip(data, items): + print type(item.col1), repr(item.col1) + print type(item.col2), repr(item.col1) assert item.col1 == s - assert item.col1 == item.col2 + assert item.col2 == s conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 17:12:29
|
Author: phd Date: 2010-03-22 11:12:23 -0600 (Mon, 22 Mar 2010) New Revision: 4148 Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py Log: Compare directly to s. Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 17:03:04 UTC (rev 4147) +++ SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 17:12:23 UTC (rev 4148) @@ -8,7 +8,7 @@ class TestUnicode(SQLObject): count = IntCol(alternateID=True) col1 = UnicodeCol(alternateID=True, length=100) - col2 = UnicodeCol(dbEncoding='latin-1') + col2 = UnicodeCol(dbEncoding='latin1') data = [u'\u00f0', u'test', 'ascii test'] items = [] @@ -25,8 +25,10 @@ def test_create(): setup() for s, item in zip(data, items): + print type(item.col1), repr(item.col1) + print type(item.col2), repr(item.col1) assert item.col1 == s - assert item.col1 == item.col2 + assert item.col2 == s conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 17:03:10
|
Author: phd Date: 2010-03-22 11:03:04 -0600 (Mon, 22 Mar 2010) New Revision: 4147 Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py Log: Merged revision 4145 from branch 0.11: renamed 'n' (which usually denotes an integer) to 's', i.e. 'string'. Modified: SQLObject/trunk/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:02:39 UTC (rev 4146) +++ SQLObject/trunk/sqlobject/tests/test_unicode.py 2010-03-22 17:03:04 UTC (rev 4147) @@ -19,14 +19,14 @@ setupClass(TestUnicode) if TestUnicode._connection.dbName == 'postgres': TestUnicode._connection.query('SET client_encoding TO latin1') - for i, n in enumerate(data): - items.append(TestUnicode(count=i, col1=n, col2=n)) + for i, s in enumerate(data): + items.append(TestUnicode(count=i, col1=s, col2=s)) def test_create(): setup() - for n, item in zip(data, items): + for s, item in zip(data, items): + assert item.col1 == s assert item.col1 == item.col2 - assert item.col1 == n conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 17:02:46
|
Author: phd Date: 2010-03-22 11:02:39 -0600 (Mon, 22 Mar 2010) New Revision: 4146 Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py Log: Merged revision 4145 from branch 0.11: renamed 'n' (which usually denotes an integer) to 's', i.e. 'string'. Modified: SQLObject/branches/0.12/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:01:17 UTC (rev 4145) +++ SQLObject/branches/0.12/sqlobject/tests/test_unicode.py 2010-03-22 17:02:39 UTC (rev 4146) @@ -19,14 +19,14 @@ setupClass(TestUnicode) if TestUnicode._connection.dbName == 'postgres': TestUnicode._connection.query('SET client_encoding TO latin1') - for i, n in enumerate(data): - items.append(TestUnicode(count=i, col1=n, col2=n)) + for i, s in enumerate(data): + items.append(TestUnicode(count=i, col1=s, col2=s)) def test_create(): setup() - for n, item in zip(data, items): + for s, item in zip(data, items): + assert item.col1 == s assert item.col1 == item.col2 - assert item.col1 == n conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 17:01:24
|
Author: phd Date: 2010-03-22 11:01:17 -0600 (Mon, 22 Mar 2010) New Revision: 4145 Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py Log: Renamed 'n' (which usually denotes an integer) to 's', i.e. 'string'. Modified: SQLObject/branches/0.11/sqlobject/tests/test_unicode.py =================================================================== --- SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 16:16:34 UTC (rev 4144) +++ SQLObject/branches/0.11/sqlobject/tests/test_unicode.py 2010-03-22 17:01:17 UTC (rev 4145) @@ -19,14 +19,14 @@ setupClass(TestUnicode) if TestUnicode._connection.dbName == 'postgres': TestUnicode._connection.query('SET client_encoding TO latin1') - for i, n in enumerate(data): - items.append(TestUnicode(count=i, col1=n, col2=n)) + for i, s in enumerate(data): + items.append(TestUnicode(count=i, col1=s, col2=s)) def test_create(): setup() - for n, item in zip(data, items): + for s, item in zip(data, items): + assert item.col1 == s assert item.col1 == item.col2 - assert item.col1 == n conn = TestUnicode._connection rows = conn.queryAll(""" |
From: <sub...@co...> - 2010-03-22 16:16:40
|
Author: phd Date: 2010-03-22 10:16:34 -0600 (Mon, 22 Mar 2010) New Revision: 4144 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/col.py Log: Renamed db_encoding to dbEncoding in UnicodeStringValidator. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2010-03-22 16:14:25 UTC (rev 4143) +++ SQLObject/trunk/docs/News.txt 2010-03-22 16:16:34 UTC (rev 4144) @@ -35,6 +35,8 @@ * Better handling of circular dependencies in sqlobject-admin - do not include the class in the list of other classes. +* Renamed db_encoding to dbEncoding in UnicodeStringValidator. + SQLObject 0.12.2 ================ Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2010-03-22 16:14:25 UTC (rev 4143) +++ SQLObject/trunk/sqlobject/col.py 2010-03-22 16:16:34 UTC (rev 4144) @@ -554,9 +554,9 @@ if isinstance(value, (unicode, sqlbuilder.SQLExpression)): return value if isinstance(value, str): - return unicode(value, self.db_encoding) + return unicode(value, self.dbEncoding) if isinstance(value, array): # MySQL - return unicode(value.tostring(), self.db_encoding) + return unicode(value.tostring(), self.dbEncoding) raise validators.Invalid("expected a str or a unicode in the UnicodeCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) @@ -566,7 +566,7 @@ if isinstance(value, (unicode, sqlbuilder.SQLExpression)): return value if isinstance(value, str): - return unicode(value, self.db_encoding) + return unicode(value, self.dbEncoding) raise validators.Invalid("expected a str or a unicode in the UnicodeCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) @@ -577,7 +577,7 @@ def createValidators(self): return [UnicodeStringValidator(name=self.name, - db_encoding=self.dbEncoding)] + \ + dbEncoding=self.dbEncoding)] + \ super(SOUnicodeCol, self).createValidators() class UnicodeCol(Col): |
From: <sub...@co...> - 2010-03-22 16:14:33
|
Author: phd Date: 2010-03-22 10:14:25 -0600 (Mon, 22 Mar 2010) New Revision: 4143 Modified: SQLObject/trunk/sqlobject/col.py Log: UnicodeColumns convert str to unicode. Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2010-03-22 15:56:43 UTC (rev 4142) +++ SQLObject/trunk/sqlobject/col.py 2010-03-22 16:14:25 UTC (rev 4143) @@ -563,10 +563,10 @@ def from_python(self, value, state): if value is None: return None - if isinstance(value, (str, sqlbuilder.SQLExpression)): + if isinstance(value, (unicode, sqlbuilder.SQLExpression)): return value - if isinstance(value, unicode): - return value.encode(self.db_encoding) + if isinstance(value, str): + return unicode(value, self.db_encoding) raise validators.Invalid("expected a str or a unicode in the UnicodeCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) |
From: <sub...@co...> - 2010-03-22 15:56:50
|
Author: phd Date: 2010-03-22 09:56:43 -0600 (Mon, 22 Mar 2010) New Revision: 4142 Modified: SQLObject/trunk/sqlobject/dbconnection.py Log: Merged a bugfix from revision 4140 from branch 0.11 - only remove quotes. Modified: SQLObject/trunk/sqlobject/dbconnection.py =================================================================== --- SQLObject/trunk/sqlobject/dbconnection.py 2010-03-22 15:56:03 UTC (rev 4141) +++ SQLObject/trunk/sqlobject/dbconnection.py 2010-03-22 15:56:43 UTC (rev 4142) @@ -38,7 +38,7 @@ try: text = text.encode(self.dbEncoding) except UnicodeEncodeError: - text = repr(text)[2:-1] + text = repr(text)[1:-1] logfile.write(text + '\n') class LogWriter: |
From: <sub...@co...> - 2010-03-22 15:56:10
|
Author: phd Date: 2010-03-22 09:56:03 -0600 (Mon, 22 Mar 2010) New Revision: 4141 Modified: SQLObject/branches/0.12/sqlobject/dbconnection.py Log: Merged a bugfix from revision 4140 from branch 0.11 - only remove quotes. Modified: SQLObject/branches/0.12/sqlobject/dbconnection.py =================================================================== --- SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-03-22 15:54:33 UTC (rev 4140) +++ SQLObject/branches/0.12/sqlobject/dbconnection.py 2010-03-22 15:56:03 UTC (rev 4141) @@ -38,7 +38,7 @@ try: text = text.encode(self.dbEncoding) except UnicodeEncodeError: - text = repr(text)[2:-1] + text = repr(text)[1:-1] logfile.write(text + '\n') class LogWriter: |
From: <sub...@co...> - 2010-03-22 15:54:40
|
Author: phd Date: 2010-03-22 09:54:33 -0600 (Mon, 22 Mar 2010) New Revision: 4140 Modified: SQLObject/branches/0.11/sqlobject/dbconnection.py Log: Fixed a bug - only remove quotes. Modified: SQLObject/branches/0.11/sqlobject/dbconnection.py =================================================================== --- SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-03-22 15:52:28 UTC (rev 4139) +++ SQLObject/branches/0.11/sqlobject/dbconnection.py 2010-03-22 15:54:33 UTC (rev 4140) @@ -38,7 +38,7 @@ try: text = text.encode(self.dbEncoding) except UnicodeEncodeError: - text = repr(text)[2:-1] + text = repr(text)[1:-1] logfile.write(text + '\n') class LogWriter: |
From: <sub...@co...> - 2010-03-22 15:52:35
|
Author: phd Date: 2010-03-22 09:52:28 -0600 (Mon, 22 Mar 2010) New Revision: 4139 Modified: SQLObject/trunk/docs/community.txt Log: Merged revisions 4136, 4137 from branch 0.11: removed the link to archive at pythonpaste.org - it doesn't work and is full of spam; removed the link to http://sqlobject.gcu.info/trac - it's dead for quite a lot of time. Modified: SQLObject/trunk/docs/community.txt =================================================================== --- SQLObject/trunk/docs/community.txt 2010-03-22 15:51:53 UTC (rev 4138) +++ SQLObject/trunk/docs/community.txt 2010-03-22 15:52:28 UTC (rev 4139) @@ -4,8 +4,6 @@ SQLObject questions and discussion happens on the `sqlobject-discuss mailing list <http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_. -You may want to view the `searchable archives -<http://pythonpaste.org/archives/list/sqlobject-discuss.en.html>`_. `Gmane <http://www.gmane.org/>`_ also has the list in gmane.comp.python.sqlobject accessible by `HTTP <http://news.gmane.org/gmane.comp.python.sqlobject>`_, @@ -27,8 +25,6 @@ The `Author List <docs/Authors.html>`_ tries to list all the major contributors. -Wiki and another tracker are also at http://sqlobject.gcu.info/trac. - .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder |
From: <sub...@co...> - 2010-03-22 15:51:59
|
Author: phd Date: 2010-03-22 09:51:53 -0600 (Mon, 22 Mar 2010) New Revision: 4138 Modified: SQLObject/branches/0.12/docs/community.txt Log: Merged revisions 4136, 4137 from branch 0.11: removed the link to archive at pythonpaste.org - it doesn't work and is full of spam; removed the link to http://sqlobject.gcu.info/trac - it's dead for quite a lot of time. Modified: SQLObject/branches/0.12/docs/community.txt =================================================================== --- SQLObject/branches/0.12/docs/community.txt 2010-03-22 15:48:57 UTC (rev 4137) +++ SQLObject/branches/0.12/docs/community.txt 2010-03-22 15:51:53 UTC (rev 4138) @@ -4,8 +4,6 @@ SQLObject questions and discussion happens on the `sqlobject-discuss mailing list <http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_. -You may want to view the `searchable archives -<http://pythonpaste.org/archives/list/sqlobject-discuss.en.html>`_. `Gmane <http://www.gmane.org/>`_ also has the list in gmane.comp.python.sqlobject accessible by `HTTP <http://news.gmane.org/gmane.comp.python.sqlobject>`_, @@ -27,8 +25,6 @@ The `Author List <docs/Authors.html>`_ tries to list all the major contributors. -Wiki and another tracker are also at http://sqlobject.gcu.info/trac. - .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder |
From: <sub...@co...> - 2010-03-22 15:49:04
|
Author: phd Date: 2010-03-22 09:48:57 -0600 (Mon, 22 Mar 2010) New Revision: 4137 Modified: SQLObject/branches/0.11/docs/community.txt Log: Removed the link to http://sqlobject.gcu.info/trac - it's dead for quite a lot of time. Modified: SQLObject/branches/0.11/docs/community.txt =================================================================== --- SQLObject/branches/0.11/docs/community.txt 2010-03-22 15:46:50 UTC (rev 4136) +++ SQLObject/branches/0.11/docs/community.txt 2010-03-22 15:48:57 UTC (rev 4137) @@ -25,8 +25,6 @@ The `Author List <docs/Authors.html>`_ tries to list all the major contributors. -Wiki and another tracker are also at http://sqlobject.gcu.info/trac. - .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder |
From: <sub...@co...> - 2010-03-22 15:46:58
|
Author: phd Date: 2010-03-22 09:46:50 -0600 (Mon, 22 Mar 2010) New Revision: 4136 Modified: SQLObject/branches/0.11/docs/community.txt Log: Removed the link to archive at pythonpaste.org - it doesn't work and is full of spam. Modified: SQLObject/branches/0.11/docs/community.txt =================================================================== --- SQLObject/branches/0.11/docs/community.txt 2010-03-17 17:56:30 UTC (rev 4135) +++ SQLObject/branches/0.11/docs/community.txt 2010-03-22 15:46:50 UTC (rev 4136) @@ -4,8 +4,6 @@ SQLObject questions and discussion happens on the `sqlobject-discuss mailing list <http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_. -You may want to view the `searchable archives -<http://pythonpaste.org/archives/list/sqlobject-discuss.en.html>`_. `Gmane <http://www.gmane.org/>`_ also has the list in gmane.comp.python.sqlobject accessible by `HTTP <http://news.gmane.org/gmane.comp.python.sqlobject>`_, |
From: <sub...@co...> - 2010-03-17 17:56:36
|
Author: phd Date: 2010-03-17 11:56:30 -0600 (Wed, 17 Mar 2010) New Revision: 4135 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/manager/command.py Log: Better handling of circular dependencies in sqlobject-admin - do not include the class in the list of other classes. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2010-03-17 17:50:26 UTC (rev 4134) +++ SQLObject/trunk/docs/News.txt 2010-03-17 17:56:30 UTC (rev 4135) @@ -32,6 +32,9 @@ * Validators became stricter: StringCol and UnicodeCol now accept only str or unicode, BoolCol accepts only bool or int, and so on. +* Better handling of circular dependencies in sqlobject-admin - + do not include the class in the list of other classes. + SQLObject 0.12.2 ================ Modified: SQLObject/trunk/sqlobject/manager/command.py =================================================================== --- SQLObject/trunk/sqlobject/manager/command.py 2010-03-17 17:50:26 UTC (rev 4134) +++ SQLObject/trunk/sqlobject/manager/command.py 2010-03-17 17:56:30 UTC (rev 4135) @@ -208,7 +208,7 @@ if col.foreignKey: other = findClass(col.foreignKey, col.soClass.sqlmeta.registry) - if other not in depended: + if (other is not cls) and (other not in depended): depended.append(other) return depended |
From: <sub...@co...> - 2010-03-17 17:50:32
|
Author: phd Date: 2010-03-17 11:50:26 -0600 (Wed, 17 Mar 2010) New Revision: 4134 Modified: SQLObject/trunk/sqlobject/col.py Log: Always check Binary type; removed stupidity with testBinaryType. Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2010-03-17 17:29:41 UTC (rev 4133) +++ SQLObject/trunk/sqlobject/col.py 2010-03-17 17:50:26 UTC (rev 4134) @@ -507,48 +507,33 @@ return self._sqlType() -# Special marker to test the dataType is a backend-specific Binary -testDataTypeBinary = object() - class StringValidator(validators.Validator): def to_python(self, value, state): if value is None: return None + connection = state.soObject._connection if isinstance(value, unicode): - connection = state.soObject._connection dbEncoding = getattr(connection, "dbEncoding", None) or "ascii" return value.encode(dbEncoding) - if isinstance(value, (str, buffer, sqlbuilder.SQLExpression)): + if self.dataType and isinstance(value, self.dataType): return value - if self.dataType: - if self.dataType is testDataTypeBinary: - connection = state.soObject._connection - dataType = connection._binaryType - else: - dataType = self.dataType - if isinstance(value, dataType): - return value + if isinstance(value, (str, buffer, connection._binaryType, sqlbuilder.SQLExpression)): + return value raise validators.Invalid("expected a str in the StringCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) def from_python(self, value, state): if value is None: return None - if isinstance(value, (str, buffer, sqlbuilder.SQLExpression)): - return value - if self.dataType: - if self.dataType is testDataTypeBinary: - connection = state.soObject._connection - dataType = connection._binaryType - else: - dataType = self.dataType - if isinstance(value, dataType): - return value if isinstance(value, unicode): connection = state.soObject._connection dbEncoding = getattr(connection, "dbEncoding", None) or "ascii" return value.encode(dbEncoding) + if self.dataType and isinstance(value, self.dataType): + return value + if isinstance(value, (str, buffer, sqlbuilder.SQLExpression)): + return value raise validators.Invalid("expected a str in the StringCol '%s', got %s %r instead" % \ (self.name, type(value), value), value, state) @@ -1484,7 +1469,7 @@ def createValidators(self): return [BinaryValidator(name=self.name)] + \ - super(SOBLOBCol, self).createValidators(dataType=testDataTypeBinary) + super(SOBLOBCol, self).createValidators() def _mysqlType(self): length = self.length |