�
B�g] � �0 � d Z ddlmZ ddlZddlZddlZddlmZmZm Z ddl
Z
ddl
mZ ddlm
Z
ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlZddlmZmZ ddl m!Z! ddl"m#Z# ddl$m%Z%m&Z&m'Z'm(Z(m)Z) erddl*m+Z+m,Z,m-Z-m.Z.m/Z/ dBd�Z0 dCdDd$�Z1 G d%� d� � Z2 G d&� d'e2� � Z3 G d(� d)e2� � Z4 ee!d �*� � dEdFd8�� � Z5 ee!d �*� � d+ddej6 ej6 ddfdGdA�� � Z7dS )Hz parquet compat � )�annotationsN)�
TYPE_CHECKING�Any�Literal)�catch_warnings)�using_pyarrow_string_dtype)�_get_option)�lib)�import_optional_dependency��AbstractMethodError)�doc)�find_stack_level)�check_dtype_backend)� DataFrame�
get_option)�_shared_docs)�arrow_string_types_mapper)� IOHandles�
get_handle�
is_fsspec_url�is_url�stringify_path)�DtypeBackend�FilePath�
ReadBuffer�StorageOptions�WriteBuffer�engine�str�return�BaseImplc �d � | dk rt d� � } | dk r_t t g}d}|D ]:} |� � c S # t $ r}|dt |� � z z
}Y d}~�3d}~ww xY wt d|� �� � �| dk rt � � S | dk rt � � S t d � � �)
zreturn our implementation�autozio.parquet.engine� z
- Nz�Unable to find a usable engine; tried using: 'pyarrow', 'fastparquet'.
A suitable version of pyarrow or fastparquet is required for parquet support.
Trying to import the above resulted in these errors:�pyarrow�fastparquetz.engine must be one of 'pyarrow', 'fastparquet')r �PyArrowImpl�FastParquetImpl�ImportErrorr �
ValueError)r �engine_classes�
error_msgs�engine_class�errs �a/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pandas/io/parquet.py�
get_enginer1 3 s� � �
�����/�0�0��
����%��7���
�*� 1� 1�L�
1�#�|�~�~�%�%�%���
1�
1�
1��g��C���0�0�
�
�
�
�
�
�����
1���� �
� �
�
�
�
�
� �����}�}�� �=� � �� � � �
�E�
F�
F�Fs � =�
A&�A!�!A&�rbF�path�1FilePath | ReadBuffer[bytes] | WriteBuffer[bytes]�fsr �storage_options�StorageOptions | None�mode�is_dir�bool�Vtuple[FilePath | ReadBuffer[bytes] | WriteBuffer[bytes], IOHandles[bytes] | None, Any]c �` � t | � � }|��t dd�� � }t dd�� � }|�'t ||j � � r|rt d� � �nA|�t ||j j � � rn$t dt |� � j � �� � �t |� � r�|��|�Tt d� � }t d� � } |j � | � � \ }}n# t |j
f$ r Y nw xY w|�'t d� � } |j j |fi |pi ��\ }}n&|r$t! |� � r|d k rt d
� � �d} |sR|sPt |t"