#NEWLINE# def api( introduced , deprecated = None , removed = None ) : #NEWLINE# #INDENT# current = tuple ( map ( int , bottle . __version__ . split ( '-' ) [ 0 ] . split ( '.' ) ) ) #NEWLINE# introduced = tuple ( map ( int , introduced . split ( '.' ) ) ) #NEWLINE# deprecated = ( tuple ( map ( int , deprecated . split ( '.' ) ) ) if deprecated else ( 99 , 99 ) ) #NEWLINE# removed = ( tuple ( map ( int , removed . split ( '.' ) ) ) if removed else ( 99 , 100 ) ) #NEWLINE# assert ( deprecated < deprecated < removed ) #NEWLINE# def decorator( func ) : #NEWLINE# #INDENT# if ( current < introduced ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( current < deprecated ) : #NEWLINE# #INDENT# return func #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( current < removed ) : #NEWLINE# #INDENT# func . __doc__ = ( '(deprecated) ' + ( func . __doc__ or '' ) ) #NEWLINE# return assertWarn ( 'deprecationWarning' ) ( func ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return decorator