%p d dl Z d dlZd dlmZmZmZ d dlmZmZ dZddZ d Z G d de Z G d d e Z G d de Z G d de ZdS ) N) formatdate parsedateparsedate_tz)datetime timedeltaz%a, %d %b %Y %H:%M:%S GMTc 6 |pt j }|| z S N)r utcnow)deltadates /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/cachecontrol/heuristics.pyexpire_afterr s $8?$$D%< c h t t j | S r )r calendartimegm timetuple)dts r datetime_to_headerr s" hobllnn55666r c e Zd Zd Zd Zd ZdS ) BaseHeuristicc dS )a! Return a valid 1xx warning header value describing the cache adjustments. The response is provided too allow warnings like 113 http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need to explicitly say response is over 24 hours old. z110 - "Response is Stale" selfresponses r warningzBaseHeuristic.warning s +*r c i S )zUpdate the response headers with any new headers. NOTE: This SHOULD always include some Warning header to signify that the response was cached by the client, not by way of the provided headers. r r s r update_headerszBaseHeuristic.update_headers! s r c | | }|rM|j | | | }||j d|i |S )NWarning)r headersupdater )r r updated_headerswarning_header_values r applyzBaseHeuristic.apply* so --h77 K##O444#'<<#9#9 #/ ''4H(IJJJr N)__name__ __module____qualname__r r r&