ok
Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/ |
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/bccache.cpython-311.pyc |
� >�Dgk/ � � � d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm Z ddlmZ ddlm Z dd lmZ dd lmZ ddlmZ ddlmZ d Zd ej ed� � z ej ej d dz ej d z d� � z Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � ZdS )a The optional bytecode cache system. This is useful if you have very complex template situations and the compilation of all those templates slows down your application too much. Situations where this is useful are often forking web applications that are initialized on the first request. � N)�sha1)�listdir)�path� )�BytesIO)�marshal_dump)�marshal_load)�pickle)� text_type)�open_if_exists� s j2� � c �6 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z dS ) �Bucketau Buckets are used to store the bytecode for one template. It's created and initialized by the bytecode cache and passed to the loading functions. The buckets get an internal checksum from the cache assigned and use this to automatically reject outdated cache material. Individual bytecode cache subclasses don't have to care about cache invalidation. c �X � || _ || _ || _ | � � � d S �N)�environment�key�checksum�reset)�selfr r r s �E/opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/bccache.py�__init__zBucket.__init__. s) � �&������ �� �� � ������ c � � d| _ dS )z)Resets the bucket (unloads the bytecode).N)�code�r s r r zBucket.reset4 s � ��� � � r c � � |� t t � � � � }|t k r| � � � dS t j |� � }| j |k r| � � � dS t |� � | _ dS # t t t f$ r | � � � Y dS w xY w)z/Loads bytecode from a file or file like object.N)�read�len�bc_magicr r �loadr r r �EOFError� ValueError� TypeError)r �f�magicr s r � load_bytecodezBucket.load_bytecode8 s� � � ���s�8�}�}�%�%���H����J�J�L�L�L��F��;�q�>�>���=�H�$�$��J�J�L�L�L��F� �$�Q���D�I�I�I���*�i�0� � � ��J�J�L�L�L��F�F� ���s �?B �+C�Cc �� � | j �t d� � �|� t � � t j | j |d� � t | j |� � dS )z;Dump the bytecode into the file or file like object passed.Nzcan't write empty bucketr )r r&