\h JddlmZddlmZmZddlmZddlmZ dZ dZ dZ y ) )absolute_import)!MultipartInvariantViolationDefectStartBoundaryNotFoundDefect)HeaderParsingError) http_clientc |jS#t$rYnwxYw |jS#t$rYnwxYw |jduS#t$r Yt dwxYw)zt Checks whether a given file-like object is closed. :param obj: The file-like object to check. Nz)Unable to determine whether fp is closed.)isclosedAttributeErrorclosedfp ValueError)objs d/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/response.py is_fp_closedr s{ ||~     zz     vv~   @ AA s)  . :: A A"!A"ct|tjs#tdj t |t |dd}t |dd}d}|r/|js|}t|ttfr|}|r%|Dcgc]}t|ttfs|}}|s|r t||ycc}w)a> Asserts whether all headers have been successfully parsed. Extracts encountered errors from the result of parsing headers. Only works on Python 3. :param http.client.HTTPMessage headers: Headers to verify. :raises urllib3.exceptions.HeaderParsingError: If parsing errors are found. z"expected httplib.Message, got {0}.defectsN get_payload)r unparsed_data) isinstancehttplib HTTPMessage TypeErrorformattypegetattr is_multipartbytesstrrrr)headersrrrpayloaddefects rassert_header_parsingr#(s gw22 3<CCDMRSSgy$/G'=$7KM##%!mG'E3<0 ' " 46WX   -  NN  sCcj|j}t|tr|dk(S|jdk(S)z Checks whether the request of a response has been a HEAD-request. Handles the quirks of AppEngine. :param http.client.HTTPResponse response: Response to check if the originating request used 'HEAD' as a method. HEAD)_methodrintupper)responsemethods ris_response_to_headr,^s4  F&#{ <<>V ##N) __future__r email.errorsrr exceptionsrpackages.six.movesrrrr#r,r-rr3s#&W+7B>3Ol $r-