Файловый менеджер - Редактировать - /usr/lib/python3.9/site-packages/future/backports/http/__pycache__/cookiejar.cpython-39.opt-1.pyc
Назад
a �c?+ � @ sn d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZmZm Z m Z mZ ddlm Z mZ g d�Zdd lZdd lZdd lZer�de_dd lZdd lmZmZmZ ddlmZ zdd lZW n ey� dd lZY n0 ddlm Z d Z!d a"dd� Z#ee�Z$dZ%dd� Z&dZ'dd� Z(g d�Z)g d�Z*g Z+e*D ]Z,e+�-e,�.� � �q.dmdd�Z/dndd�Z0d d d d d�Z1e�2dej�Z3dd� Z4d d!� Z5e�2d"ej�Z6e�2d#ej7ejB �Z8e�2d$ej9ejB �Z:d%d&� Z;e�2d'ej9ejB �Z<d(d)� Z=d*d+� Z>e�2d,�Z?e�2d-�Z@e�2d.�ZAe�2d/�ZBd0d1� ZCe�2d2�ZDd3d4� ZEd5d6� ZFd7d8� ZGe�2d9ej�ZHd:d;� ZId<d=� ZJd>d?� ZKd@dA� ZLe�2dBej�ZMdCdD� ZNdEdF� ZOdGdH� ZPdIdJ� ZQdKZRe�2dL�ZSdMdN� ZTdOdP� ZUdQdR� ZVdSdT� ZWG dUdV� dVeX�ZYG dWdX� dXeX�ZZG dYdZ� dZeZ�Z[d[d\� Z\d]d^� Z]G d_d`� d`eX�Z^G dadb� dbeX�Z_G dcdd� dde`�ZaG dedf� dfe_�Zbdgdh� ZcG didj� djeb�ZdG dkdl� dleb�Zed S )oa� HTTP cookie handling for web clients. This is a backport of the Py3.3 ``http.cookiejar`` module for python-future. This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly from Python attributes. Class diagram (note that BSDDBCookieJar and the MSIE* classes are not distributed with the Python standard library, but are available from http://wwwsearch.sf.net/): CookieJar____ / \ \ FileCookieJar \ \ / | \ \ \ MozillaCookieJar | LWPCookieJar \ \ | | \ | ---MSIEBase | \ | / | | \ | / MSIEDBCookieJar BSDDBCookieJar |/ MSIECookieJar � )�unicode_literals)�print_function)�division)�absolute_import)�filter�int�map�open�str)� as_native_str�PY2)�Cookie� CookieJar�CookiePolicy�DefaultCookiePolicy� FileCookieJar�LWPCookieJar� LoadError�MozillaCookieJarN)�urlparse�urlsplit�quote)� HTTP_PORT)�timegmFc G s( t sd S tsdd l}|�d�atj | � S )Nr zhttp.cookiejar)�debug�logger�loggingZ getLogger)�argsr � r �C/usr/lib/python3.9/site-packages/future/backports/http/cookiejar.py�_debug: s r zQa filename was not supplied (nor was the CookieJar instance initialised with one)c C sJ dd l } dd l}dd l}| �� }|�d |� |�� }|jd| dd� d S )Nr zhttp.cookiejar bug! %s� )� stacklevel)�io�warnings� traceback�StringIO� print_exc�getvalue�warn)r# r$ r% �f�msgr r r �_warn_unhandled_exceptionH s r, i� c C s� | d d� \}}}}}}|t kr�d| kr4dkr�n nhd| krLdkr�n nPd| krddkr�n n8d| kr|dkr�n n d| kr�dkr�n nt| �S d S d S ) N� � � � r � �; �= )� EPOCH_YEARr )�tt�year�monthZmday�hour�min�secr r r �_timegmW s 8�� �� �� r; )ZMonZTueZWedZThuZFriZSatZSun)ZJanZFebZMarZAprZMayZJunZJulZAugZSepZOctZNovZDecc C s@ | du rt j �� }nt j �| �}d|j|j|j|j|j|jf S )aH Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ", representing Universal Time (UTC, aka GMT). An example of this format is: 1994-11-24 08:49:37Z Nz%04d-%02d-%02d %02d:%02d:%02dZ) �datetime�utcnow�utcfromtimestampr6 r7 �dayr8 �minute�second��tZdtr r r � time2isoze s �rD c C sR | du rt j �� }nt j �| �}dt|�� |jt|jd |j|j |j |jf S )z�Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like this: Wed, DD-Mon-YYYY HH:MM:SS GMT Nz"%s %02d-%s-%04d %02d:%02d:%02d GMTr. )r<