modeling-cvs Mailing List for Object-Relational Bridge for python (Page 16)
Status: Abandoned
Brought to you by:
sbigaret
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(54) |
Apr
(29) |
May
(94) |
Jun
(47) |
Jul
(156) |
Aug
(132) |
Sep
(40) |
Oct
(6) |
Nov
(18) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(18) |
Feb
(59) |
Mar
(7) |
Apr
|
May
(8) |
Jun
(2) |
Jul
(12) |
Aug
(15) |
Sep
(12) |
Oct
(6) |
Nov
(25) |
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(27) |
Mar
|
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sbi...@us...> - 2003-08-10 14:43:18
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv16799/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer Modified Files: SQLiteSQLExpression.py Log Message: Fixed bug #785913: "LIKE qualifier w/ raw '%' and '_' characters does not work w/ SQLite" Fixed bug #786217: 'Qualifier LIKE can be case-insensitive' (bug was observed for MySQL and SQLite) Index: SQLiteSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/SQLiteSQLExpression.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SQLiteSQLExpression.py 11 Jun 2003 11:10:17 -0000 1.1 --- SQLiteSQLExpression.py 10 Aug 2003 14:43:16 -0000 1.2 *************** *** 49,52 **** --- 49,58 ---- import string + import re + sqlite_esc_star_mark_replct='[*]' + sqlite_escaped_star=re.compile(r'\\\*') + sqlite_esc_question_mark_replct='[?]' + sqlite_escaped_question_mark=re.compile(r'\\\?') + class SQLiteSQLExpression(SQLExpression): """ *************** *** 127,128 **** --- 133,260 ---- return (str, aliases) + + + def globPatternForShellPattern(self, pattern): + """ + Transforms a shell pattern of a like/ilike qualifier to a shell pattern + accepted by SQLite's GLOB statement. + + There's little to be done, except that escaped characters '\*' and '\?' + become, respectively, '[*]' and '[?]' + """ + pattern=sqlite_escaped_question_mark.sub(sqlite_esc_question_mark_replct, + pattern) + pattern=sqlite_escaped_star.sub(sqlite_esc_star_mark_replct, pattern) + return pattern + + def sqlStringForCaseInsensitiveLike(self, keyString, valueString): + """ + Overrides the default implementation and returns the SQL string, to be + inserted in a WHERE clause, for case-insensitive comparison between a + lvalue and a rvalue. Note that sqlite LIKE sql operator is + case-insensitive. + + Returns the following string:: + + <keyString> LIKE <valueString> + + Parameters: + + keyString -- the left value + + valueString -- the right value + + See also: sqlStringForKeyValueQualifier(), + sqlStringForKeyComparisonQualifier() + """ + return "%s LIKE %s"% ( keyString, valueString ) + + def sqlStringForKeyValueQualifier(self, aQualifier): + """ + Overrides the default behaviour to handle 'like' and 'ilike' correctly + wrt the way sqlite works. + + Returns: + + - the inherited SQLExpression.sqlStringForKeyValueQualifier() if + aQualifier.operator() is not like or ilike, + + - if aQualifier.operator() is QualifierOperatorLike: + + <key> GLOB <globPatternForShellPattern(value)> + + for example, the qualifier 'title like "*abc*"' is turned into: + + title GLOB "*abc*" + + - if it is QualifierOperatorCaseInsensitiveLike, returns + SQLExpression.sqlStringForKeyValueQualifier() with arguments + keyString=<key> and + valueString=self.sqlPatternFromShellPattern(<value>) + + For example, the qualifier 'title like "*abc*"' is turned into: + + title LIKE "%abc%" + + Note: the LIKE operator is case-insensitive in sqlite, while GLOB is + case-sensitive + + See also: SQLExpression.sqlStringForKeyValueQualifier() + globPatternForShellPattern() + """ + from Modeling.Qualifier import \ + QualifierOperatorCaseInsensitiveLike as op_ilike, \ + QualifierOperatorLike as op_like + + qualifier_operator=aQualifier.operator() + if qualifier_operator not in (op_like, op_ilike): + return SQLExpression.sqlStringForKeyValueQualifier(self, aQualifier) + + # Now we handle like or ilike, exclusively + key=aQualifier.key() + value=aQualifier.value() + + # do not transform the shell pattern to a sql pattern for LIKE, since + # we'll use the sql statement 'GLOB' for like, and 'GLOB' uses a shell + # pattern + if aQualifier.operator() is op_ilike: + value=self.sqlPatternFromShellPattern(value) + else: # like + operatorStr=self.sqlStringForSelector(aQualifier.operator(), value) + value=self.globPatternForShellPattern(value) + + + keyString=self.sqlStringForAttributeNamed(key) + valueString=self.sqlStringForValue(value, key) + + + if qualifier_operator is op_like: + return keyString+' '+operatorStr+' '+valueString + else: + return self.sqlStringForCaseInsensitiveLike(keyString, valueString) + + def sqlStringForSelector(self, selector, value): + """ + Overrides the default behaviour to ensure that Qualifier operator + 'LIKE' matches case-sensitively. + + Note: this is because the SQL LIKE operator is case-insensitive by default + in mysql. + + Returns: + + - if selector is Modeling.Qualifier.QualifierOperatorLike, + returns "GLOB" + + - otherwise returns SQLExpression.sqlStringForSelector() + + See also: SQLExpression.sqlStringForSelector() + sqlStringForKeyValueQualifier() + globPatternForShellPattern() + """ + from Modeling.Qualifier import QualifierOperatorLike + selectorIs=lambda s, selector=selector: s==selector + if selectorIs(QualifierOperatorLike): + return "GLOB" + else: + return SQLExpression.sqlStringForSelector(self, selector, value) |
From: <sbi...@us...> - 2003-08-10 14:38:18
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv16221/tests Modified Files: test_EditingContext_Global.py Log Message: Added test_23b_fetch_star_and_interrogation_mark_chars() + made some tests easier to read when they fail Index: test_EditingContext_Global.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** test_EditingContext_Global.py 10 Aug 2003 12:02:05 -0000 1.41 --- test_EditingContext_Global.py 10 Aug 2003 14:38:15 -0000 1.42 *************** *** 1169,1173 **** def test_23_fetch_star_and_interrogation_mark_chars(self): ! "[EditingContext] fetch real '?' and '*'" ec=EditingContext() b1=Book(); b1.setTitle('abc?d') --- 1169,1173 ---- def test_23_fetch_star_and_interrogation_mark_chars(self): ! "[EditingContext] fetch real '?' and '*' w/ LIKE" ec=EditingContext() b1=Book(); b1.setTitle('abc?d') *************** *** 1178,1193 **** res=ec.fetch('Book', 'title like "abc?d"') ! self.failIf(len(res)!=3) res=ec.fetch('Book', 'title like "abc*d"') ! self.failIf(len(res)!=3) res=ec.fetch('Book', 'title like "abc\?d"') ! self.failIf(len(res)!=1) ! self.failIf(res[0].getTitle()!='abc?d') res=ec.fetch('Book', 'title like "abc\*d"') ! self.failIf(len(res)!=1) ! self.failIf(res[0].getTitle()!='abc*d') def test_24_fetch_does_not_return_duplicates(self): --- 1178,1222 ---- res=ec.fetch('Book', 'title like "abc?d"') ! self.assertEqual(len(res), 3) res=ec.fetch('Book', 'title like "abc*d"') ! self.assertEqual(len(res), 3) res=ec.fetch('Book', 'title like "abc\?d"') ! self.assertEqual(len(res), 1) ! self.assertEqual(res[0].getTitle(), 'abc?d') res=ec.fetch('Book', 'title like "abc\*d"') ! self.assertEqual(len(res), 1) ! self.assertEqual(res[0].getTitle(), 'abc*d') ! ! def test_23b_fetch_star_and_interrogation_mark_chars(self): ! "[EditingContext] fetch real '?' and '*' w/ ILIKE" ! ec=EditingContext() ! b1=Book(); b1.setTitle('abc?d') ! b2=Book(); b2.setTitle('aBC?d') ! b3=Book(); b3.setTitle('abcXd') ! b4=Book(); b4.setTitle('abc*d') ! b5=Book(); b5.setTitle('abc*D') ! ec.insert(b1); ec.insert(b2); ec.insert(b3); ec.insert(b4); ec.insert(b5) ! ec.saveChanges() ! ! res=ec.fetch('Book', 'title ilike "abc?d"') ! self.assertEqual(len(res), 5) ! ! res=ec.fetch('Book', 'title ilike "abc*d"') ! self.assertEqual(len(res), 5) ! ! res=ec.fetch('Book', 'title ilike "abc\?d"') ! self.assertEqual(len(res), 2) ! titles=[r.getTitle() for r in res] ! self.failIf('abc?d' not in titles) ! self.failIf('aBC?d' not in titles) ! ! res=ec.fetch('Book', 'title ilike "abc\*d"') ! self.assertEqual(len(res), 2) ! titles=[r.getTitle() for r in res] ! self.failIf('abc*d' not in titles) ! self.failIf('abc*D' not in titles) def test_24_fetch_does_not_return_duplicates(self): |
From: <sbi...@us...> - 2003-08-10 12:02:08
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv25961/tests Modified Files: test_EditingContext_Global.py Log Message: Added tests for bug #786217 Index: test_EditingContext_Global.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** test_EditingContext_Global.py 9 Aug 2003 15:07:23 -0000 1.40 --- test_EditingContext_Global.py 10 Aug 2003 12:02:05 -0000 1.41 *************** *** 1221,1226 **** --- 1221,1246 ---- res=ec.fetch('Book', 'title like "*abc_d*"') self.assertEqual(len(res), 1) + self.assertEqual(res[0].getTitle(), "abc_d") res=ec.fetch('Book', 'title like "*abc%d*"') self.assertEqual(len(res), 1) + self.assertEqual(res[0].getTitle(), "abc%d") + # TBD: with ILIKE + + def test_27_like_is_case_sensitive(self): + "[EditingContext] check that LIKE is case-sensitive" + # bug #786217 + ec=EditingContext() + b1=Book(); b1.setTitle('abcd') + b2=Book(); b2.setTitle('aBcd') + b3=Book(); b3.setTitle('aBCd') + ec.insert(b1); ec.insert(b2); ec.insert(b3) + ec.saveChanges() + + res=ec.fetch('Book', 'title like "abcd"') + self.assertEqual(len(res), 1) + self.assertEqual(res[0].getTitle(), "abcd") + res=ec.fetch('Book', 'title like "aBCd"') + self.assertEqual(len(res), 1) + self.assertEqual(res[0].getTitle(), "aBCd") def test_999_customSQLQuery(self): |
From: <sbi...@us...> - 2003-08-10 11:59:16
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/MySQLAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv25553/DatabaseAdaptors/MySQLAdaptorLayer Modified Files: MySQLSQLExpression.py Log Message: Fixed bug #786217: 'Qualifier LIKE can be case-insensitive' for MySQL Index: MySQLSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/MySQLAdaptorLayer/MySQLSQLExpression.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MySQLSQLExpression.py 3 Aug 2003 10:34:14 -0000 1.6 --- MySQLSQLExpression.py 10 Aug 2003 11:59:13 -0000 1.7 *************** *** 271,272 **** --- 271,297 ---- orderByClause=orderByClause, lockClause=lockClause) + + def sqlStringForSelector(self, selector, value): + """ + Overrides the default behaviour to ensure that Qualifier operator + 'LIKE' matches case-sensitively. + + Note: this is because the SQL LIKE operator is case-insensitive by default + in MySQL. + + Returns: + + - if selector is Modeling.Qualifier.QualifierOperatorLike, + returns "LIKE BINARY" + + - otherwise returns SQLExpression.sqlStringForSelector() + + See also: SQLExpression.sqlStringForSelector() + """ + from Modeling.Qualifier import QualifierOperatorLike + selectorIs=lambda s, selector=selector: s==selector + if selectorIs(QualifierOperatorLike): + return "LIKE BINARY" + else: + return SQLExpression.sqlStringForSelector(self, selector, value) + |
From: <sbi...@us...> - 2003-08-09 15:11:15
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv17995 Modified Files: CHANGES Log Message: Postgresql Layer can now correctly handled raw '_' characters in a LIKE statement Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/CHANGES,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGES 9 Aug 2003 11:17:45 -0000 1.2 --- CHANGES 9 Aug 2003 15:11:13 -0000 1.3 *************** *** 8,11 **** --- 8,14 ---- -------------------------------------------------------- + * Fixed: Postgresql Layer can now correctly handled raw '_' characters in a + LIKE statement + * Fixed bug #785432: SQLite now accepts TEXT, and DATETIME, TEXT, NUMBER, DECIMAL, SMALLINT, REAL as well in addition to the sql types basically |
From: <sbi...@us...> - 2003-08-09 15:10:40
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees In directory sc8-pr-cvs1:/tmp/cvs-serv17925/Modeling/tests/testPackages/StoreEmployees Modified Files: pymodel_StoreEmployees.py Log Message: Removed adaptorName from the pymodel Index: pymodel_StoreEmployees.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees/pymodel_StoreEmployees.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pymodel_StoreEmployees.py 31 Jul 2003 20:52:42 -0000 1.4 --- pymodel_StoreEmployees.py 9 Aug 2003 15:10:37 -0000 1.5 *************** *** 25,29 **** _connDict = {'database': 'STORE_EMPLOYEES'} ! model = Model('StoreEmployees',adaptorName='Postgresql', connDict=_connDict) model.doc = ' ... ' --- 25,29 ---- _connDict = {'database': 'STORE_EMPLOYEES'} ! model = Model('StoreEmployees', adaptorName='', connDict=_connDict) model.doc = ' ... ' |
From: <sbi...@us...> - 2003-08-09 15:10:14
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv17888/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer Modified Files: PostgresqlSQLExpression.py Log Message: Postgresql Layer can now correctly handled raw '_' characters in a LIKE statement Index: PostgresqlSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer/PostgresqlSQLExpression.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PostgresqlSQLExpression.py 3 Aug 2003 10:34:14 -0000 1.6 --- PostgresqlSQLExpression.py 9 Aug 2003 15:10:11 -0000 1.7 *************** *** 116,121 **** '\%': postgresql interprets backslashes in strings """ ! pattern=percent.sub('\\\\\\\\%', pattern) ! pattern=underscore.sub('\_', pattern) pattern=escaped_question_mark.sub(esc_question_tmp_replct, pattern) pattern=question_mark.sub('_', pattern) --- 116,121 ---- '\%': postgresql interprets backslashes in strings """ ! pattern=percent.sub(r'\\\\%', pattern) ! pattern=underscore.sub(r'\\\\_', pattern) pattern=escaped_question_mark.sub(esc_question_tmp_replct, pattern) pattern=question_mark.sub('_', pattern) |
From: <sbi...@us...> - 2003-08-09 15:08:43
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv17712 Modified Files: Model.py Log Message: Fixed: loadModel() shouldn't raise when MDL_DB_CONNECTIONS_CFG is equal to the empty string Index: Model.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Model.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Model.py 3 Aug 2003 12:56:10 -0000 1.12 --- Model.py 9 Aug 2003 15:08:40 -0000 1.13 *************** *** 88,92 **** if cfg_path is None: cfg_path=os.environ.get('MDL_DB_CONNECTIONS_CFG') ! if cfg_path is None: return --- 88,92 ---- if cfg_path is None: cfg_path=os.environ.get('MDL_DB_CONNECTIONS_CFG') ! if not cfg_path: return |
From: <sbi...@us...> - 2003-08-09 15:07:26
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv17578 Modified Files: test_EditingContext_Global.py Log Message: Added tests for bug #785913; fixed test_21_snapshot_raw(), now works even if test_10_saveChanges_04() fails prematurely Index: test_EditingContext_Global.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** test_EditingContext_Global.py 3 Aug 2003 10:12:26 -0000 1.39 --- test_EditingContext_Global.py 9 Aug 2003 15:07:23 -0000 1.40 *************** *** 1045,1050 **** # saved objects, related to other saved objects ! raw_fdard=ec.fetch('Writer', 'age == 82', rawRows=1)[0] ! fdard=ec.fetch('Writer', 'age == 82')[0] rabelais=ec.fetch('Writer', 'lastName == "Rabelais"')[0] fdard_snapshot_raw=fdard.snapshot_raw() --- 1045,1050 ---- # saved objects, related to other saved objects ! raw_fdard=ec.fetch('Writer', 'age in [81, 82]', rawRows=1)[0] ! fdard=ec.fetch('Writer', 'age in [81, 82]')[0] rabelais=ec.fetch('Writer', 'lastName == "Rabelais"')[0] fdard_snapshot_raw=fdard.snapshot_raw() *************** *** 1209,1212 **** --- 1209,1227 ---- self.assertEqual(ws, 2) + def test_26_fetch_underscore_percent(self): + "[EditingContext] fetch real '_' and '%'" + # bug #785913 + ec=EditingContext() + b1=Book(); b1.setTitle('abc_d') + b2=Book(); b2.setTitle('abcXd') + b3=Book(); b3.setTitle('abc%d') + ec.insert(b1); ec.insert(b2); ec.insert(b3) + ec.saveChanges() + + res=ec.fetch('Book', 'title like "*abc_d*"') + self.assertEqual(len(res), 1) + res=ec.fetch('Book', 'title like "*abc%d*"') + self.assertEqual(len(res), 1) + def test_999_customSQLQuery(self): "[EditingContext] custom SQL Query" |
From: <sbi...@us...> - 2003-08-09 11:17:51
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv12454 Modified Files: CHANGES Log Message: Fixed bug #785432: SQLite now accepts TEXT, and DATETIME, TEXT, NUMBER, DECIMAL, SMALLINT, REAL as well in addition to the sql types basically accepted by the core's SQLExpression (CHAR, FLOAT, INT, INTEGER, NUMERIC, DATE, TIME, TUMESTAMP and VARCHAR) Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/CHANGES,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGES 9 Aug 2003 11:16:43 -0000 1.1 --- CHANGES 9 Aug 2003 11:17:45 -0000 1.2 *************** *** 8,11 **** --- 8,16 ---- -------------------------------------------------------- + * Fixed bug #785432: SQLite now accepts TEXT, and DATETIME, TEXT, NUMBER, + DECIMAL, SMALLINT, REAL as well in addition to the sql types basically + accepted by the core's SQLExpression (CHAR, FLOAT, INT, INTEGER, NUMERIC, + DATE, TIME, TUMESTAMP and VARCHAR) + * Fixed bug #785434: mdl_generate_DB_schema now detects when the database (file)name in dsn and in the admin-dsn are not the same. |
From: <sbi...@us...> - 2003-08-09 11:17:51
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv12454/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer Modified Files: SQLiteSchemaGeneration.py Log Message: Fixed bug #785432: SQLite now accepts TEXT, and DATETIME, TEXT, NUMBER, DECIMAL, SMALLINT, REAL as well in addition to the sql types basically accepted by the core's SQLExpression (CHAR, FLOAT, INT, INTEGER, NUMERIC, DATE, TIME, TUMESTAMP and VARCHAR) Index: SQLiteSchemaGeneration.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/SQLiteSchemaGeneration.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLiteSchemaGeneration.py 2 Aug 2003 08:07:15 -0000 1.2 --- SQLiteSchemaGeneration.py 9 Aug 2003 11:17:45 -0000 1.3 *************** *** 268,269 **** --- 268,290 ---- sqlExprs.append(sqlExpr) return sqlExprs + + def valueTypeForExternalTypeMapping(self): + """ + Extends the inherited method's result set and adds the SQL types: + DATETIME, TEXT, NUMBER, DECIMAL, SMALLINT, REAL. + + See also: SQLExpression.valueTypeForExternalTypeMapping() + """ + # Note: SQLite does not care about SQL types, since all types are treated + # as strings in this db-server. Any valid (or invalid) sql types can be + # added here, neither the framework nor SQLite cares. + values=SQLExpression.valueTypeForExternalTypeMapping.im_func(self) + values.update({ 'datetime': DateType, + 'text': CharacterType, + 'number': NumericType, + 'decimal': NumericType, + 'smallint': NumericType, + 'real': NumericType, + } + ) + return values |
From: <sbi...@us...> - 2003-08-09 11:16:54
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv12332 Added Files: CHANGES Log Message: Moved CHANGES to the top-level directory --- NEW FILE: CHANGES --- -*- text -*- Module Modeling --------------- Current release is: 0.9-pre-12 / See also: TODO, INSTALL and doc/ * ** Distributed under the GNU General Public License ** -------------------------------------------------------- * Fixed bug #785434: mdl_generate_DB_schema now detects when the database (file)name in dsn and in the admin-dsn are not the same. 0.9-pre-12 (2003/08/03) ----------------------- * Fixed bug #780495: when ec.fetch() is joining two tables or more, the returned set of objects could have duplicates. * Fixed bug #774989: improper result returned by CustomObject.snapshot() wrt tomany relationships --see CustomObject.snapshot() documentation for details. * Fixed bug #779775, on behalf of Yannick Gingras who reported the bug and gave the patch fixing it. * Fixed bug #781884: SQLiteAdaptorLayer: dropping and creating a database was not possible (and was failing w/ an ugly traceback) * Fixed MANIFEST.in and setup.py: the SQLite adaptor layer was omitted in the source distribution! Thanks Mario for reporting. * Model.loadModel() now automatically build() a pymodel, as suggested by Mario <ma...@ru...> 0.9-pre-11 (2003/07/28) ----------------------- * Removed the constraint on to-many relationships for which an inverse to-one relationship had to be defined. Details: recordChangesInEditingContext() refactored, recordUpdateForObject() implemented, model StoreEmployees changed. * Added Relationship.anyInverseRelationship() --plus entity Holidays in test model StoreEmployees, with a toMany rel. Employee-->Holidays having no inverse. This is the first step towards the removal of the constraint on to-many relationships that should have an inverse toOne rel. for the moment being. * Fixed bug #776996: RelationshipManipulation methods misbehaving w/ inheritance. Implied fixing: Relationship.inverseRelationship(). Also added: entity.parentEntities() * Fixed bug #776592: was impossible to add raw '*' and '?' characters in a LIKE statement * Simple methods for models, entities, attributes, relationships and ClassDescriptions can now be automatically cached. This speeds up operations where model introspection is needed (when saving changes, when using RelationshipManipulation interface, etc.). See Appendix A.1, "Environment variables / Core" in the User's Guide for details. * Module RelationshipManipulation has been optimized and is now about 1.2x faster (2x faster with caching of models and class descriptions, see above) * Model, Entity, Attribute, Relationship, Join: replaced 'Unimplemented' exception with NotImplementedError * Added documentation: handling custom types for attributes (2003/07/21) 0.9-pre-10 (2003/07/18) ----------------------- * Fixed bug #772997: deleted then re-insert objects not correctly handled. * Added the ability to fetch raw rows (dictionaries instead of fully intialized objects) --see FetchSpecification.setFetchesRawRows() and EditingContext.fetch() 's parameter 'rawRows'. Also added the possibility to turn these rows into real objects --see EditingContext.faultForRawRow() Documentation updated. * Added CustomObject.snapshot_raw(), support for the future ability to fetch raw rows (see above) * rewrote trace() statements in QualifierParser to avoid the unnecessary formatting of its arguments when it is not enabled. On my machine this speeds up the parsing of qualifiers strings up to x7. * Added operator 'in' and 'not in' for fetch qualifiers. Operators 'AND', 'OR' and 'NOT' can now be written with lower-case characters. [Merged branch brch-0_9pre7-1-PyModel] Note: PyModels are not officially announced w/ this release, because there's no documentation yet. See mailing-list archives for details, or go there and ask. * Fixed: adaptorModel() could raise instead of returning None when model's adaptorName is not set * Model: added updateModelWithCFG(), loadModel(), searchModel() ModelSet: DEPRECATED method: updateModelWithCFG() --moved in Model, will be removed in v0.9.1 * Added Modeling.PyModel and Modeling.tests.test_PyModel * Added tests/testPackages/StoreEmployees/pymodel_StoreEmployees.py and updated StoreEmployees/__init__.py: now loads the model from the PyModel * Changed ClassDescription's delete rules: constants DELETE_CASCADE, DELETE_DENY, DELETE_NULLIFY and DELETE_NOACTION are now strings (were: integers) --> Relationship.setDeleteRule() updated to accept old integer values (backward compatibility) 0.9-pre-9 (2003/07/04) ---------------------- * API change (see mailing-list archives): Added EditingContext.insert(), delete(), fetch(), fetchCount(), autoInsertion(), setAutoInsertion(). Added CustomObject.globalID(). Added KeyValueCoding.valuesForKeys(). DEPRECATED methods KeyValueCoding.setValueForKey(), setValueForKeyPath(), setStoredValueForKey() (will be removed in v0.9.1) * Added SortOrdering.sortOrderingsWithString() * documentation: added Project's status page, and contributors. Moved the section on KeyValueCoding and RelationshipManipulation to an 'advanced techniques' part. Added raw material about fetching and inheritance. Updated to reflect the API change. * Fixed: ModelValidation does not issue an error anymore when a model contains a CHAR/VARCHAR field with no width set, as long as the underlying adaptor supports it (varchar w/o width are valid for: Postgresql, SQLite), as Ernesto Revilla suggested it. Instead, it produces a message at the INFO level. * Fixed bug #757181: under python2.2 AccessArrayFaultHandler was triggered every time the array is accessed, instead of being fired only once. * Fixed: adaptorModel() could raise instead of returning None when model's adaptorName is not set * Fixed: PostgresqlSQLExpression was not correctly escaping '%' (postgresql interprets the backslash char just like python does, hence escaping '%' requires a double backslash in the SQL query) * Fixed bug #753147: fetching twice or more with a given FetchSpecification did not return the same result set (the original FetchSpec was modified) * New adaptor layer for SQLite * Fixed Entity.externalNameForInternalName(): when used with names containing figures (such as i 'db2Id') externalNameForInternalName(nameForExternalName()) was not idempotent Applied a patch submitted by Yannick Gingras. Thanks! * REMOVED dependency for 4Suite (was in 0.9pre8, forgot to announce) * 'TEXT' field now accepts a width to be set (ignored when generating the database schema, but checked, if set, when validating an attribute's value) * Added 'TEXT' as a valid sql datatype for the Postgresql adaptor * Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier string definition * Fixed: the User's Guide as pdf failed to print for acrobat reader v4+, because of hyperlinks. Thanks to Ernesto Revilla for reporting and identifying the problem. 0.9-pre-8 (2003/05/27) --------- * Loading a xml-model is now 5 to 6x faster: applied a patch submitted by Yannick Gingras <ygi...@yg...>. Thanks! * Fixed: creating/dropping a database could fail because of trying to rollback a cursor in autocommit mode [Merged from brch-0_9pre6-1-ModelMasons_base_generation_scheme] Summary: the ''base'' generation scheme has changed. Instead of putting Writer.py and WriterBase.py in the same package, it now generates a subpackage 'MDL' in which the base classes are dropped. * Added tests/test_generate_python_code.sh: tests the generation of python code in different situations, and it also checks that the appropriate python test (such as test_EditingContext_Global.py) succeeds with the generated code. Also added: xmlmodels/model_StoreEmployees.xml[2|3] * Updated documentation for ModelMason and PyModelMason * Added fake_mode to ModelMason, PyModelMason and option -n/--dry-run in mdl_generate_python_code * scripts/mdl_generate_python_code (option -B), PyModelMason.checkModelIsValid()): the 'base' scheme cannot generate a python-package from a model where a class and at least one of its (direct or indirect) subclasses leave in the same module. This is now checked and correctly reported when the generation cannot be done. * Added the 'MDL' sub-directory containing the files that are overwritten when mdl_generate_python_code.py (option: -B) regenerates a package [/merge] * RFE #726839: Added environment variable MDL_DB_CONNECTIONS_CFG; it points to a single ini-file which centralizes the sensitive informations contained in each model's database connection dictionary (username, password). See tests/Postgresql.cfg for an example. 0.9-pre-7.1 (2003/05/08) ----------- * Forgot to include mdl_compile_model.py 0.9-pre-7 (2003/05/06) --------- * Fixed DatabaseChannel.fetchObject(): it was not MT-safe wrt Database snapshots' caching in some circumstances (see comments in the code for further details) * Added scripts/mdl_compile_model.py and update the __init__.py generated by mdl_generate_DB_schema.py so that it automatically tries to load the pickled model. Using the pickled model is *much* faster than loading the model from its xml description. * Fixed AbstractDBAPI2Adaptor.create/dropDatabaseWithAdmin.Conn.Dict.(): under some circumstances it was possible that createDB() fails when called just after the drop, fails (see comments in the code for details) * Fixed mdl_generate_DB_schema: some options ('-t -p -s -f -F) were silently ignored * Added a field 'comment' for Model, Entity, Attribute & Relationship, after a suggestion by Yannick Gingras 0.9-pre-6 (2003/04/22) Project milestone -- no public release --------- * ModelMasons: added a new generation scheme. The existing one is named 'compact', the new one, 'base'. The latter generates two different modules for a given entity, in modules <className> (which is not overwritten when re-generating) and <className>Base (which IS overwritten upon regeneration) * Refactored ModelMasons: ModelMason and PyModelMason are now clearer than they used to be. See PyModelMason for an example of use. Fixed: bug #710817 Fixed Python_bricks/module.tmpl: do not generate e.g. setId() if 'id' is a primary key marked as a class property * Fixed: name clash for invalidatesObjectsWhenFinalized in EditingContext Default behaviour is now set with EditingContext.invalidatesObjectsWhenFinalized_default * Fixed: an newly inserted object with a PK, say, 'id', marked as class property did not get its value after EditingContext.saveChanges(). [Details in: EditingContext.handleNotification()] Thanks to soif <Jer...@fi...> for identifying and reporting the pb. * Fixed SQLExpression.sqlStringForAttributeNamed(): now raises ValueError with an explicit message when it receives an invalid attribute's name 0.9-pre-5 (2003/03/17) Project milestone -- no public release --------- * Attribute: fixed defaultValueAsPythonStatement() and convertStringToAttributeType(): they were failing to operate properly under python2.2 (StringType.__name__ is 'string' for py2.1, 'str' for py2.2) * Fixed Entity.objectsPathForKeyPath(): under some circumstances it did not raise ValueError as expected for an invalid keypath * scripts/mdl_validate_model.py fixed: ValueError could be raised when no messages were issued at the INFO level * Fixed ModelValidation.validateEntity_internals(): now iterates on all primary keys, and correctly report an error when a PK is set to be a class property but does not have a default value set to integer zero (this is now enforced since when the default value is None, we get an erroneous error message at EC.saveChanges(): the validation mechanism fails on validating the PK --thanks to Yannick Gingras for reporting the problem) * Fixed Attribute.initWithXMLDOMNode(): it was possible that the defaultValue was set prior to the attribute's type, hence it didn't get the right value (e.g. a default value being string '0' instead of integer 0 for a type=='int') 0.9-pre-4 (2003/03/14) Second release candidate for 0.9 --------- * Documentation: - The web-site has been reviewed and re-organized, thanks Mario! - Added chapter ''Integration in an application'' to the User's Guide * EditingContext + saveChangesInEditingContext(): now locks 'self' before proceeding, so that two nested \class{EditingContext} which have the same parent and are managed by two different threads can concurrently save their changes to their parent without explictly locking it. (this is logical since a EC is supposed to perform any of its operations safely in a multi-threaded environment --given that it's not shared between threads, obviously) + Fixed objectsWithFetchSpecification(): when a nested EC asks for objects, the result set now correctly includes objects that are inserted in its parent (or grand-parent, etc.) and objects that are marked as deleted in the parent are excluded. See also: tests.test_EditingContext_ParentChild, test_10_child_gets_newly_inserted_objects() and test_11_child_doesnt_get_deleted_objects() * Added Modeling.utilities.EditingContextSessioning (also added ZEditingContextSessioning, see ZModeling) * Changed _invalidatesObjectsWhenFinalized to invalidatesObjectsWhenFinalized, and made it a class member. Added documentation on this, see the User's Guide, section ''Discarding changes: details on the destruction process of an EditingContext'' (doc/UserGuide/ManipulatingGraphOfObjects.tex) * Added 'TEXT' as a valid sql datatype for the MySQL adaptor * Proposed a fix for bug #614261: because of mysql having a strict syntax for sql statements containg JOINs, the default statement produced by SQLExpression led to a syntax error as soon as the supplied qualifier contained a keypath referencing two or more entities, such as in 'pygmalion.books.title'. The bug-item is not closed, waiting for people using the mysql adaptor to confirm it behaves as expected. See also: test_EditingContext_Global.test_14_qualifierWithNullValue() & test_11_allQualifierOperators() * Bug #699046: when an invalid sql data type is encountered at runtime, the message is now much more informative than it used to be (i.e. it now indicates clearly where the error comes from) cf. SQLExpression v1.14 * Bug #699272: Fixed DBChannel.selectCountObjectsWithFetchSpecification: was not closing the underlying adaptorChannel when finished Related tests added: in test_EditingContext_Global.py, test_01c_objectsWithFetchSpecification_closes_adaptorChannel() test_13b_objectsCountWithFetchSpecification_closes_channel() Note: this made a bug triggered in psycopg when two threads are using the same cursor more likely to happen (when used in Zope e.g.) See discussion at http://lists.initd.org/pipermail/psycopg/2003-March/001885.html 0.9-pre-3 (2003/03/02) Release candidate for 0.9 --------- * Added documentation for nested EditingContexts * Fixed bug #690224: EntityClassDescription.classForEntity() raised UnboundLocalError instead of ImportError when the module identified by 'packageName.moduleName' is not found. The message raised along w/ ImportError is now more informative (added a new test in tests.test_EntityClassDescription) * Fixed bug #695671: ModelValidation does not detect INTEGER(width) (same for precision and scale) * optimization of ModelSet.addModel(): it now iterates on its own entities only once, not for each entity of the added model 0.9-pre-2 (2003/02/23) --------- This release is known to be stable in two different production environments for about 4 months now. Full description of these environments will be publicly released with v0.9. * Feature Request #617997: "Nested EditingContexts" Added/Implemented: isaChildOf(), saveChangesInEditingContext() Modified: faultForGlobalID(), initializeObject() Documentation for this feature will be available when 0.9 is released. In the meantime users can refer to tests/test_EditingContext_ParentChild.py for example of use. While committing the changes I noticed that two bugs might exist in a very specific situation --i.e. when an object is inserted then deleted in an EC, provided that ec.saveChanges() is not called in the meantime. See the announce on sourceforge's mailing-list for more details. 0.9-pre-1 (2003/02/23) Project milestone, CVS-tagged but no public tarball --------- * EditingContext and related changes in DatabaseContext: [committed in EC v1.15 and DBContext v1.13] - Fixed deleteObject(): it failed when called on an previously inserted object (inserted, but not saved): 1. _insertedObjects was not examined, only _pendingInsertedObjects, and 2. deleting an inserted object wrongly registered it in the list of deleted objects, instead of simply forgetting it. - Updated docstrings for (all)inserted/updated/deletedObjects() - Changed: objectsWithFetchSpecification(): the result set now includes inserted objects even if they have not been saved yet ; it also does not include any more the objects that have been marked for deletion. This makes this method reflect the changes made in the EditingContext rather than the sticking to the database state. Similarly, DatabaseContext.objectsWithFetchSpecification() does NOT take anymore about deleted objects in the calling editing context. This participates of the same logic: a DBContext has no internal state and should not be aware of any changes made in an ObjectStore somewhere higher in the ObjectStore hierarchy. cf.: test_01b_objectsWithFetchSpecification_and_insertObject in test_EditingContext_Global - GlobalIDChangedNotification is now correctly used for notifying observers that an inserted object as been saved, thus has received a KeyGlobalID in remplacement for its TemporaryGlobalID. Changes made in: - EC.recordChanges(): register the EC as an observer - EC.handleNotification() - DatabaseContext.finalizeCommitChanges() posts the notification, when appropriate, instead of doing the real job on behalf of the EC. - Implemented: ownsObject() * CustomObject: fixed snapshot(): now raises ObjectNotRegisteredError when the object is not registered in an EditingContext, or if at least one of the objects it is in relation w/ is not known to the object's EC. + Implemented: updateFromSnapshot() * doc/ + HomePage: removed the frames and replaced them with a html table + Added API for Modeling and Notification (online+tarballs), generated by epydoc 0.8.6 (2003/02/21) ----- * doc/ Committed changes on abstract.tex & UserGuide's CustomObject.tex, DefiningaModel.tex and ManipulatingGraphOfObjects.tex on behalf of Mario Ruggier who reviewed, corrected and enhanced the documentation. Thanks a lot! + HomePage/ re-organized (this part is used to generate the w3 site http://modeling.sourceforge.net) * DatabaseContext: Fixed: adaptor channels are expected to be closed when any of the following operations terminates: fetch (ec.objectsWithFetchSpec), insert, update or delete (ec.saveChanges). The later (saveChanges()) did not close the underlying adaptorChannel. (see tests.test_AdaptorLayer.test_01_adaptorChannels_are_closed() and DatabaseContext._endTransaction()) * Database Adaptors: + AdaptorChannel API: modified the contract for closeChannel(): an already closed adaptor channel should not fail when receiving the closeChannel() message --however in this situation adaptorChannelDidClose() should not be sent to the AdaptorContext. + AbstractDBAPI2AdaptorContext.adaptorChannelDidClose(): now closes the db-connection when closing the last opened AdaptorChannel. This behaviour can be changed by setting the environment variable MDL_PERMANENT_DB_CONNECTION. + fixed PGAdaptorContext.adaptorChannelDidClose(): do not try to rollback a db-connection which has been already closed. * DatabaseChannel.cancelFetch(): forgot to close the underlying adaptor channel. Fixed. * environment variables are now prefixed w/ 'MDL_': MDL_POSTGRESQL_SERVER_VERSION, MDL_ENABLE_DATABASE_LOGGING, MDL_PREFERRED_PYTHON_POSTGRESQL_ADAPTOR * DatabaseContext: - fixed arrayFaultForGlobalID() signature which did not follow the specification of interfaces.ObjectStoreInterface - fixed performChanges(): it was possible for a toMany snapshot stored in object Database (responsible for snapshots) to get out-of-sync with the database, when an object got no modification but in one (or more) of its toMany-relationships. After it occured, any other EditingContext was obtaining that out-of-sync toMany snapshot and when it was triggered, the framework did try to fetch, for the best, an object that still exists but shouldn't be related, for the worse an object that was removed from the database. (see also: comments left in the source) (specifically tested in: test_EC_Global.test_16_toManySnapshotsUpdated) 0.8.5 (2003/02/10) ----- * EditingContext: - added: exception ObjectNotRegisteredError now raised by: deleteObject() - added: allInsertedObjects(), allUpdatedObjects, allDeletedObjects() see docstrings for details - implemented: arrayFaultWithSourceGlobalID() - UniquingTable: added support for ``root GlobalID'', and fixed addObjectForGlobalID(), forgetObject(), forgetObjectForGlobalID(), hasObject(). This fixes the following bug: when a relationship to an entity having a parent entity was triggered, it was possible to get a fault instead of the real object (when that object was already set). Cf. test_EditingContext_Global_Inheritance.test_05b_toOneFault_uniquing for more detail Note: this bug is only triggered by a given sequence of events, when different relationships point to different entities which are parents/children. * Relationship.SimpleRelationship: - validateValue(): validation of a value being a fault now immediately succeeds and returns. We do not want to trigger faults when validating the values, faults are considered okay wrt. the validation logic. - setMultiplicityUpperBound() now accepts '*' for -1 (unconstrained toMany relationships) * ObjectStoreCoordinator: - fixed arrayFaultWithSourceGlobalID() which was not returning any value - Followed the change in the ObjectStore API: now implements ownsObjects() instead of handlesObject(). - Misc: fixed a typo in saveChangesInEditingContext()/error msg. when changes are rolled back" Modeling/ObjectStoreCoordinator.py * QualifierParser.qualifierWithQualifierFormat: now allows upper-case for the first character in a key (e.g. "AGE == NULL") (see also tests.test_Qualifier.test_07_qualifierWithQualifierFormat4) * GlobalID: fixed KeyGlobalID.keyValues(): was returning the internal dictionary, making it possible to inadvertently change its read-only state. * Entity: Added: (module) primaryKeyForGlobalID() (class) primaryKeyForGlobalID() and primaryKeyForRow() +Some docstrings now uses utils.finalize_docstrings * Adaptor: Added CannotSerializeException. adaptorWithName() now includes the traceback in the message of exception AdaptorImportError when an adaptor cannot be loaded' * tests: fixed test_Model.py (could not run individually, missing import) 0.8.4 (2003/02/04) ----- * Added script: mdl_generate_python_code * Renamed scripts: generate_DB_schema.py -> mdl_generate_DB_schema.py validate_model.py -> mdl_validate_model.py * Fixed: mdl_generate_DB_schema.py: option '-A' wrongly required '--admin-dsn=' to be set * ModelMasons.ModelMason: added verbose_mode on init ModelMasons.PyModelMason: (id.) + fixed __init__: now correctly initializes productBaseDirectory() as requested by the superclass ModelMason 0.8.3 (2003/02/02) ----- * User Guide / Chapter 2. Defining a model rewritten. The subject of this chapter is not centered on the ZModeler anymore, rather it provides a full description of the xml-format used to define a model. * Reorganized the directory Modeling/doc/ * Added: scripts/validate_model.py ModelValidation.ModelValidationException: API change: added has_errors() and levels_of_errors() 0.8.2.1 Forgot to include scripts/ in the tarball ------- 0.8.2 (2003/02/01) ----- * Added scripts/generate_DB_schema.py (-h for help) * Generation of SQL statements: (Modeling, Modeling.interfaces, PostgresqlAdaptorLayer) SchemaGeneration: the three following methods were added in the API: - dropForeignKeyConstraintStatementsForRelationship - dropPrimaryKeyConstraintStatementsForEntityGroup(s) along with their associated constants DropForeignKeyConstraintsKey and DropPrimaryKeyConstraintsKey. The SchemaGeneration.defaultOrderingsForSchemaCreation() has also been corrected (was wrong: alternation of drop+create statements instead of having drop statements come in first, then create statements in reverse-order) + PostgresqlAdaptorLayer: now correctly generates create/drop SQL statements for postgresql versions 7.2 and 7.3. Environment variable 'POSTGRESQL_SERVER_VERSION' allows you to specify with which version of the pg-server you're working with (default: 7.2) [Added for that purpose: PostgresqlAdaptorLayer.pg_utils] Note: this corrects a bug in test_EditingContext_Global.py which, when triggered with the '-r' option (recreate database), was not able to actually recreate the database for pg-server v7.3. Thank you Mario <ma...@ru...> for the bug report! * Postgresql & psycopg: PostgresqlAdaptorContext/adaptorChannelDidClose() now rollbacks the underlying connnection object when using psycopg --if not done, this leads to strange behaviour because changes committed by others are never seen. * SQLExpression: changes in the set of supported SQL datatypes - SQLExpression.valueTypeForExternalTypeMapping(): Removed datetime & timestampz from the list, added date & time - Added MySQL/PostgresqlSQLExpression to the corresponding Database Adaptors Layer: Postgresql: additional supported datatypes are: 'datetime' (warning: not supported anymore for postgresql version>=7.3), 'timestamp without time zone' and 'timestamp with time zone', MySQL: additional supported datatype: 'datetime', removed datatype: 'timestamp' (see DatabaseAdaptors.MySQLAdaptorLayer.MySQLSQLExpression for a complete explanation) NB: ModelValidation has been updated to notify the problem with postgresql and 'datetime' * Database Adaptors logging: - they do not log anymore the password they use when connecting to a database (replaced by 'xxxx' so that a bug-report containing log msgs or tracebacks will not disclose the password by mistake) - it is not activated by default, except for error and fatal msgs. To activate them, set the environment variable ENABLE_DATABASE_LOGGING to any non-empty string. * Fixed Qualifier.QualifierOperatorLike and QualifierOperatorCaseInsensitiveLike: they were failing when comparing the pattern to a value which is not a string, such as an integer or a mxDateTime. * ObjectStore: Added ownsObject(), and made handlesObject() an alias for ownsObject(). * tests.test_EC_Global.test_999_customSQLQuery() fixed: it failed w/ the pypgsql adaptor --see comments in code for details. * PostgreqlAdaptorLayer & MySQLAdaptorLayer: Fixed: useless import statements in __init__ were shadowing modules PostgresqlAdaptor and MySQLAdaptor 0.8.1 ----- * Added python postgresql module PyGreSQL to the list of modules that the PostgresqlAdaptorLayer can use. The PostgresqlAdaptorLayer now checks the environment variable 'PREFERRED_PYTHON_POSTGRESQL_ADAPTOR' * Fixed MANIFEST.in: forgot to include top-level files, mainly INSTALL and DEPENDENCIES. Thanks to Mario <ma...@ru...> for reporting the pb. * Fixed KeyValueCoding.valueForKeyPath: a 'map' statement was missing its second argument * misc.: GlobalID's docstrings updated. 0.8 (First distribution under the GPL) --- * Added MANIFEST.in * DatabaseAdaptors/ moved back to the Modeling/ dir. * EditingContext's new feature: it can now examine updated and inserted objects to detect the newly created objects in relation, so that they are in turn inserted into the EditingContext. CustomObject (resp.) ClassDescription has a new method to support this feature: propagateInsertionWithEditingContext (resp. propagateInsertionForObject) EC.insertObject() was consequently changed to issue a warning instead of raising ValueError when it is called with an already registered object AND EditingContext.propagatesInsertionForRelatedObjects() is true * Fixed Entity.add/remove properties: now that properties are stored in a dictionary, we need an explicit self._p_changed=1. This was causing a bug in the ZModelizationTool: changes were not persistent between two restarts or refresh. * misc.: - fixed SchemaGeneration.primaryKeyConstraintStatementsForEntityGroup() (misbehaviour when an entity has no PK) - fixed AccessArrayFaultHandler.isFault() - fixed utils.isListOrTuple(): was: causing Validation to fail, sometimes, on to-many (faulted) relationships - generated python modules: attributes and relationships are now sorted by name in the generated python (makes the diff between versions a lot easier) ; added support for DateTime field * Modeling Layer: entities, attributes and relationships are now saved in the alphabetical ordre in the XML file ; this makes a diff (between two CVS versions, e.g.) much more useful * Added None/NULL value as valid r-values in QualifierParser * Added support for KeyComparisonQualifier in SQLExpression ; example: qual=Qualifier.qualifierWithQualifierFormat('pygmalion.lastName==lastName') * Removed '=' from the list of valid operators in qualifier strings 0.7a5-1 ------- * Corrected buggy setup.py 0.7a5 ----- * Added: module ModelValidation that takes care of checking a whole model against classic mistakes. * SQLExpression: added valueTypeForExternalTypeMapping() to identify the valid SQL types (and their mapping) * Optimization: CustomObject (caches its classDescription), ObserverCenter (CVS v1.5), Entity/Attribute/Relationship (optimized attr./rel.Named()) Approximative gain for E.C.inserts+saveChanges: 25% 0.7a4 ----- * Fixed QualifierParser.QualifierScanner.t_string(): did not accept empty string as values (ex.: title="") * Fixed AccessArrayFaultHandler: did not respond to isFault(), hence Validation could fail when examining an object which holds a toMany fault * ObjectsStore.faultForGlobalID(): EditingContext now implements it, while ObjectStoreCoordinator's has been fixed. * Removed dependencies from package inQual.utils --and included its module 'delegation' in the distribution, with authorization of its copyright holder * DatabaseAdaptors are now available as Modeling.DatabaseAdaptors * Added 'DATETIME' to the list of supported SQL type * Fixed Attribute.validateValue(): now considers that 'int' and 'long int' types are equivalent. * Fixed a silly bug in DatabaseContext._objectSnapshotToDBOperatorSnapshots (called by recordChangesInEditingContext): iteration on a list being modified while iterating was causing some TemporaryGlobalIDs to be recorded as toManySnapshots in Database. * Added 'objectsCountWithFetchSpecification()' to ObjectStore interface and all conforming classes (EditingContext, ObjectStoreCoordinator, DatabaseContext) --plus supporting methods: DatabaseChannel.selectCountObjectsWithFetchSpecification() & AdaptorChannel.rowCountForSelectAttributes(). * ObjectStoreCoordinator.saveChangesInEditingContext(): exception raised in case a problem occurs with the underlying db adaptor(s) now holds a more explicit message (it was just raising RuntimeError with no further indication) * Validation: error messages are now more explicit (at least, they present the object on which the validation failed) * Fixed DatabaseChannel.fetchObject() and FaultHandler.AccessFaultHandler: the way faults were resolved was buggy ; it was failing miserably when the corresponding object's class is in a class hierarchy. That mis-behaviour was also propagated to other instanciated EditingContexts. * Fixed SortOrdering: was failing when called with compound keyPath (such as 'attribute1.attribute2') * Fixed Relationship.validateValue() which was failing when supplied value was a list [tuple was ok] * Python-code templates generation now includes a 'setup.py' * Fixed DatabaseContext.availableChannel(): a stupid mistake caused a DatabaseChannel, and, hence, an AdaptorChannel [i.e. a new connection to the DB] to be created each time the function was called. * Fixed bug #599602: EditingContext.processRecentChanges() was marking a deleted object as 'updated' as well --this occurred when the deleted object has at least one relationship marked as 'DELETE_NULLIFY'. * Added logging module: a central module where all logging methods used in the framework are declared. Special methods 'db_' specifically log all actions that are forwarded to a concrete database connection. * Support for python2.2: Fixed Attribute.py and ObserverCenter.py * Fixed DatabaseChannel.fetchObject(): was incorrectly refreshing the Database' snapshot, if any, when fetching. * Fixed bug #598167: there was a possibility for a single row to have multiple faults registered in a single EditingContext ; this only occured when different entities has toOne relationship to different entities participating to the same inheritance hierarchy. * Fixed bug #598164: [KeyGlobalID] buggy computation of hash-code ; plus: explicitly made Temporary/KeyGlobalID immutable types. * Fixed module DatabaseContext's registeredDatabaseContextForModel() * Fixed buggy __set/get/delitem__ in AccessArrayFaultHandler (toMany faults) * Added ModelMasons/Python_bricks/__init__.py: stupid forgetting of mine preventing template-code to be generated, since we switched from cheetah templates (.tmpl) to cheetah compiled-templates (.py) to generate python code. 0.7a3 ----- * added full support for inheritance in the core * generation of code templates: support inheritance, support for dotted notation in Model's packageName, support for the new Entity's property 'moduleName'. * fixed a bug in DatabaseContext.prepareForSaveWithCoordinator(): was failing in some configuration when newly inserted objects were in relations with each other before being saved. * fixed a bug in EditingContext.deleteObject(): when supplied object was a fault, the propagation of deletion could be correctly achieved. Now triggers the fault prior to processRecentChanges(). * Corrected Qualifier.py and QualifierParser.py: I forgot the operator '!=' (not equal) * documentation: updated ; and its format was moved from structured-text to LaTeX * SchemaGeneration: now adds 'INITIALLY DEFERRED' to referential constraints (see docstring for foreignKeyConstraintStatementsForRelationship()) * fixed SQLExpression for 'OR' operator * fixed setup.py to cheetah-compile templates before installing: now it is fully functional 0.7a2 ----- * fixed DatabaseContext.objectsWithFetchSpecification() so that objects marked as deleted in the requesting EditingContext are not in the returned sequence of matching objects * fixed EditingContext.saveChanges(): now asks the ObserverCenter for subsequent notifications of changes on the objects it holds. Also forgetObject() after deletion has been transmitted to the DB backend. * Optimized ObserverCenter, heavily used in willChange(). Optimization factor: around 80! 0.7a1 ----- [first public release] -- |
From: <sbi...@us...> - 2003-08-09 11:16:54
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv12332/Modeling Removed Files: CHANGES Log Message: Moved CHANGES to the top-level directory --- CHANGES DELETED --- |
From: <sbi...@us...> - 2003-08-09 11:00:32
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv8829 Modified Files: CHANGES Log Message: Fixed bug #785434: mdl_generate_DB_schema now detects when the database (file)name in dsn and in the admin-dsn are not the same. Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** CHANGES 3 Aug 2003 14:04:11 -0000 1.144 --- CHANGES 9 Aug 2003 11:00:27 -0000 1.145 *************** *** 8,11 **** --- 8,14 ---- -------------------------------------------------------- + * Fixed bug #785434: mdl_generate_DB_schema now detects when the database + (file)name in dsn and in the admin-dsn are not the same. + 0.9-pre-12 (2003/08/03) ----------------------- |
From: <sbi...@us...> - 2003-08-09 11:00:29
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv8829/scripts Modified Files: mdl_generate_DB_schema.py Log Message: Fixed bug #785434: mdl_generate_DB_schema now detects when the database (file)name in dsn and in the admin-dsn are not the same. Index: mdl_generate_DB_schema.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/scripts/mdl_generate_DB_schema.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mdl_generate_DB_schema.py 2 Aug 2003 08:39:18 -0000 1.5 --- mdl_generate_DB_schema.py 9 Aug 2003 11:00:26 -0000 1.6 *************** *** 334,337 **** --- 334,345 ---- if user_connection_dict: model.setConnectionDictionary(user_connection_dict) + + # SQLite specifics, bug #785434 + if model.adaptorName() == 'SQLite': + dsn_db_name = model.connectionDictionary()['database'] + admin_dsn_db_name = admin_connection_dict['database'] + if dsn_db_name != admin_dsn_db_name: + raise ValueError, "Database name in the dsn (%s) and in the admin-dsn (%s) should be the same for SQLite"%(dsn_db_name, admin_dsn_db_name) + result=databaseSchemaWithOptions(model, _defaultOptions, administrativeConnectionDictionary=admin_connection_dict, |
From: <sbi...@us...> - 2003-08-03 14:39:01
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv26668/tests Modified Files: README Log Message: Updated Index: README =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README 31 Jul 2003 21:01:55 -0000 1.9 --- README 3 Aug 2003 14:38:58 -0000 1.10 *************** *** 4,7 **** --- 4,9 ---- Test the installation of the Modeling framework + All the tests should be run in the tests/ directory + ============================================= Pre-conditions: *************** *** 36,39 **** --- 38,43 ---- python ./test_AdaptorLayer.py # requires 'test_EditingContext_Global.py -r', above + + sh ./test_generate_python_code.sh # tests script mdl_generate_python_code.py ============================================= |
From: <sbi...@us...> - 2003-08-03 14:31:31
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv25647/tests Modified Files: test_SQLExpression.py Log Message: Fixed test_06 Index: test_SQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_SQLExpression.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_SQLExpression.py 3 Aug 2003 10:34:15 -0000 1.7 --- test_SQLExpression.py 3 Aug 2003 14:31:27 -0000 1.8 *************** *** 167,173 **** lock=0, fetchSpec=fs) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.FK_WRITER_ID, t0.PRICE FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t2.LAST_NAME = 'Rabelais'") # None/NULL value q=qualifierWithQualifierFormat('author.pygmalion.books.price == None"') fs=FetchSpecification.FetchSpecification('Book', --- 167,174 ---- lock=0, fetchSpec=fs) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t2.LAST_NAME = 'Rabelais'") # None/NULL value + sqlExpr=SQLExpression(book) q=qualifierWithQualifierFormat('author.pygmalion.books.price == None"') fs=FetchSpecification.FetchSpecification('Book', *************** *** 176,180 **** lock=0, fetchSpec=fs) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.FK_WRITER_ID, t0.PRICE, t0.id, t0.title, t0.FK_WRITER_ID, t0.PRICE FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN ( WRITER t2 INNER JOIN BOOK t3 ON t2.ID=t3.FK_WRITER_ID ) ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t3.PRICE IS NULL") def test_07_prepareSelectExpressionWithAttributes_02(self): --- 177,181 ---- lock=0, fetchSpec=fs) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN ( WRITER t2 INNER JOIN BOOK t3 ON t2.ID=t3.FK_WRITER_ID ) ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t3.PRICE IS NULL") def test_07_prepareSelectExpressionWithAttributes_02(self): *************** *** 189,193 **** fetchSpec=fetchSpec) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.FK_WRITER_ID, t0.PRICE FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t2.LAST_NAME = t1.LAST_NAME") def test_suite(): --- 190,194 ---- fetchSpec=fetchSpec) self.assertEqual(sqlExpr.statement(), ! "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=t2.ID ) ON t0.FK_WRITER_ID=t1.ID WHERE t2.LAST_NAME = t1.LAST_NAME") def test_suite(): |
From: <sbi...@us...> - 2003-08-03 14:05:58
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv22138 Modified Files: MANIFEST.in Log Message: Added MIGRATION Index: MANIFEST.in =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/MANIFEST.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MANIFEST.in 31 Jul 2003 16:38:17 -0000 1.10 --- MANIFEST.in 3 Aug 2003 14:05:56 -0000 1.11 *************** *** 2,5 **** --- 2,6 ---- include DEPENDENCIES include INSTALL + include MIGRATION include TODO include Modeling/COPYING |
From: <sbi...@us...> - 2003-08-03 14:05:28
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv22095 Added Files: MIGRATION Log Message: Added --- NEW FILE: MIGRATION --- -*- text -*- You'll find here all informations relevant when upgrading the framework to a newer version. Upgrading to 0.9pre12 ----------------------- * CustomObject.snapshot() changed: the returned value for to-many relationship is no longer 'None' when the related array is still a fault, but an instance of CustomObject.Snapshot_ToManyFault. Refer to the documentation of this class, and to the documentation for CustomObject's snapshot, for a complete discussion on this topic. |
From: <sbi...@us...> - 2003-08-03 14:04:50
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv21920 Modified Files: vertoo.data Log Message: Release 0.9pre12 Index: vertoo.data =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/vertoo.data,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** vertoo.data 31 Jul 2003 20:50:46 -0000 1.5 --- vertoo.data 3 Aug 2003 14:04:47 -0000 1.6 *************** *** 1,2 **** ! mdl-code = major:0; minor:9; pre:11; release:x; date:Jul 28, 2003; ! mdl_doc = major:0; minor:9; pre:11; release:x; date:Jul 28, 2003; \ No newline at end of file --- 1,2 ---- ! mdl-code = major:0; minor:9; pre:12; release:x; date:Aug 3, 2003; ! mdl_doc = major:0; minor:9; pre:12; release:x; date:Aug 3, 2003; \ No newline at end of file |
From: <sbi...@us...> - 2003-08-03 14:04:14
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage In directory sc8-pr-cvs1:/tmp/cvs-serv21818/Modeling/doc/HomePage Modified Files: main.tex downloads.tex Log Message: Release 0.9pre12 Index: main.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/main.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** main.tex 3 Aug 2003 10:53:26 -0000 1.22 --- main.tex 3 Aug 2003 14:04:11 -0000 1.23 *************** *** 7,11 **** % Increment the release number whenever significant changes are made. % The author and/or editor can define 'significant' however they like. ! %\release{0.9-pre-11} % At minimum, give your name and an email address. You can include a --- 7,11 ---- % Increment the release number whenever significant changes are made. % The author and/or editor can define 'significant' however they like. ! %\release{0.9-pre-12} % At minimum, give your name and an email address. You can include a *************** *** 13,17 **** \author{S\'ebastien Bigaret} \email{sbi...@us...} ! \date{Jul 28, 2003} %\date{\today} --- 13,17 ---- \author{S\'ebastien Bigaret} \email{sbi...@us...} ! \date{Aug 3, 2003} %\date{\today} Index: downloads.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/downloads.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** downloads.tex 28 Jul 2003 11:00:30 -0000 1.13 --- downloads.tex 3 Aug 2003 14:04:11 -0000 1.14 *************** *** 10,14 **** \begin{enumerate} ! \item[\bf Current version: 0.9-pre-11] Download it here:\begin{rawhtml}<a --- 10,14 ---- \begin{enumerate} ! \item[\bf Current version: 0.9-pre-12] Download it here:\begin{rawhtml}<a |
From: <sbi...@us...> - 2003-08-03 14:04:14
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv21818 Modified Files: setup.py Log Message: Release 0.9pre12 Index: setup.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/setup.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** setup.py 31 Jul 2003 16:39:07 -0000 1.29 --- setup.py 3 Aug 2003 14:04:11 -0000 1.30 *************** *** 46,50 **** setup(name="ModelingCore", ! version="0.9-pre-11", licence ="GNU General Public License", description=short_description, --- 46,50 ---- setup(name="ModelingCore", ! version="0.9-pre-12", licence ="GNU General Public License", description=short_description, |
From: <sbi...@us...> - 2003-08-03 14:04:14
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc In directory sc8-pr-cvs1:/tmp/cvs-serv21818/Modeling/doc Modified Files: UserGuide.tex Tutorial.tex Log Message: Release 0.9pre12 Index: UserGuide.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** UserGuide.tex 28 Jul 2003 18:27:35 -0000 1.26 --- UserGuide.tex 3 Aug 2003 14:04:11 -0000 1.27 *************** *** 12,18 **** % the rest is at your discretion. \authoraddress{Email: \email{sbi...@us...}} ! \date{Jul 28, 2003} %\date{\today} ! \release{0.9-pre-11} %\setreleaseinfo{pre-8} \setshortversion{0.9} --- 12,18 ---- % the rest is at your discretion. \authoraddress{Email: \email{sbi...@us...}} ! \date{Aug 3, 2003} %\date{\today} ! \release{0.9-pre-12} %\setreleaseinfo{pre-8} \setshortversion{0.9} Index: Tutorial.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/Tutorial.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Tutorial.tex 28 Jul 2003 11:00:30 -0000 1.7 --- Tutorial.tex 3 Aug 2003 14:04:11 -0000 1.8 *************** *** 14,18 **** \date{February 10, 2003} %\date{\today} ! \release{0.9-pre-11} %\setreleaseinfo{5} \setshortversion{0.9} --- 14,18 ---- \date{February 10, 2003} %\date{\today} ! \release{0.9-pre-12} %\setreleaseinfo{5} \setshortversion{0.9} |
From: <sbi...@us...> - 2003-08-03 14:04:14
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv21818/Modeling Modified Files: CHANGES Log Message: Release 0.9pre12 Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** CHANGES 3 Aug 2003 10:34:14 -0000 1.143 --- CHANGES 3 Aug 2003 14:04:11 -0000 1.144 *************** *** 3,10 **** Module Modeling --------------- ! Current release is: 0.9-pre-11 / See also: TODO, INSTALL and doc/ * ** Distributed under the GNU General Public License ** -------------------------------------------------------- * Fixed bug #780495: when ec.fetch() is joining two tables or more, the --- 3,13 ---- Module Modeling --------------- ! Current release is: 0.9-pre-12 / See also: TODO, INSTALL and doc/ * ** Distributed under the GNU General Public License ** -------------------------------------------------------- + + 0.9-pre-12 (2003/08/03) + ----------------------- * Fixed bug #780495: when ec.fetch() is joining two tables or more, the |
From: <sbi...@us...> - 2003-08-03 13:59:00
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons/Python_bricks In directory sc8-pr-cvs1:/tmp/cvs-serv21080/ModelMasons/Python_bricks Modified Files: module_base.tmpl Log Message: Fixed header "Generated by...": time was not correctly generated. thanks to Mario Ruggier for reporting it Index: module_base.tmpl =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons/Python_bricks/module_base.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** module_base.tmpl 26 May 2003 15:44:48 -0000 1.3 --- module_base.tmpl 3 Aug 2003 13:58:55 -0000 1.4 *************** *** 2,6 **** #import time import $(base_dir) ! # Generated by mdl_generate_python_code.py / time.strftime("%Y/%m/%d %H:%M") from Modeling.Validation import ValidationException from mx.DateTime import DateTimeFrom --- 2,6 ---- #import time import $(base_dir) ! # Generated by mdl_generate_python_code.py / $(time.strftime("%Y/%m/%d %H:%M")) from Modeling.Validation import ValidationException from mx.DateTime import DateTimeFrom |