def runtime_warning (msg): """ Issue a warning that the calling code is deprecated. """ called_from = debug.get_call_locn_str (-3) warnings.warn ("%s %s" % (called_from, msg), RuntimeWarning)
def warn_deprecated (msg='deprecated'): """ Issue a warning that the calling code is deprecated. """ called_from = debug.get_call_locn_str (-3) warnings.warn ("%s %s" % (called_from, msg), DeprecationWarning)