#NEWLINE# def _add_file_from_data( self , key , value ) : #NEWLINE# #INDENT# 'Called in the EnvironBuilder to add files from the data dict.' #NEWLINE# if isinstance ( value , tuple ) : #NEWLINE# #INDENT# self . files . add_file ( key , * value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , dict ) : #NEWLINE# #INDENT# from warnings import warn #NEWLINE# warn ( DeprecationWarning ( "it's no longer possible to pass dicts as `data`.  Use tuples or FileStorage objects instead" ) , stacklevel = 2 ) #NEWLINE# value = dict ( value ) #NEWLINE# mimetype = value . pop ( 'mimetype' , None ) #NEWLINE# if ( mimetype is not None ) : #NEWLINE# #INDENT# value [ 'content_type' ] = mimetype #NEWLINE# #UNINDENT# self . files . add_file ( key , ** value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . files . add_file ( key , value )