+
    j                         ^ RI t^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHt  ! R R4      t ! R R	]4      tR# )
    N)util)Arbiter)Configget_default_config_file)debugc                   ^   a  ] tR t^t o RtRR ltR tR tR tR t	R t
R	 tR
 tR tRtV tR# )BaseApplicationzk
An application interface for configuring and loading
the various necessities for any given web framework.
Nc                h    Wn         R V n        R V n        W n        R V n        V P                  4        R # N)usagecfgcallableprogloggerdo_load_config)selfr   r   s   &&&F/var/www/idalgo/venv/lib/python3.14/site-packages/gunicorn/app/base.py__init__BaseApplication.__init__   s-    
	    c                8    V P                  4        V P                  4        R#   \         dk   p\        R\	        T4      ,          \
        P                  R7       \
        P                  P                  4        \
        P                  ! ^4        Rp?R# Rp?ii ; i)z
Loads the configuration
z

Error: %sfileN)	load_default_configload_config	Exceptionprintstrsysstderrflushexitr   es   & r   r   BaseApplication.do_load_config   sc    	$$& 	-#a&(szz:JJHHQKK	s    $ BABBc                R    \        V P                  V P                  R 7      V n        R# ))r   N)r   r   r   r   r   s   &r   r   #BaseApplication.load_default_config)   s    $**4995r   c                    \         hr   NotImplementedError)r   parseroptsargss   &&&&r   initBaseApplication.init-       !!r   c                    \         hr   r*   r'   s   &r   loadBaseApplication.load0   r1   r   c                    \         h)z
This method is used to load the configuration from one or several input(s).
Custom Command line, configuration file.
You have to override this method in your class.
r*   r'   s   &r   r   BaseApplication.load_config3   s
     "!r   c                    V P                  4        V P                  P                  '       d   \        P                  ! 4        R # R # r   )r   r   spewr   r'   s   &r   reloadBaseApplication.reload;   s)    88===JJL r   c                `    V P                   f   V P                  4       V n         V P                   # r   )r   r3   r'   s   &r   wsgiBaseApplication.wsgi@   s#    ==  IIKDM}}r   c                    \        V 4      P                  4        R#   \         db   p\        R T,          \        P
                  R7       \        P
                  P                  4        \        P                  ! ^4        Rp?R# Rp?ii ; i)z
