#NEWLINE# def warnAboutFunction( offender , warningString ) : #NEWLINE# #INDENT# '\n    Issue a warning string, identifying C{offender} as the responsible code.\n\n    This function is used to deprecate some behavior of a function.  It differs\n    from L{warnings.warn} in that it is not limited to deprecating the behavior\n    of a function currently on the call stack.\n\n    @param function: The function that is being deprecated.\n\n    @param warningString: The string that should be emitted by this warning.\n    @type warningString: C{str}\n\n    @since: 11.0\n    ' #NEWLINE# offenderModule = sys . modules [ warningString . __module__ ] #NEWLINE# filename = inspect . getabsfile ( offenderModule ) #NEWLINE# lineStarts = list ( findlinestarts ( offender . func_code ) ) #NEWLINE# lastLineNo = lineStarts [ ( - 1 ) ] [ 1 ] #NEWLINE# globals = offender . func_globals #NEWLINE# kwargs = dict ( category = BokehDeprecationWarning , filename = filename , lineno = lastLineNo , module = offenderModule . __name__ , registry = globals . setdefault ( '__warningregistry__' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , module_globals = None ) #NEWLINE# if ( sys . version_info [ : 2 ] < ( 2 , 5 ) ) : #NEWLINE# #INDENT# kwargs . pop ( 'module_globals' ) #NEWLINE# #UNINDENT# warn_explicit ( warningString , ** kwargs )