equal
deleted
inserted
replaced
409 for label, value in vocab] |
409 for label, value in vocab] |
410 if self.sort: |
410 if self.sort: |
411 vocab = vocab_sort(vocab) |
411 vocab = vocab_sort(vocab) |
412 # XXX pre 3.9 bw compat |
412 # XXX pre 3.9 bw compat |
413 for i, (label, value) in enumerate(vocab): |
413 for i, (label, value) in enumerate(vocab): |
414 if not isinstance(value, basestring): |
414 if value is not None and not isinstance(value, basestring): |
415 warn('[3.9] %s: vocabulary value should be an unicode string' |
415 warn('[3.9] %s: vocabulary value should be an unicode string' |
416 % self, DeprecationWarning) |
416 % self, DeprecationWarning) |
417 vocab[i] = (label, unicode(value)) |
417 vocab[i] = (label, unicode(value)) |
418 return vocab |
418 return vocab |
419 |
419 |