[gnue] r10257 - in trunk/gnue-common: . src/definitions
[email protected] Thu, 2 Dec 2010 16:25:02 -0600 (CST)
| Newsgroups | gmane.comp.cms.gnue.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: reinhard Date: 2010-12-02 16:25:01 -0600 (Thu, 02 Dec 2010) New Revision: 10257 Modified: trunk/gnue-common/ trunk/gnue-common/src/definitions/GParser.py Log: Automatically log usage of deprecated XML elements or attributes. Property changes on: trunk/gnue-common ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-12-02 22:32:25.151000023 +0100 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: common + timestamp: 2010-12-02 23:22:36.885999918 +0100 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: common Name: bzr:file-ids - src/base/log.py 9758@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgn= ue-common:src%2Fbase%2Flog.py + src/definitions/GParser.py 967@3a364389-8fce-0310-8f11-cc363fde16c7:= trunk%2Fgnue-common:src%2Fdefinitions%2FGParser.py Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] 3141 [email protected] 3142 [email protected] 3143 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] 3141 [email protected] 3142 [email protected] 3143 [email protected] 3144 [email protected] Name: bzr:text-parents - src/base/log.py [email protected]= p3nwxixc + src/definitions/GParser.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3= a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10063 Modified: trunk/gnue-common/src/definitions/GParser.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/src/definitions/GParser.py 2010-12-02 22:24:59 UTC = (rev 10256) +++ trunk/gnue-common/src/definitions/GParser.py 2010-12-02 22:25:01 UTC = (rev 10257) @@ -367,6 +367,10 @@ # The definition for this tag elementDefinition =3D self.xmlElements [tname] =20 + if 'Deprecated' in elementDefinition: + log.deprecated("<%s> is deprecated: %s", tname, + elementDefinition['Deprecated']) + # Check whether this tag is valid for the current parent # TEMP HACK for reports 'and not ns', # this check is not needed if tags are root in namespace @@ -417,15 +421,17 @@ % {'tagname': tname, 'attribute': attr}, self.url, self.parser.getLineNumber ()) =20 + if 'Deprecated' in baseAttrs[attr]: + log.deprecated("<%s %s=3D...> is deprecated: %s", tname, att= r, + baseAttrs[attr]['Deprecated']) =20 valueset =3D baseAttrs[attr].get('ValueSet', {}) if valueset and not valueset.has_key(attrvalue): # FIXME: This should raise an exception. Only issue a warnin= g # for now to stay compatible with earlier versions that didn= 't - # check this at all. - assert log.debug( - "DEPRECATION WARNING: %s not a valid value for %s.%s= " \ - % (attrvalue, tname, attr)) + # check this at all. Change to an exception with 0.8 + log.deprecated("%s not a valid value for %s.%s", attrvalue, = tname, + attr) #raise InvalidValueSetError (item, object, # data ['ValueSet'].keys ()) =20