sqlobject-cvs Mailing List for SQLObject (Page 97)
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...> - 2007-04-09 15:20:05
|
Author: phd Date: 2007-04-09 09:19:59 -0600 (Mon, 09 Apr 2007) New Revision: 2499 Modified: SQLObject/docs/News.txt Log: Fixed test_deep_inheritance.py - setup classes in the correct order (required for Postgres 8.0+ which is strict about referential integrity). Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-04-09 15:19:40 UTC (rev 2498) +++ SQLObject/docs/News.txt 2007-04-09 15:19:59 UTC (rev 2499) @@ -199,6 +199,15 @@ * Fixed aggregators and accumulators with inheritance. +SQLObject 0.7.5 +=============== + +Bug Fixes +--------- + +* Fixed test_deep_inheritance.py - setup classes in the correct order + (required for Postgres 8.0+ which is strict about referential integrity). + SQLObject 0.7.4 =============== |
|
From: <sub...@co...> - 2007-04-09 15:19:43
|
Author: phd
Date: 2007-04-09 09:19:40 -0600 (Mon, 09 Apr 2007)
New Revision: 2498
Modified:
SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py
Log:
Fixed test_deep_inheritance.py - setup classes in the correct order
(required for Postgres 8.0+ which is strict about referential integrity).
Modified: SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py
===================================================================
--- SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:19:17 UTC (rev 2497)
+++ SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:19:40 UTC (rev 2498)
@@ -23,12 +23,10 @@
Try to creae an Manager without specifying a position.
this should fail without leaving any partial records in
the database.
+
"""
+ setupClass([DIManager, DIEmployee, DIPerson])
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
-
kwargs ={'firstName':'John', 'lastname':'Doe'}
raises(TypeError, DIManager, **kwargs)
#what we really need to check for is partial records in the database.
@@ -37,13 +35,8 @@
assert persons.count() == 0
def test_deep_inheritance():
+ setupClass([DIManager, DIEmployee, DIPerson])
- cache = getConnection().cache
-
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
-
manager = DIManager(firstName='Project', lastName='Manager',
position='Project Manager')
manager_id = manager.id
@@ -51,6 +44,8 @@
position='Project leader', manager=manager).id
person_id = DIPerson(firstName='Oneof', lastName='Authors',
manager=manager).id
+
+ cache = getConnection().cache
cache.clear()
managers = list(DIManager.select())
|
|
From: <sub...@co...> - 2007-04-09 15:19:21
|
Author: phd
Date: 2007-04-09 09:19:17 -0600 (Mon, 09 Apr 2007)
New Revision: 2497
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/inheritance/tests/test_deep_inheritance.py
Log:
Fixed test_deep_inheritance.py - setup classes in the correct order
(required for Postgres 8.0+ which is strict about referential integrity).
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-04-09 15:18:52 UTC (rev 2496)
+++ SQLObject/branches/0.8/docs/News.txt 2007-04-09 15:19:17 UTC (rev 2497)
@@ -142,6 +142,15 @@
* Fixed aggregators and accumulators with inheritance.
+SQLObject 0.7.5
+===============
+
+Bug Fixes
+---------
+
+* Fixed test_deep_inheritance.py - setup classes in the correct order
+ (required for Postgres 8.0+ which is strict about referential integrity).
+
SQLObject 0.7.4
===============
Modified: SQLObject/branches/0.8/sqlobject/inheritance/tests/test_deep_inheritance.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:18:52 UTC (rev 2496)
+++ SQLObject/branches/0.8/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:19:17 UTC (rev 2497)
@@ -23,12 +23,10 @@
Try to creae an Manager without specifying a position.
this should fail without leaving any partial records in
the database.
+
"""
+ setupClass([DIManager, DIEmployee, DIPerson])
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
-
kwargs ={'firstName':'John', 'lastname':'Doe'}
raises(TypeError, DIManager, **kwargs)
#what we really need to check for is partial records in the database.
@@ -37,13 +35,8 @@
assert persons.count() == 0
def test_deep_inheritance():
+ setupClass([DIManager, DIEmployee, DIPerson])
- cache = getConnection().cache
-
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
-
manager = DIManager(firstName='Project', lastName='Manager',
position='Project Manager')
manager_id = manager.id
@@ -51,6 +44,8 @@
position='Project leader', manager=manager).id
person_id = DIPerson(firstName='Oneof', lastName='Authors',
manager=manager).id
+
+ cache = getConnection().cache
cache.clear()
managers = list(DIManager.select())
|
|
From: <sub...@co...> - 2007-04-09 15:18:57
|
Author: phd
Date: 2007-04-09 09:18:52 -0600 (Mon, 09 Apr 2007)
New Revision: 2496
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/sqlobject/inheritance/tests/test_deep_inheritance.py
Log:
Fixed test_deep_inheritance.py - setup classes in the correct order
(required for Postgres 8.0+ which is strict about referential integrity).
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-04-09 15:16:40 UTC (rev 2495)
+++ SQLObject/branches/0.7/docs/News.txt 2007-04-09 15:18:52 UTC (rev 2496)
@@ -7,6 +7,15 @@
.. _start:
+SQLObject 0.7.5
+===============
+
+Bug Fixes
+---------
+
+* Fixed test_deep_inheritance.py - setup classes in the correct order
+ (required for Postgres 8.0+ which is strict about referential integrity).
+
SQLObject 0.7.4
===============
Modified: SQLObject/branches/0.7/sqlobject/inheritance/tests/test_deep_inheritance.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:16:40 UTC (rev 2495)
+++ SQLObject/branches/0.7/sqlobject/inheritance/tests/test_deep_inheritance.py 2007-04-09 15:18:52 UTC (rev 2496)
@@ -23,12 +23,10 @@
Try to creae an Manager without specifying a position.
this should fail without leaving any partial records in
the database.
+
"""
+ setupClass([DIManager, DIEmployee, DIPerson])
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
-
kwargs ={'firstName':'John', 'lastname':'Doe'}
raises(TypeError, DIManager, **kwargs)
#what we really need to check for is partial records in the database.
@@ -37,9 +35,7 @@
assert persons.count() == 0
def test_deep_inheritance():
- setupClass(DIManager)
- setupClass(DIEmployee)
- setupClass(DIPerson)
+ setupClass([DIManager, DIEmployee, DIPerson])
manager = DIManager(firstName='Project', lastName='Manager',
position='Project Manager')
|
|
From: <sub...@co...> - 2007-04-09 15:16:43
|
Author: phd
Date: 2007-04-09 09:16:40 -0600 (Mon, 09 Apr 2007)
New Revision: 2495
Modified:
SQLObject/trunk/sqlobject/conftest.py
Log:
Adapted for the latest py.test.
Modified: SQLObject/trunk/sqlobject/conftest.py
===================================================================
--- SQLObject/trunk/sqlobject/conftest.py 2007-04-09 15:16:15 UTC (rev 2494)
+++ SQLObject/trunk/sqlobject/conftest.py 2007-04-09 15:16:40 UTC (rev 2495)
@@ -30,8 +30,8 @@
'mssql': 'mssql://sa:@127.0.0.1/test'
}
-Option = py.test.Config.Option
-option = py.test.Config.addoptions(
+Option = py.test.config.Option
+option = py.test.config.addoptions(
"SQLObject options",
Option('-D', '--Database',
action="store", dest="Database", default='sqlite',
|
|
From: <sub...@co...> - 2007-04-09 15:16:19
|
Author: phd
Date: 2007-04-09 09:16:15 -0600 (Mon, 09 Apr 2007)
New Revision: 2494
Modified:
SQLObject/branches/0.8/sqlobject/conftest.py
Log:
Adapted for the latest py.test.
Modified: SQLObject/branches/0.8/sqlobject/conftest.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/conftest.py 2007-04-09 15:15:52 UTC (rev 2493)
+++ SQLObject/branches/0.8/sqlobject/conftest.py 2007-04-09 15:16:15 UTC (rev 2494)
@@ -30,8 +30,8 @@
'mssql': 'mssql://sa:@127.0.0.1/test'
}
-Option = py.test.Config.Option
-option = py.test.Config.addoptions(
+Option = py.test.config.Option
+option = py.test.config.addoptions(
"SQLObject options",
Option('-D', '--Database',
action="store", dest="Database", default='sqlite',
|
|
From: <sub...@co...> - 2007-04-09 15:15:57
|
Author: phd
Date: 2007-04-09 09:15:52 -0600 (Mon, 09 Apr 2007)
New Revision: 2493
Modified:
SQLObject/branches/0.7/sqlobject/conftest.py
Log:
Adapted for the latest py.test.
Modified: SQLObject/branches/0.7/sqlobject/conftest.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/conftest.py 2007-04-09 14:36:56 UTC (rev 2492)
+++ SQLObject/branches/0.7/sqlobject/conftest.py 2007-04-09 15:15:52 UTC (rev 2493)
@@ -23,8 +23,8 @@
'mssql': 'mssql://sa:@127.0.0.1/test'
}
-Option = py.test.Config.Option
-option = py.test.Config.addoptions(
+Option = py.test.config.Option
+option = py.test.config.addoptions(
"SQLObject options",
Option('-D', '--Database',
action="store", dest="Database", default='sqlite',
|
|
From: <sub...@co...> - 2007-04-09 14:37:01
|
Author: phd Date: 2007-04-09 08:36:56 -0600 (Mon, 09 Apr 2007) New Revision: 2492 Modified: SQLObject/docs/News.txt Log: Fixed ConnectionHub.doInTransaction() - if the original connection was processConnection - reset processConnection, not threadConnection. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-04-09 14:35:12 UTC (rev 2491) +++ SQLObject/docs/News.txt 2007-04-09 14:36:56 UTC (rev 2492) @@ -64,6 +64,15 @@ * idName can be inherited from the parent sqlmeta class. +SQLObject 0.8.2 +=============== + +Bug Fixes +--------- + +* Fixed ConnectionHub.doInTransaction() - if the original connection was + processConnection - reset processConnection, not threadConnection. + SQLObject 0.8.1 =============== |
|
From: <sub...@co...> - 2007-04-09 14:35:16
|
Author: phd
Date: 2007-04-09 08:35:12 -0600 (Mon, 09 Apr 2007)
New Revision: 2491
Modified:
SQLObject/trunk/sqlobject/dbconnection.py
Log:
Fixed ConnectionHub.doInTransaction() - if the original connection was
processConnection - reset processConnection, not threadConnection.
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2007-04-09 14:34:47 UTC (rev 2490)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2007-04-09 14:35:12 UTC (rev 2491)
@@ -1011,9 +1011,17 @@
"""
# @@: In Python 2.5, something usable with with: should also
# be added.
- old_conn = self.getConnection()
+ try:
+ old_conn = self.threadingLocal.connection
+ old_conn_is_threading = True
+ except AttributeError:
+ old_conn = self.processConnection
+ old_conn_is_threading = False
conn = old_conn.transaction()
- self.threadConnection = conn
+ if old_conn_is_threading:
+ self.threadConnection = conn
+ else:
+ self.processConnection = conn
try:
try:
value = func(*args, **kw)
@@ -1024,7 +1032,10 @@
conn.commit(close=True)
return value
finally:
- self.threadConnection = old_conn
+ if old_conn_is_threading:
+ self.threadConnection = old_conn
+ else:
+ self.processConnection = old_conn
def _set_threadConnection(self, value):
self.threadingLocal.connection = value
|
|
From: <sub...@co...> - 2007-04-09 14:34:56
|
Author: phd
Date: 2007-04-09 08:34:47 -0600 (Mon, 09 Apr 2007)
New Revision: 2490
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/dbconnection.py
Log:
Fixed ConnectionHub.doInTransaction() - if the original connection was
processConnection - reset processConnection, not threadConnection.
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-04-04 06:16:56 UTC (rev 2489)
+++ SQLObject/branches/0.8/docs/News.txt 2007-04-09 14:34:47 UTC (rev 2490)
@@ -7,6 +7,15 @@
.. _start:
+SQLObject 0.8.2
+===============
+
+Bug Fixes
+---------
+
+* Fixed ConnectionHub.doInTransaction() - if the original connection was
+ processConnection - reset processConnection, not threadConnection.
+
SQLObject 0.8.1
===============
Modified: SQLObject/branches/0.8/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/dbconnection.py 2007-04-04 06:16:56 UTC (rev 2489)
+++ SQLObject/branches/0.8/sqlobject/dbconnection.py 2007-04-09 14:34:47 UTC (rev 2490)
@@ -973,9 +973,17 @@
"""
# @@: In Python 2.5, something usable with with: should also
# be added.
- old_conn = self.getConnection()
+ try:
+ old_conn = self.threadingLocal.connection
+ old_conn_is_threading = True
+ except AttributeError:
+ old_conn = self.processConnection
+ old_conn_is_threading = False
conn = old_conn.transaction()
- self.threadConnection = conn
+ if old_conn_is_threading:
+ self.threadConnection = conn
+ else:
+ self.processConnection = conn
try:
try:
value = func(*args, **kw)
@@ -986,7 +994,10 @@
conn.commit(close=True)
return value
finally:
- self.threadConnection = old_conn
+ if old_conn_is_threading:
+ self.threadConnection = old_conn
+ else:
+ self.processConnection = old_conn
def _set_threadConnection(self, value):
self.threadingLocal.connection = value
|
|
From: SourceForge.net <no...@so...> - 2007-04-08 10:02:54
|
Bugs item #1696365, was opened at 2007-04-08 19:02 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=1696365&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 release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Shimizukawa Takayuki (shimi-ta) Assigned to: Nobody/Anonymous (nobody) Summary: datetime validation is incorrect Initial Comment: on SQLObject-0.8.1 py2.4 with SQLite3 When set datetime value to DateCol, expect date spec string(as '2007-04-08'), but actual data is datetime spec string(as '2007-04-08 18:50:37.078000'). test code:: class SomeData(SQLObject): date = DateCol() datetime = DateTimeCol() d = datetime.datetime.now() v = SomeData(date=d.date(),datetime=d) v.set(date=d, datetime=d) assert str(v.datetime) == str(d) # raise assert str(v.date) == str(d.date()) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1696365&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-04-08 09:36:20
|
Bugs item #1696359, was opened at 2007-04-08 18:36 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=1696359&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 release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Shimizukawa Takayuki (shimi-ta) Assigned to: Nobody/Anonymous (nobody) Summary: Can not set ForeignKey and Unicode cols at the same time. Initial Comment: on SQLObject-0.8.1 py2.4 Can not set ForeignKey and Unicode cols at the same time. test code:: class Foo(SQLObject): name = UnicodeCol() class User(SQLObject): name = UnicodeCol() foo = ForeignKey('Foo') foo1 = Foo(name="Foo1") foo2 = Foo(name="Foo2") # raise UnicodeDecodeError user = User(name=u'\u8ab0\u304b', fooID=u'2') # raise UnicodeDecodeError user.set(name=u'\u8ab0\u304b', fooID=u'2') ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1696359&group_id=74338 |
|
From: inba K. <inb...@SI...> - 2007-04-03 16:51:23
|
xInternet AJ created deal http://img444.imageshack.us/my.php?image=xxxv8.png attention fixated Iran |
|
From: SourceForge.net <no...@so...> - 2007-03-29 07:35:44
|
Bugs item #1690105, was opened at 2007-03-28 23:10 Message generated for change (Comment added) made by junas You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1690105&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MySQL Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mirinde Fekus (junas) Assigned to: Nobody/Anonymous (nobody) Summary: UnicodeEncodeError: 'latin-1' codec can't encode characters Initial Comment: I have this http://pylonshq.com/pasties/198 after upgrading mysqldb to 1.2.2 from 1.2.1 when selecting by value that contains non-latin characters: res = list(model.Tag.selectBy(tag = tag)) the connection string is sqlobject.dburi = mysql://****:****@localhost/pyneohuman?sqlobject_encoding=utf-8&charset=utf8 in development.ini so it's not latin-1... any ideas? ---------------------------------------------------------------------- >Comment By: Mirinde Fekus (junas) Date: 2007-03-29 11:35 Message: Logged In: YES user_id=1304728 Originator: YES SQLObject-0.8.1-py2.4 ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2007-03-28 23:27 Message: Logged In: YES user_id=4799 Originator: NO What is the version of SQLObject? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1690105&group_id=74338 |
|
From: <sub...@co...> - 2007-03-29 04:18:40
|
Author: luke
Date: 2007-03-28 22:18:38 -0600 (Wed, 28 Mar 2007)
New Revision: 2477
Modified:
SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py
Log:
Fix for sqlite: no DISTINCT ON, wrap select alias columns in AS
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py 2007-03-29 04:00:20 UTC (rev 2476)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py 2007-03-29 04:18:38 UTC (rev 2477)
@@ -96,7 +96,9 @@
clause = getattr(cls.sqlmeta, 'clause', NoDefault)
select = Select(columns,
distinct=True,
- distinctOn=cls.sqlmeta.idName,
+ # @@ LDO check if this really mattered for performance
+ # @@ Postgres (and MySQL?) extension!
+ #distinctOn=cls.sqlmeta.idName,
join=metajoin,
clause=clause)
@@ -108,7 +110,7 @@
last_alias = "%s_base" % alias
last_id = "id"
last = Alias(select, last_alias)
- columns = [SQLConstant("%s.%s"%(last_alias,x.expr2)) for x in columns]
+ columns = [ColumnAS(SQLConstant("%s.%s"%(last_alias,x.expr2)), x.expr2) for x in columns]
for i, agg in enumerate(aggregates):
restriction = agg[0]
@@ -132,7 +134,7 @@
join.append(agg_join)
for col in agg:
- columns.append(SQLConstant("%s.%s"%(agg_alias, col.expr2)))
+ columns.append(ColumnAS(SQLConstant("%s.%s"%(agg_alias, col.expr2)),col.expr2))
last = new_alias
last_alias = agg_alias
|
|
From: <sub...@co...> - 2007-03-29 04:00:22
|
Author: luke
Date: 2007-03-28 22:00:20 -0600 (Wed, 28 Mar 2007)
New Revision: 2476
Modified:
SQLObject/branches/sqlbuilder-sresults/sqlobject/tests/test_select_through.py
Log:
Add test to ensure nested throughTo works
Modified: SQLObject/branches/sqlbuilder-sresults/sqlobject/tests/test_select_through.py
===================================================================
--- SQLObject/branches/sqlbuilder-sresults/sqlobject/tests/test_select_through.py 2007-03-29 03:59:16 UTC (rev 2475)
+++ SQLObject/branches/sqlbuilder-sresults/sqlobject/tests/test_select_through.py 2007-03-29 04:00:20 UTC (rev 2476)
@@ -49,4 +49,5 @@
def testThroughRelatedJoin():
assert list(threes[0].twos.throughTo.threes) == [threes[0], threes[1]]
-
\ No newline at end of file
+def testThroughFKAndJoin():
+ assert list(threes[0].ones.throughTo.three.throughTo.twos) == [twos[0]]
\ No newline at end of file
|
|
From: <sub...@co...> - 2007-03-29 03:59:20
|
Author: luke
Date: 2007-03-28 21:59:16 -0600 (Wed, 28 Mar 2007)
New Revision: 2475
Modified:
SQLObject/branches/sqlbuilder-views+1/sqlobject/tests/test_select_through.py
Log:
Add test to ensure nested throughTo works
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/tests/test_select_through.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/tests/test_select_through.py 2007-03-29 03:23:48 UTC (rev 2474)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/tests/test_select_through.py 2007-03-29 03:59:16 UTC (rev 2475)
@@ -49,4 +49,5 @@
def testThroughRelatedJoin():
assert list(threes[0].twos.throughTo.threes) == [threes[0], threes[1]]
-
\ No newline at end of file
+def testThroughFKAndJoin():
+ assert list(threes[0].ones.throughTo.three.throughTo.twos) == [twos[0]]
\ No newline at end of file
|
|
From: <sub...@co...> - 2007-03-29 03:23:50
|
Author: luke
Date: 2007-03-28 21:23:48 -0600 (Wed, 28 Mar 2007)
New Revision: 2474
Modified:
SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py
SQLObject/branches/sqlbuilder-sresults/sqlobject/sresults.py
Log:
Merged sqlobject-views+1 r2473 to sqlobject-sresults (Fix for sresults.throughTo on sqlite)
Modified: SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py 2007-03-29 03:14:29 UTC (rev 2473)
+++ SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py 2007-03-29 03:23:48 UTC (rev 2474)
@@ -829,6 +829,15 @@
def ISNOTNULL(expr):
return SQLOp("IS NOT", expr, None)
+class ColumnAS(SQLOp):
+ ''' Just like SQLOp('AS', expr, name) except without the parentheses '''
+ def __init__(self, expr, name):
+ if isinstance(name, (str, unicode)):
+ name = SQLConstant(name)
+ SQLOp.__init__(self, 'AS', expr, name)
+ def __sqlrepr__(self, db):
+ return "%s %s %s" % (sqlrepr(self.expr1, db), self.op, sqlrepr(self.expr2, db))
+
class _LikeQuoted:
# @@: I'm not sure what the quoting rules really are for all the
# databases
Modified: SQLObject/branches/sqlbuilder-sresults/sqlobject/sresults.py
===================================================================
--- SQLObject/branches/sqlbuilder-sresults/sqlobject/sresults.py 2007-03-29 03:14:29 UTC (rev 2473)
+++ SQLObject/branches/sqlbuilder-sresults/sqlobject/sresults.py 2007-03-29 03:23:48 UTC (rev 2474)
@@ -316,23 +316,27 @@
def _throughToFK(self, col):
otherClass = getattr(self.sourceClass, "_SO_class_"+col.foreignKey)
- query = sqlbuilder.Alias(self.queryForSelect(), "%s_%s" % (self.sourceClass.__name__, col.name))
- return otherClass, otherClass.q.id==getattr(query.q, getattr(self.sourceClass.q, col.name).fieldName)
+ colName = col.name
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(getattr(self.sourceClass.q, colName), colName)])
+ query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, col.name))
+ return otherClass, otherClass.q.id==getattr(query.q, colName)
def _throughToMultipleJoin(self, join):
otherClass = join.otherClass
- query = self.queryForSelect()
+ colName = join.soClass.sqlmeta.style.dbColumnToPythonAttr(join.joinColumn)
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(self.sourceClass.q.id, self.sourceClass.q.id.fieldName)])
query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, join.joinMethodName))
- joinColumn = getattr(otherClass.q, join.soClass.sqlmeta.style.dbColumnToPythonAttr(join.joinColumn))
+ joinColumn = getattr(otherClass.q, colName)
return otherClass, joinColumn==getattr(query.q, self.sourceClass.q.id.fieldName)
def _throughToRelatedJoin(self, join):
otherClass = join.otherClass
intTable = sqlbuilder.Table(join.intermediateTable)
- query = self.queryForSelect().newItems([getattr(intTable, join.joinColumn)])
+ colName = join.joinColumn
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(getattr(intTable, colName), colName)])
query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, join.joinMethodName))
clause = sqlbuilder.AND(otherClass.q.id == getattr(intTable, join.otherColumn),
- getattr(intTable, join.joinColumn) == getattr(query.q, join.joinColumn))
+ getattr(intTable, colName) == getattr(query.q, colName))
return otherClass, clause
__all__ = ['SelectResults']
|
|
From: <sub...@co...> - 2007-03-29 03:14:31
|
Author: luke
Date: 2007-03-28 21:14:29 -0600 (Wed, 28 Mar 2007)
New Revision: 2473
Modified:
SQLObject/branches/sqlbuilder-views+1/sqlobject/sqlbuilder.py
SQLObject/branches/sqlbuilder-views+1/sqlobject/sresults.py
SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py
Log:
Fix sresults.throughTo on sqlite
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/sqlbuilder.py 2007-03-29 03:01:54 UTC (rev 2472)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/sqlbuilder.py 2007-03-29 03:14:29 UTC (rev 2473)
@@ -829,6 +829,15 @@
def ISNOTNULL(expr):
return SQLOp("IS NOT", expr, None)
+class ColumnAS(SQLOp):
+ ''' Just like SQLOp('AS', expr, name) except without the parentheses '''
+ def __init__(self, expr, name):
+ if isinstance(name, (str, unicode)):
+ name = SQLConstant(name)
+ SQLOp.__init__(self, 'AS', expr, name)
+ def __sqlrepr__(self, db):
+ return "%s %s %s" % (sqlrepr(self.expr1, db), self.op, sqlrepr(self.expr2, db))
+
class _LikeQuoted:
# @@: I'm not sure what the quoting rules really are for all the
# databases
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/sresults.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/sresults.py 2007-03-29 03:01:54 UTC (rev 2472)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/sresults.py 2007-03-29 03:14:29 UTC (rev 2473)
@@ -316,23 +316,27 @@
def _throughToFK(self, col):
otherClass = getattr(self.sourceClass, "_SO_class_"+col.foreignKey)
- query = sqlbuilder.Alias(self.queryForSelect(), "%s_%s" % (self.sourceClass.__name__, col.name))
- return otherClass, otherClass.q.id==getattr(query.q, getattr(self.sourceClass.q, col.name).fieldName)
+ colName = col.name
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(getattr(self.sourceClass.q, colName), colName)])
+ query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, col.name))
+ return otherClass, otherClass.q.id==getattr(query.q, colName)
def _throughToMultipleJoin(self, join):
otherClass = join.otherClass
- query = self.queryForSelect()
+ colName = join.soClass.sqlmeta.style.dbColumnToPythonAttr(join.joinColumn)
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(self.sourceClass.q.id, self.sourceClass.q.id.fieldName)])
query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, join.joinMethodName))
- joinColumn = getattr(otherClass.q, join.soClass.sqlmeta.style.dbColumnToPythonAttr(join.joinColumn))
+ joinColumn = getattr(otherClass.q, colName)
return otherClass, joinColumn==getattr(query.q, self.sourceClass.q.id.fieldName)
def _throughToRelatedJoin(self, join):
otherClass = join.otherClass
intTable = sqlbuilder.Table(join.intermediateTable)
- query = self.queryForSelect().newItems([getattr(intTable, join.joinColumn)])
+ colName = join.joinColumn
+ query = self.queryForSelect().newItems([sqlbuilder.ColumnAS(getattr(intTable, colName), colName)])
query = sqlbuilder.Alias(query, "%s_%s" % (self.sourceClass.__name__, join.joinMethodName))
clause = sqlbuilder.AND(otherClass.q.id == getattr(intTable, join.otherColumn),
- getattr(intTable, join.joinColumn) == getattr(query.q, join.joinColumn))
+ getattr(intTable, colName) == getattr(query.q, colName))
return otherClass, clause
__all__ = ['SelectResults']
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py 2007-03-29 03:01:54 UTC (rev 2472)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/views.py 2007-03-29 03:14:29 UTC (rev 2473)
@@ -7,16 +7,6 @@
from main import SQLObject, sqlmeta
import types, threading
-
-class ColumnAS(SQLOp):
- ''' Just like SQLOp('AS', expr, name) except without the parentheses '''
- def __init__(self, expr, name):
- if isinstance(name, (str, unicode)):
- name = SQLConstant(name)
- SQLOp.__init__(self, 'AS', expr, name)
- def __sqlrepr__(self, db):
- return "%s %s %s" % (sqlrepr(self.expr1, db), self.op, sqlrepr(self.expr2, db))
-
####
class ViewSQLObjectField(SQLObjectField):
|
|
From: <sub...@co...> - 2007-03-29 03:01:56
|
Author: luke
Date: 2007-03-28 21:01:54 -0600 (Wed, 28 Mar 2007)
New Revision: 2472
Modified:
SQLObject/branches/sqlbuilder-views+1/sqlobject/conftest.py
Log:
I really need to stop committing the evidence of my laziness.
Modified: SQLObject/branches/sqlbuilder-views+1/sqlobject/conftest.py
===================================================================
--- SQLObject/branches/sqlbuilder-views+1/sqlobject/conftest.py 2007-03-29 03:01:04 UTC (rev 2471)
+++ SQLObject/branches/sqlbuilder-views+1/sqlobject/conftest.py 2007-03-29 03:01:54 UTC (rev 2472)
@@ -16,7 +16,7 @@
except ImportError: # Python 2.2
pass
else:
- pass #pkg_resources.require('SQLObject')
+ pkg_resources.require('SQLObject')
connectionShortcuts = {
'mysql': 'mysql://test@localhost/test',
|
|
From: <sub...@co...> - 2007-03-29 02:55:19
|
Author: luke Date: 2007-03-28 20:55:10 -0600 (Wed, 28 Mar 2007) New Revision: 2470 Added: SQLObject/branches/sqlbuilder-views+1/ Log: Create branch for mergeforward Copied: SQLObject/branches/sqlbuilder-views+1 (from rev 2469, SQLObject/trunk) |
|
From: SourceForge.net <no...@so...> - 2007-03-28 19:27:56
|
Bugs item #1690105, was opened at 2007-03-28 23:10 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1690105&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MySQL Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mirinde Fekus (junas) Assigned to: Nobody/Anonymous (nobody) Summary: UnicodeEncodeError: 'latin-1' codec can't encode characters Initial Comment: I have this http://pylonshq.com/pasties/198 after upgrading mysqldb to 1.2.2 from 1.2.1 when selecting by value that contains non-latin characters: res = list(model.Tag.selectBy(tag = tag)) the connection string is sqlobject.dburi = mysql://****:****@localhost/pyneohuman?sqlobject_encoding=utf-8&charset=utf8 in development.ini so it's not latin-1... any ideas? ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-03-28 23:27 Message: Logged In: YES user_id=4799 Originator: NO What is the version of SQLObject? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1690105&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2007-03-28 19:10:22
|
Bugs item #1690105, was opened at 2007-03-28 23:10 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=1690105&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MySQL Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mirinde Fekus (junas) Assigned to: Nobody/Anonymous (nobody) Summary: UnicodeEncodeError: 'latin-1' codec can't encode characters Initial Comment: I have this http://pylonshq.com/pasties/198 after upgrading mysqldb to 1.2.2 from 1.2.1 when selecting by value that contains non-latin characters: res = list(model.Tag.selectBy(tag = tag)) the connection string is sqlobject.dburi = mysql://****:****@localhost/pyneohuman?sqlobject_encoding=utf-8&charset=utf8 in development.ini so it's not latin-1... any ideas? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1690105&group_id=74338 |
|
From: <sub...@co...> - 2007-03-28 16:43:55
|
Author: luke
Date: 2007-03-28 10:43:49 -0600 (Wed, 28 Mar 2007)
New Revision: 2468
Modified:
SQLObject/branches/sqlbuilder-views/sqlobject/sqlbuilder.py
Log:
cleanup typo
Modified: SQLObject/branches/sqlbuilder-views/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/sqlbuilder-views/sqlobject/sqlbuilder.py 2007-03-28 16:42:52 UTC (rev 2467)
+++ SQLObject/branches/sqlbuilder-views/sqlobject/sqlbuilder.py 2007-03-28 16:43:49 UTC (rev 2468)
@@ -160,7 +160,7 @@
def __repr__(self):
try:
- return self.__sqlrepr__(default_sqlrepr_db)
+ return self.__sqlrepr__(None)
except AssertionError:
return '<%s %s>' % (
self.__class__.__name__, hex(id(self))[2:])
|
|
From: <sub...@co...> - 2007-03-28 16:43:19
|
Author: luke
Date: 2007-03-28 10:42:52 -0600 (Wed, 28 Mar 2007)
New Revision: 2467
Modified:
SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py
Log:
cleanup typo
Modified: SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py 2007-03-28 16:21:54 UTC (rev 2466)
+++ SQLObject/branches/sqlbuilder-sresults/sqlobject/sqlbuilder.py 2007-03-28 16:42:52 UTC (rev 2467)
@@ -160,7 +160,7 @@
def __repr__(self):
try:
- return self.__sqlrepr__(default_sqlrepr_db)
+ return self.__sqlrepr__(None)
except AssertionError:
return '<%s %s>' % (
self.__class__.__name__, hex(id(self))[2:])
|