o
    ]ÈOcs  ã                   @   sZ  U d dl Zd dlmZ d dlmZ ejr8ddlmZ ddl	m
Z
 ddl	mZ ddl	mZ dd	lmZ dd
lmZ G dd„ dƒZdZedƒZed ed< edeƒZeeedZded< eededZded< eededZded< dZedƒZed ed< edeƒZeeedZded< eededZded< eededZd ed< d!ed"ej fd#d$„Z!dS )%é    N)Ú
ContextVar)Ú
LocalProxyé   )ÚFlask)Ú_AppCtxGlobals)Ú
AppContext)ÚRequestContext)ÚSessionMixin)ÚRequestc                   @   sn   e Zd Zdedeej ddfdd„Zdd„ Zd	ejddfd
d„Z	dejfdd„Z
edejej fdd„ƒZdS )Ú
_FakeStackÚnameÚcvÚreturnNc                 C   s   || _ || _d S ©N)r   r   )Úselfr   r   © r   ú/D:\Flask\env\Lib\site-packages\flask/globals.pyÚ__init__   s   
z_FakeStack.__init__c                 C   s.   dd l }|jd| j› d| j› dtdd d S )Nr   z'_zW_ctx_stack' is deprecated and will be removed in Flask 2.3. Use 'g' to store data, or 'z$_ctx' to access the current context.é   ©Ú
stacklevel)ÚwarningsÚwarnr   ÚDeprecationWarning)r   r   r   r   r   Ú_warn   s   
þ
ûz_FakeStack._warnÚobjc                 C   s   |   ¡  | j |¡ d S r   )r   r   Úset)r   r   r   r   r   Úpush   s   z_FakeStack.pushc                 C   s$   |   ¡  | j d ¡}| j d ¡ |S r   )r   r   Úgetr   )r   Úctxr   r   r   Úpop#   s   z_FakeStack.popc                 C   s   |   ¡  | j d ¡S r   )r   r   r   )r   r   r   r   Útop)   s   z_FakeStack.top)Ú__name__Ú
__module__Ú__qualname__Ústrr   ÚtÚAnyr   r   r   r    ÚpropertyÚOptionalr!   r   r   r   r   r      s    r   zûWorking outside of application context.

This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.zflask.app_ctxr   Ú_cv_appÚapp)Zunbound_messageÚapp_ctxr   Úcurrent_appÚgr   zÛWorking outside of request context.

This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.zflask.request_ctxr   Ú_cv_requestÚrequestÚrequest_ctxr
   Úsessionr	   r   r   c                 C   sP   | dkrdd l }|jdtdd tS | dkr$dd l }|jdtdd tS t| ƒ‚)NZ_app_ctx_stackr   z@'_app_ctx_stack' is deprecated and will be remoevd in Flask 2.3.é   r   Z_request_ctx_stackzD'_request_ctx_stack' is deprecated and will be remoevd in Flask 2.3.)r   r   r   Ú__app_ctx_stackÚ__request_ctx_stackÚAttributeError)r   r   r   r   r   Ú__getattr__V   s"   ýýr7   )"Útypingr&   Úcontextvarsr   Zwerkzeug.localr   ÚTYPE_CHECKINGr+   r   r   r   r   r   Úsessionsr	   Úwrappersr
   r   Z_no_app_msgr*   Ú__annotations__r4   r,   r-   r.   Z_no_req_msgr/   r5   r1   r0   r2   r%   r'   r7   r   r   r   r   Ú<module>   sH   
  
ÿÿÿ
ÿÿÿ