コード例 #1
0
ファイル: rcheck.py プロジェクト: agapow/relais.dev
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)
コード例 #2
0
ファイル: rcheck.py プロジェクト: agapow/relais.dev
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)