
    "hj                     l   d Z ddlZej                  d   dk(  Zej                  d   dk(  Zej                  d   dk(  xr ej                  d   dk(  Z	 ddlZer%ddl
mZmZ ddlmZmZmZ d Zd	 Zd
 Zd ZeZeZeZyer%ddlmZmZ ddlmZmZmZ d Zd Zd Zd ZeZeZeZyy# ee	f$ r ddlZY \w xY w)u   
兼容Python版本
    N         )quoteunquote)urlparseparse_qsurlsplitc                 H    t        | t              r| j                  d      S | S )uN   若输入为unicode， 则转为utf-8编码的bytes；其他则原样返回。utf-8)
isinstanceunicodeencodedatas    I/root/.hermes/SkillClaw/.venv/lib/python3.12/site-packages/oss2/compat.pyto_bytesr      s     dG$;;w''K    c                     t        |       S )u   把输入转换为str对象)r   r   s    r   	to_stringr       s    ~r   c                 H    t        | t              r| j                  d      S | S )N   把输入转换为unicode，要求输入是unicode或者utf-8编码的bytes。r   r   bytesdecoder   s    r   
to_unicoder   $        dE";;w''Kr   c           
      P   t        | t              r@t        | j                         D cg c]  \  }}t        |      t        |      f c}}      S t        | t              r| D cg c]  }t        |       c}S t        | t
              r| j                  d      S | S c c}}w c c}w )Nr   )r   dict	iteritems	stringifylistr   r   )inputkeyvalueelements       r   r!   r!   +   s    eT"U__M^_	E)C.)E*:;_``t$6;<7Ig&<<w'<<((L `<s    B
%B#c                 J    t        | t              r| j                  d      S | S )uV   若输入为str（即unicode），则转为utf-8编码的bytes；其他则原样返回r   )encoding)r   strr   r   s    r   r   r   >   s"    dC ;;;00Kr   c                 H    t        | t              r| j                  d      S | S )u:   若输入为bytes，则认为是utf-8编码，并返回strr   r   r   s    r   r   r   E   r   r   c                     t        |       S )r   )r   r   s    r   r   r   L   s    r   c                     | S )N )r#   s    r   r!   r!   P   s    r   )__doc__sysversion_infois_py2is_py3is_py33
simplejsonjsonImportErrorSyntaxErrorurllibr   urlquoter   
urlunquoter   r	   r
   r   r   r   r!   r)   builtin_strr   r   urllib.parser-   r   r   <module>r=      s    


1

"


1

"A!#@(8(8(;q(@
 
?55 KE
C E99 KE
C7 U 	[! s   B% %B32B3