관리-도구
편집 파일: parse.cpython-38.pyc
U /?�f� � @ s� d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dl m Z mZmZ d dl mZ ddlmZ e speZG d d � d ee�Zeddd�dd ddejd�dddddddd�dd��Zeddd�dd ddejd�dddddddd�dd��ZdS )� )�annotationsN)�Enum)�Path)� TYPE_CHECKING�Any�Callable)� deprecated� )�PydanticDeprecatedSince20c @ s e Zd ZdZdZdS )�Protocol�json�pickleN)�__name__� __module__�__qualname__r r � r r �G/opt/hc_python/lib/python3.8/site-packages/pydantic/deprecated/parse.pyr s r �`load_str_bytes` is deprecated.)�category�utf8F)�content_type�encoding�proto�allow_pickle� json_loadszstr | bytesz str | None�strzProtocol | None�boolzCallable[[str], Any]r )�br r r r r �returnc C s� t jdtdd� |d krL|rL|�d�r(n$|r>|�d�r>tj}ntd|� ���|pTtj}|tjkr|t| t �rt| � |�} || �S |tjkr�|s�td��t| t �r�| n| �� }t� |�S td|� ���d S ) Nr r �r � stacklevel)r � javascriptr zUnknown content-type: z4Trying to decode with pickle with allow_pickle=FalsezUnknown protocol: )�warnings�warnr �endswithr r � TypeErrorr � isinstance�bytes�decode�RuntimeError�encode�loads)r r r r r r Zbbr r r �load_str_bytes s$ r, �`load_file` is deprecated.z str | Path)�pathr r r r r r c C s^ t jdtdd� t| �} | �� }|d krJ| jdkr:tj}n| jdkrJtj}t ||||||d�S )Nr- r r )z.jsz.jsonz.pkl)r r r r r ) r"