"Jd .ddlmZGddeZdS))BytesIOc8eZdZdZdZdZdZdZd dZdZ dS) CallbackFileWrapperav Small wrapper around a fp object which will tee everything read into a buffer, and when that file is closed it will execute a callback with the contents of that buffer. All attributes are proxied to the underlying file object. This class uses members with a double underscore (__) leading prefix so as not to accidentally shadow an attribute. cHt|_||_||_dSN)r_CallbackFileWrapper__buf_CallbackFileWrapper__fp_CallbackFileWrapper__callback)selffpcallbacks W/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/cachecontrol/filewrapper.py__init__zCallbackFileWrapper.__init__sYY  "cL|d}t||S)Nr )__getattribute__getattr)r namer s r __getattr__zCallbackFileWrapper.__getattr__s( " "#= > >r4   rc~ |jjduS#t$rYnwxYw |jjS#t$rYnwxYwdS)NF)r r AttributeErrorclosedr s r__is_fp_closedz"CallbackFileWrapper.__is_fp_closed!sm 9<4' '    D  9# #    D  us   - ::cz|jr,||jd|_dSr)r rgetvaluers r_closezCallbackFileWrapper._close2s9 ? 3 OODJ//11 2 2 2rNc|j|}|j||r||Sr)r readrwrite"_CallbackFileWrapper__is_fp_closedrr amtdatas rrzCallbackFileWrapper.read=sQy~~c""       KKMMM rc|j|}|dkr|dkr|S|j||r||S)Ns )r _safe_readrr r!rr"s rr'zCallbackFileWrapper._safe_readEsky##C(( !88K       KKMMM rr) __name__ __module__ __qualname____doc__rrr!rrr'rrrrs}  ### ! ! !"        rrN)iorobjectrr,rrr/sULLLLL&LLLLLr