Changeset 223

Show
Ignore:
Timestamp:
06/09/06 10:07:12 (3 years ago)
Author:
matt
Message:

Use a FutureWarning? because warnings doesn't seem to recognise
PendingDeprecationWarning?.
I also changed the stacklevel. 2 is typically what you want but, in this case,
it's actually the Form instance that creates the Action so there is an extra
call here.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/formal/form.py

    r222 r223  
    5656    """ 
    5757    def __init__(self, callback, name, validate, label): 
    58         self.callback = callback 
     58 
    5959        if not util.validIdentifier(name): 
    6060            import warnings 
    61             warnings.warn('[0.8.3] Invalid identifier %r. This will become an error in future versions' % 
    62                     name,PendingDeprecationWarning,stacklevel=2) 
    63  
     61            warnings.warn('[0.9] Invalid action name %r. This will become an error in the future.' % 
     62                    name, FutureWarning, stacklevel=3) 
     63 
     64        self.callback = callback 
    6465        self.name = name 
    6566        self.validate = validate