
    Owg                         d dl mZ d dlmZ d dlZd dlZd dlZd dlmZ  ej                  d      Z
de
j                  _        de
j                  _        de
j                  _        d Ze	 ddeeddf   fd	       Zd
 Zy)    )	Generator)contextmanagerN)HDFStoretables   c                 J    	 | | j                          y y # t        $ r Y y w xY w)N)closeOSError)stores    V/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/io/pytables/common.py
safe_closer      s-    KKM  s    	""returnc              #      K   t        j                         5 }t        j                  ||       }t	        |||||      5 }| d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY ww)N)mode	complevelcomplib
fletcher32)tempfileTemporaryDirectorypathlibPathr   )pathr   r   r   r   
tmpdirnametmp_pathr   s           r   ensure_clean_storer      su      
	$	$	& 	*<<
D1!
 	 K		 		 		 	s3   A,'A AA 	A,A	A  A)%A,c                 R    	 | j                  |       y# t        t        f$ r Y yw xY w)z
    For tests using tables, try removing the table to be sure there is
    no content from previous tests using the same table name.
    N)remove
ValueErrorKeyError)r   keys     r   _maybe_remover!   *   s*    
S! s    &&)aNNF)collections.abcr   
contextlibr   r   r   pytestpandas.io.pytablesr   importorskipr   
parametersMAX_NUMEXPR_THREADSMAX_BLOSC_THREADSMAX_THREADSr   r   r!        r   <module>r.      s    % %    '			X	&()   %&'   # !    =Bxt#$ r-   