§
    X˜¶f@  ã                   óž   — d dl 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 ddlmZmZ dd	lmZ  G d
„ de¦  «        Z G d„ de¦  «        ZdS )é    N)Ú	timedelta)ÚOptional)ÚFileSystemCache)ÚFlaské   )Útotal_seconds)ÚServerSideSessionÚServerSideSessionInterface)ÚDefaultsc                   ó   — e Zd ZdS )ÚFileSystemSessionN)Ú__name__Ú
__module__Ú__qualname__© ó    úW/var/www/piapp/venv/lib/python3.11/site-packages/flask_session/filesystem/filesystem.pyr   r      s   € € € € € Ø€Dr   r   c                   óö   ‡ — e Zd ZdZeZdZej        ej	        ej
        ej        ej        ej        ej        ej        fdedededededed	ed
edefˆ fd„Zdedee         fd„Zdeddfd„Zdedededdfd„Zˆ xZS )ÚFileSystemSessionInterfacea{  Uses the :class:`cachelib.file.FileSystemCache` as a session storage.

    :param key_prefix: A prefix that is added to storage keys.
    :param use_signer: Whether to sign the session id cookie or not.
    :param permanent: Whether to use permanent session or not.
    :param sid_length: The length of the generated session id in bytes.
    :param serialization_format: The serialization format to use for the session data.
    :param cache_dir: the directory where session files are stored.
    :param threshold: the maximum number of items the session stores before it
    :param mode: the file mode wanted for the session files, default 0600

    .. versionadded:: 0.7
        The `serialization_format` and `app` parameters were added.

    .. versionadded:: 0.6
        The `sid_length` parameter was added.

    .. versionadded:: 0.2
        The `use_signer` parameter was added.
    TÚappÚ
key_prefixÚ
use_signerÚ	permanentÚ
sid_lengthÚserialization_formatÚ	cache_dirÚ	thresholdÚmodec
                 óÂ  •— |t           j        k    rt          j        dt          d¬¦  «         |t           j        k    rt          j        dt          d¬¦  «         |	t           j        k    rt          j        dt          d¬¦  «         t          j        dt          d¬¦  «         t          |||	¬¦  «        | _        t          ¦   «          
                    ||||||¦  «         d S )Nz 'SESSION_FILE_DIR' is deprecated and will be removed in a future release. Instead pass FileSystemCache(directory, threshold, mode) instance as SESSION_CACHELIB.é   )Ú
stacklevelz¤'SESSION_FILE_THRESHOLD' is deprecated and will be removed in a future release. Instead pass FileSystemCache(directory, threshold, mode) instance as SESSION_CLIENT.zŸ'SESSION_FILE_MODE' is deprecated and will be removed in a future release. Instead pass FileSystemCache(directory, threshold, mode) instance as SESSION_CLIENT.z|FileSystemSessionInterface is deprecated and will be removed in a future release. Instead use the CacheLib backend directly.)r   r   r   )r   ÚSESSION_FILE_DIRÚwarningsÚwarnÚDeprecationWarningÚSESSION_FILE_THRESHOLDÚSESSION_FILE_MODEr   ÚcacheÚsuperÚ__init__)Úselfr   r   r   r   r   r   r   r   r   Ú	__class__s             €r   r*   z#FileSystemSessionInterface.__init__*   s  ø€ ð �Ô1Ò1Ð1ÝŒMð sÝ"Øðñ ô ð ð
 �Ô7Ò7Ð7ÝŒMð wÝ"Øðñ ô ð ð
 •8Ô-Ò-Ð-ÝŒMð rÝ"Øðñ ô ð õ 	Œð KÝØð	
ñ 	
ô 	
ð 	
õ %Ø¨9¸4ð
ñ 
ô 
ˆŒ
õ 	‰Œ×ÒØ�˜Z¨°JÐ@Tñ	
ô 	
ð 	
ð 	
ð 	
r   Ústore_idÚreturnc                 ó6   — | j                              |¦  «        S ©N)r(   Úget©r+   r-   s     r   Ú_retrieve_session_dataz1FileSystemSessionInterface._retrieve_session_dataY   s   € àŒz�~Š~˜hÑ'Ô'Ð'r   Nc                 ó:   — | j                              |¦  «         d S r0   )r(   Údeleter2   s     r   Ú_delete_sessionz*FileSystemSessionInterface._delete_session]   s   € ØŒ
×Ò˜(Ñ#Ô#Ð#Ð#Ð#r   Úsession_lifetimeÚsessionc                 ó|   — t          |¦  «        }t          |¦  «        }| j                             |||¬¦  «         d S )N)ÚkeyÚvalueÚtimeout)r   Údictr(   Úset)r+   r7   r8   r-   Ústorage_time_to_liveÚsession_datas         r   Ú_upsert_sessionz*FileSystemSessionInterface._upsert_session`   sR   € õ  -Ð-=Ñ>Ô>Ðõ ˜G‘}”}ˆð 	Œ
�ŠØØØ(ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r   )r   r   r   Ú__doc__r   Úsession_classÚttlr   ÚSESSION_KEY_PREFIXÚSESSION_USE_SIGNERÚSESSION_PERMANENTÚSESSION_ID_LENGTHÚSESSION_SERIALIZATION_FORMATr"   r&   r'   r   ÚstrÚboolÚintr*   r   r=   r3   r6   Ú	TimeDeltar	   rA   Ú__classcell__)r,   s   @r   r   r      s_  ø€ € € € € ðð ð* &€MØ
€Cð
 #Ô5Ø#Ô6Ø"Ô4Ø"Ô4Ø$,Ô$IØ!Ô2Ø!Ô8ØÔ.ð-
ð -
àð-
ð ð-
ð ð	-
ð
 ð-
ð ð-
ð "ð-
ð ð-
ð ð-
ð ð-
ð -
ð -
ð -
ð -
ð -
ð^(¨sð (°xÀ´~ð (ð (ð (ð (ð$¨ð $°ð $ð $ð $ð $ð
Ø )ð
Ø4Eð
ØQTð
à	ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r   r   )r#   Údatetimer   rM   Útypingr   Úcachelib.filer   Úflaskr   Ú_utilsr   Úbaser	   r
   Údefaultsr   r   r   r   r   r   ú<module>rV      sü   ðØ €€€Ø +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð à )Ð )Ð )Ð )Ð )Ð )Ø Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "Ø @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ø Ð Ð Ð Ð Ð ð	ð 	ð 	ð 	ð 	Ð)ñ 	ô 	ð 	ð\
ð \
ð \
ð \
ð \
Ð!;ñ \
ô \
ð \
ð \
ð \
r   