← Back
Editing: local.cpython-311.pyc
� ��b6W � � � d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z d dlm Z ddlmZ ej rd dlmZ d d lmZ d d lmZ ej d� � Z ej dej d ej f �� � Zdej d ddfd�Z G d� d� � Z G d� dej e � � Z G d� d� � Z G d� d� � Z G d� de� � Zdedefd�Zdedefd �Z G d!� d"ej e � � Z!dS )#� N)� ContextVar��partial)�update_wrapper)� attrgetter� )�ClosingIterator)� StartResponse)�WSGIApplication)�WSGIEnvironment�T�F.)�bound�local)�Local� LocalStack�returnc �. � | � � � dS )z�Release the data for the current context in a :class:`Local` or :class:`LocalStack` without using a :class:`LocalManager`. This should not be needed for modern use cases, and may be removed in the future. .. versionadded:: 0.6.1 N)�__release_local__)r s �0/usr/lib/python3/dist-packages/werkzeug/local.py� release_localr s � � �������� c �6 � e Zd ZdZdZ ddej eej e ej f ddfd�Zdej ej e ej f fd�Zdd�d e d ej e ddfd�Zdd �Zd e dej fd�Zd e dej ddfd�Zd e ddfd�ZdS )r aq Create a namespace of context-local data. This wraps a :class:`ContextVar` containing a :class:`dict` value. This may incur a performance penalty compared to using individual context vars, as it has to copy data to avoid mutating the dict between nested contexts. :param context_var: The :class:`~contextvars.ContextVar` to use as storage for this local. If not given, one will be created. Context vars not created at the global scope may interfere with garbage collection. .. versionchanged:: 2.0 Uses ``ContextVar`` instead of a custom storage implementation. )� __storageN�context_varr c � � |� t dt | � � � d�� � }t � | d|� � d S )Nzwerkzeug.Local<� >.storage�_Local__storage)r �id�object�__setattr__��selfr s r �__init__zLocal.__init__4 sJ � � �� %�%J�r�$�x�x�%J�%J�%J�K�K�K����4�!2�K�@�@�@�@�@r c �t � t | j � i � � � � � � � S �N)�iterr �get�items�r# s r �__iter__zLocal.__iter__@ s, � ��D�N�&�&�r�*�*�0�0�2�2�3�3�3r ��unbound_message�namer- � LocalProxyc �&