Author: phd
Date: 2008-02-27 06:43:15 -0700 (Wed, 27 Feb 2008)
New Revision: 3263
Modified:
SQLObject/branches/0.10/docs/Authors.txt
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/main.py
SQLObject/branches/0.10/sqlobject/manager/command.py
Log:
Merged revisions 3060:3062 from the 0.9 branch - patches by Diez B. Roggisch <deets at web.de>:
Use list.reverse() in manager/command.py for Python 2.3 compatibility.
Prevent MultipleJoin from removing the intermediate table if it was not created by the Join.
Modified: SQLObject/branches/0.10/docs/Authors.txt
===================================================================
--- SQLObject/branches/0.10/docs/Authors.txt 2008-02-27 13:38:21 UTC (rev 3262)
+++ SQLObject/branches/0.10/docs/Authors.txt 2008-02-27 13:43:15 UTC (rev 3263)
@@ -1,8 +1,7 @@
Authors
=======
-SQLObject was originally written and continues to be maintained by Ian
-Bicking <ia...@co...>
+SQLObject was originally written by Ian Bicking <ia...@co...>.
Contributions have been made by:
@@ -21,6 +20,7 @@
* Shahms King <shahms at shahms.com>
* David Turner, The Open Planning Project
* Dan Pascu <dan at ag-projects.com>
+* Diez B. Roggisch <deets at web.de>
* Oleg Broytmann <ph...@ph...>
.. image:: http://sourceforge.net/sflogo.php?group_id=74338&type=4
Modified: SQLObject/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2008-02-27 13:38:21 UTC (rev 3262)
+++ SQLObject/branches/0.10/docs/News.txt 2008-02-27 13:43:15 UTC (rev 3263)
@@ -72,6 +72,14 @@
* MySQLConnection (and DB URI) accept a number of SSL-related parameters:
ssl_key, ssl_cert, ssl_ca, ssl_capath.
+SQLObject 0.9.4
+===============
+
+* Use list.reverse() in manager/command.py for Python 2.3 compatibility.
+
+* Prevent MultipleJoin from removing the intermediate table if it was not
+ created by the Join.
+
SQLObject 0.9.3
===============
Modified: SQLObject/branches/0.10/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/main.py 2008-02-27 13:38:21 UTC (rev 3262)
+++ SQLObject/branches/0.10/sqlobject/main.py 2008-02-27 13:43:15 UTC (rev 3263)
@@ -1386,9 +1386,6 @@
def createJoinTables(cls, ifNotExists=False, connection=None):
conn = connection or cls._connection
for join in cls._getJoinsToCreate():
- if not getattr(join, 'createRelatedTable', True):
- # This join has requested not to be created
- continue
if (ifNotExists and
conn.tableExists(join.intermediateTable)):
continue
@@ -1399,9 +1396,6 @@
conn = connection or cls._connection
sql = []
for join in cls._getJoinsToCreate():
- if not getattr(join, 'createRelatedTable', True):
- # This join has requested not to be created
- continue
sql.append(conn._SO_createJoinTableSQL(join))
return ';\n'.join(sql)
createJoinTablesSQL = classmethod(createJoinTablesSQL)
@@ -1429,7 +1423,7 @@
for join in cls.sqlmeta.joins:
if not join:
continue
- if not join.hasIntermediateTable():
+ if not join.hasIntermediateTable() or not getattr(join, 'createRelatedTable', True):
continue
if join.soClass.__name__ > join.otherClass.__name__:
continue
@@ -1442,7 +1436,7 @@
for join in cls.sqlmeta.joins:
if not join:
continue
- if not join.hasIntermediateTable():
+ if not join.hasIntermediateTable() or not getattr(join, 'createRelatedTable', True):
continue
if join.soClass.__name__ > join.otherClass.__name__:
continue
Modified: SQLObject/branches/0.10/sqlobject/manager/command.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/manager/command.py 2008-02-27 13:38:21 UTC (rev 3262)
+++ SQLObject/branches/0.10/sqlobject/manager/command.py 2008-02-27 13:43:15 UTC (rev 3263)
@@ -689,7 +689,9 @@
v = self.options.verbose
dropped = 0
not_existing = 0
- for soClass in self.classes().__reversed__():
+ rev_classes = self.classes()
+ rev_classes.reverse()
+ for soClass in rev_classes:
exists = soClass._connection.tableExists(soClass.sqlmeta.table)
if v >= 1:
if exists:
|