U
    /e_                     @  sN   d dl mZ d dlZd dlmZ d dlmZ eeZ	ddddd	d
dZ
dS )    )annotationsN)sizeof)format_bytes    .Aobjectfloatint)objdefault_sizereturnc                 C  sH   z
t | W S  tk
rB   tjdtt| dd t| Y S X dS )zSafe variant of sizeof that captures and logs exceptions

    This returns a default size of 1e6 if the sizeof function fails
    z)Sizeof calculation failed. Defaulting to T)exc_infoN)r   	Exceptionloggerwarningr   r   )r	   r
    r   6/tmp/pip-unpacked-wheel-g426oqom/distributed/sizeof.pysafe_sizeof   s    
r   )r   )
__future__r   loggingZdask.sizeofr   Z
dask.utilsr   	getLogger__name__r   r   r   r   r   r   <module>   s
   
