
    BTh	                     "    d  Z d Zd Zd Zd Zy)c                     t        |       } | S N)convert_body_to_bytesresps    h/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/vcr/serializers/compat.pyconvert_to_bytesr      s     &DK    c                     t        |       } | S r   )convert_body_to_unicoder   s    r   convert_to_unicoder      s    "4(DKr	   c                     	 | d   d   3t        | d   d   t              s| d   d   j                  d      | d   d<   | S # t        t        t
        f$ r Y | S w xY w)a  
    If the request body is a string, encode it to bytes (for python3 support)

    By default yaml serializes to utf-8 encoded bytestrings.
    When this cassette is loaded by python3, it's automatically decoded
    into unicode strings. This makes sure that it stays a bytestring, since
    that's what all the internal httplib machinery is expecting.

    For more info on py3 yaml:
    http://pyyaml.org/wiki/PyYAMLDocumentation#Python3support
    bodystringutf-8)
isinstancebytesencodeKeyError	TypeErrorUnicodeEncodeErrorr   s    r   r   r      su    
<!-jfhAWY^6_%)&\(%;%B%B7%KDL" K i!34  	Ks   ;? AAc                     | }	 | !t        | t              s| j                  d      }|S # t        t        t
        f$ r Y |S w xY w)zM
    If the string is bytes, decode it to a string (for python3 support)
    r   )r   strdecoder   UnicodeDecodeErrorAttributeError)r   results     r   _convert_string_to_unicoder   %   sU     Fj&=]]7+F M )>:  	Ms   #) A Ac                     t        | t              st        |       S | j                  d      }|	 t        |d         |d<   | S | S # t        t
        t        f$ r t        |      | d<   Y | S w xY w)zd
    If the request or responses body is bytes, decode it to a string
    (for python3 support)
    r   r   )r   dictr   getr   r   r   )r   r   s     r   r   r   6   s    
 dD!)$//xx@!;DN!KX K4K i8 @  :$?VK@s   A "A+*A+N)r   r   r   r   r    r	   r   <module>r"      s   

4"r	   