Error: %s
r   N)r   runRuntimeErrorr   r   r    r!   r"   r#   s   & r   r?   BaseApplication.runE   sW    	DM 	/A%CJJ7JJHHQKK	s    B	ABB	)r   r   r   r   r   )NN)__name__
__module____qualname____firstlineno____doc__r   r   r   r/   r3   r   r9   r<   r?   __static_attributes____classdictcell__)__classdict__s   @r   r	   r	      s<     
6"""

 r   r	   c                   V   a a ] tR t^Nt oR tR tR tR tR tR t	V 3R lt
RtVtV ;t# )	Applicationc                   \         P                  ! V P                  P                  4       V P                  P                  \        P                  9  d7   \        P                  P                  ^ V P                  P                  4       R# R# )r   N)oschdirr   r   pathinsertr'   s   &r   rN   Application.chdirS   sM     	  88>>)HHOOAtxx~~. *r   c                h   \         P                  P                  V4      '       g   \        R V,          4      h\         P                  P	                  V4      ^,          p RpVR9   d!   \
        P                  P                  W14      pMXRp\        P                  ! V4       \
        P                  P                  W14      p\
        P                  P                  W1VR7      p\
        P                  P                  V4      pV\        P                  V&   VP                  P                  V4       \/        X4      #   \          do    \#        RT,          \        P$                  R7       \&        P(                  ! 4        \        P$                  P+                  4        \        P,                  ! ^4        Li ; i)z%r doesn't exist
__config__z9configuration file should have a valid Python extension.
)loaderzFailed to read config file: %sr   )z.pyz.pyc)rM   rO   existsr@   splitext	importlibr   spec_from_file_locationwarn	machinerySourceFileLoadermodule_from_specr   modulesrT   exec_moduler   r   r    	traceback	print_excr!   r"   vars)r   filenameextmodule_namespecmsgloader_mods   &&      r   get_config_from_filename$Application.get_config_from_filename\   s1   ww~~h''1H<==ggx(+	&Ko% ~~==kTR		##-->>{U ~~==k\c=d..11$7C'*CKK$KK##C( Cy  	2X=CJJO!JJHHQK		s   CD8 8A6F10F1c                @    \        \        P                  ! V4      4      # r   )ra   rW   import_module)r   rd   s   &&r   get_config_from_module_name'Application.get_config_from_module_namew   s    I++K899r   c           	     J   VP                  R4      '       d!   V\        R4      R pV P                  V4      pM9VP                  R4      '       d   V\        R4      R pMTpV P                  V4      pVP	                  4        FL  w  rVWPP
                  P                  9  d   K!   V P
                  P                  VP                  4       V4       KN  	  V#   \         dE    \        RT: RT: R2\        P                  R7       \        P                  P                  4        h i ; i)z
Loads the configuration file: the file is a python file, otherwise raise an RuntimeError
Exception or stop the process if the configuration file contains a syntax error.
zpython:Nzfile:zInvalid value for z: 
r   )
startswithlenrm   ri   itemsr   settingssetlowerr   r   r   r    r!   )r   locationrd   r   rb   kvs   &&     r   (load_config_from_module_name_or_filename4Application.load_config_from_module_name_or_filenamez   s     y))"3y>?3K22;?C""7++#CLM2#//9CIIKDA)))QWWY*   
  a;#**M

  "s   #*CAD"c                &    V P                  VR 7      # ))rw   )rz   )r   rb   s   &&r   load_config_from_file!Application.load_config_from_file   s    <<h<OOr   c                   V P                   P                  4       pVP                  4       pV P                  WVP                  4      pV P                  4        V'       dD   VP                  4        F/  w  rEV P                   P                  VP                  4       V4       K1  	  VP                  V P                   P                  4       4      pVP                  '       d   V P                  VP                  4       MMVP                  '       d   V P                  VP                  4       M\        4       pVe   V P                  V4       \        V4      P                  4        F>  w  rEVf   K  VR8X  d   K  V P                   P                  VP                  4       V4       K@  	  \        V4      P                  4        F>  w  rEVf   K  VR8X  d   K  V P                   P                  VP                  4       V4       K@  	  V P                  4        R # )Nr.   )r   r,   
parse_argsr/   r.   rN   rs   ru   rv   get_cmd_args_from_envconfigr}   r   ra   )r   r,   r.   r   rx   ry   env_argsdefault_configs   &       r   r   Application.load_config   sv   "  " iidii0 	

 		QWWY* $ $$TXX%C%C%EF;;;&&t{{3___&&x746N)**>: N((*DAyF{HHLLA& + J$$&DAyF{HHLLA& ' 	

r   c                  < V P                   P                  '       d   \        V P                   4       V P                   P                  '       g   V P                   P                  '       d(    V P	                  4        \        P                  ! ^ 4       V P                   P                  '       d   \        P                  ! 4        V P                   P                  '       dn   \        P                   P#                  R4      '       d   Rp\        V\        P                  RR7       \$        P&                  ! V P                   P(                  4       V P                   P*                  '       d   V P                   P*                  P-                  R4      pV FY  p\        P.                  P1                  V4      pV\        P.                  9  g   K9  \        P.                  P3                  ^ V4       K[  	  \4        SV `m  4        R#   \
         dk    R p\        T\        P                  R7       \        P                  ! 4        \        P                  P                  4        \        P                  ! ^4        ELi ; i)z&
Error while loading the application:
r   NOTIFY_SOCKETz]Warning: you shouldn't specify `daemon = True` when launching by systemd with `Type = notify`T)r   r!   ,N)r   print_configr   check_configr3   r   r   r    r_   r`   r!   r"   r8   r   daemonrM   environgetr   	daemonizeenable_stdio_inheritance
pythonpathsplitrO   abspathrP   superr?   )r   rf   pathsrO   r   	__class__s   &    r   r?   Application.run   sx   88   $((O88   DHH$9$9$9		 HHQK88===JJL88???zz~~o..Hc

$7NN488<<= 88HH''--c2EWW__T2
SXX-HHOOAz2 
 	7  @c

+##%

  "s   ,G< <A1I10I1 )rB   rC   rD   rE   rN   ri   rm   rz   r}   r   r?   rG   rH   __classcell__)r   rI   s   @@r   rK   rK   N   s/     
/6::P-^" "r   rK   )importlib.utilrW   importlib.machineryrM   r   r_   gunicornr   gunicorn.arbiterr   gunicorn.configr   r   r   r	   rK   r   r   r   <module>r      s;      	 
   $ ; ; ;|]/ ]r   