<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import logging <EOL> import warnings <EOL> class PipDeprecationWarning ( Warning ) : <EOL> pass <EOL> class RemovedInPip8Warning ( PipDeprecationWarning , PendingDeprecationWarning ) : <EOL> pass <EOL> class RemovedInPip9Warning ( PipDeprecationWarning , PendingDeprecationWarning ) : <EOL> pass <EOL> DEPRECATIONS = [ RemovedInPip8Warning , RemovedInPip9Warning ] <EOL> _warnings_showwarning = None <EOL> def _showwarning ( message , category , filename , lineno , file = None , line = None ) : <EOL> if file is not None : <EOL> if _warnings_showwarning is not None : <EOL> _warnings_showwarning ( <EOL> message , category , filename , lineno , file , line , <EOL> ) <EOL> else : <EOL> if issubclass ( category , PipDeprecationWarning ) : <EOL> logger = logging . getLogger ( "<STR_LIT>" ) <EOL> log_message = "<STR_LIT>" % message <EOL> if issubclass ( category , DeprecationWarning ) : <EOL> logger . error ( log_message ) <EOL> else : <EOL> logger . warning ( log_message ) <EOL> else : <EOL> _warnings_showwarning ( <EOL> message , category , filename , lineno , file , line , <EOL> ) <EOL> def install_warning_logger ( ) : <EOL> global _warnings_showwarning <EOL> if _warnings_showwarning is None : <EOL> _warnings_showwarning = warnings . showwarning <EOL> warnings . showwarning = _showwarning </s>
