<s> """<STR_LIT>""" <EOL> import threading <EOL> import commonware . log <EOL> from product_details import product_details <EOL> from olympia . search . utils import floor_version <EOL> from olympia . constants . applications import * <EOL> from olympia . constants . base import * <EOL> from olympia . constants . licenses import * <EOL> from olympia . constants . payments import * <EOL> from olympia . constants . platforms import * <EOL> from olympia . constants . search import * <EOL> from . log import ( LOG , LOG_BY_ID , LOG_ADMINS , LOG_EDITORS , <EOL> LOG_HIDE_DEVELOPER , LOG_KEEP , LOG_REVIEW_QUEUE , <EOL> LOG_REVIEW_EMAIL_USER , log ) <EOL> logger_log = commonware . log . getLogger ( '<STR_LIT>' ) <EOL> _locals = threading . local ( ) <EOL> _locals . user = None <EOL> def get_user ( ) : <EOL> return getattr ( _locals , '<STR_LIT:user>' , None ) <EOL> def set_user ( user ) : <EOL> _locals . user = user <EOL> def cached_property ( * args , ** kw ) : <EOL> if args : <EOL> return CachedProperty ( args [ <NUM_LIT:0> ] ) <EOL> else : <EOL> return lambda f : CachedProperty ( f , ** kw ) <EOL> class CachedProperty ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , func , writable = False ) : <EOL> self . func = func <EOL> self . writable = writable <EOL> self . __name__ = func . __name__ <EOL> self . __doc__ = func . __doc__ <EOL> def __delete__ ( self , obj ) : <EOL> if not self . writable : <EOL> raise TypeError ( '<STR_LIT>' ) <EOL> obj . __dict__ . pop ( self . __name__ , None ) <EOL> def __get__ ( self , obj , type = None ) : <EOL> if obj is None : <EOL> return self <EOL> _missing = object ( ) <EOL> value = obj . __dict__ . get ( self . __name__ , _missing ) <EOL> if value is _missing : <EOL> value = self . func ( obj ) <EOL> from caching . base import CachingQuerySet <EOL> if isinstance ( value , CachingQuerySet ) : <EOL> value . _fetch_all ( ) <EOL> obj . __dict__ [ self . __name__ ] = value <EOL> return value <EOL> def __set__ ( self , obj , value ) : <EOL> if not self . writable : <EOL> raise TypeError ( '<STR_LIT>' ) <EOL> obj . __dict__ [ self . __name__ ] = value <EOL> FIREFOX . latest_version = product_details . firefox_versions [ <EOL> '<STR_LIT>' ] <EOL> THUNDERBIRD . latest_version = product_details . thunderbird_versions [ <EOL> '<STR_LIT>' ] <EOL> MOBILE . latest_version = FIREFOX . latest_version <EOL> if FIREFOX . latest_version : <EOL> COMPAT = { FIREFOX . id : ( ) , THUNDERBIRD . id : ( ) , SEAMONKEY . id : ( ) } <EOL> for app in ( FIREFOX , THUNDERBIRD ) : <EOL> for v in range ( int ( float ( floor_version ( app . latest_version ) ) ) , <NUM_LIT:5> , - <NUM_LIT:1> ) : <EOL> v_str = floor_version ( str ( v ) ) <EOL> COMPAT [ app . id ] += ( { <EOL> '<STR_LIT>' : app . id , <EOL> '<STR_LIT>' : v_str , <EOL> '<STR_LIT>' : ( v_str , v_str + '<STR_LIT>' , v_str + '<STR_LIT>' ) , <EOL> '<STR_LIT>' : floor_version ( str ( v - <NUM_LIT:1> ) ) <EOL> } , ) <EOL> COMPAT [ FIREFOX . id ] += ( <EOL> { '<STR_LIT>' : FIREFOX . id , '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' } , <EOL> { '<STR_LIT>' : FIREFOX . id , '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' } , <EOL> ) <EOL> COMPAT [ SEAMONKEY . id ] = ( { <EOL> '<STR_LIT>' : SEAMONKEY . id , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } , ) <EOL> COMPAT = COMPAT [ FIREFOX . id ] + COMPAT [ THUNDERBIRD . id ] + COMPAT [ SEAMONKEY . id ] <EOL> NIGHTLY_VERSION = COMPAT [ <NUM_LIT:0> ] [ '<STR_LIT>' ] <EOL> DEFAULT_MINVER = COMPAT [ <NUM_LIT:4> ] [ '<STR_LIT>' ] <EOL> else : <EOL> logger_log . warning ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> COMPAT = { } <EOL> NIGHTLY_VERSION = '<STR_LIT>' <EOL> DEFAULT_MINVER = '<STR_LIT>' <EOL> import waffle </s>
