#NEWLINE# def deprecated( value ) : #NEWLINE# #INDENT# "Raises a Python UserWarning if `value` is not None.\n\n    This is typically going to be used inside setter functions for deprecated\n    fields. The deprecation warning shouldn't be raised when the field is being\n    initialized to ``None``.\n\n    " #NEWLINE# if ( fmt is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( is_sequence ( value ) and ( not value ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# fmt = "The use of this field has been deprecated. Received '{0}' object." #NEWLINE# msg = fmt . format ( type ( value ) . __name__ ) #NEWLINE# warnings . warn ( msg )