web/formfields.py
changeset 4499 4f741341d96f
parent 4495 99c18d3f9542
child 4528 a51f37efc882
equal deleted inserted replaced
4498:ee6362b4618d 4499:4f741341d96f
   262                 if getattr(self.choices, 'im_self', None) is self:
   262                 if getattr(self.choices, 'im_self', None) is self:
   263                     vocab = self.choices(form=form, **kwargs)
   263                     vocab = self.choices(form=form, **kwargs)
   264                 else:
   264                 else:
   265                     vocab = self.choices(form=form, field=self, **kwargs)
   265                     vocab = self.choices(form=form, field=self, **kwargs)
   266             except TypeError:
   266             except TypeError:
   267                 warn('[3.6]  %s: choices should now take '
       
   268                      'the form and field as named arguments' % self,
       
   269                      DeprecationWarning)
       
   270                 try:
   267                 try:
   271                     vocab = self.choices(form=form, **kwargs)
   268                     vocab = self.choices(form=form, **kwargs)
       
   269                     warn('[3.6]  %s: choices should now take '
       
   270                          'the form and field as named arguments' % self,
       
   271                          DeprecationWarning)
   272                 except TypeError:
   272                 except TypeError:
   273                     warn('[3.3]  %s: choices should now take '
   273                     warn('[3.3]  %s: choices should now take '
   274                          'the form and field as named arguments' % self,
   274                          'the form and field as named arguments' % self,
   275                          DeprecationWarning)
   275                          DeprecationWarning)
   276                     vocab = self.choices(req=form._cw, **kwargs)
   276                     vocab = self.choices(req=form._cw, **kwargs)