U Dx`@szddlZddlZddlZddlZddlZdZddZddZddd Zd d Z d d Z ddZ ddZ ddZ ddZdS)NzApyarrow.{} is deprecated as of {}, please use pyarrow.{} instead.csfdd}|S)Ncs j|_|SN)__doc__)gf3/tmp/pip-target-oguziej0/lib/python/pyarrow/util.py decorator!szimplements..decoratorr)rr rrr implements s r cs t|||fdd}|S)Ncstt||Sr)warningswarn FutureWarning)argskwargsapimsgrrwrapper*s z_deprecate_api..wrapper) _DEPR_MSGformat)old_namenew_namer next_versionrrrr_deprecate_api'srTcs&Gfdddt}|fiS)zM Raise warning if a deprecated class is used in an isinstance check. cseZdZfddZdS)z)_deprecate_class.._DeprecatedMetacs&tjtjtddt|S)N) stacklevel)r r rr__name__r isinstance)selfother new_classrrrr__instancecheck__6s z;_deprecate_class.._DeprecatedMeta.__instancecheck__N)r __module__ __qualname__r"rr rr_DeprecatedMeta5sr%)type)rr!rZ instancecheckr%rr r_deprecate_class0s r'cCs t|tpt|dpt|tjS)N __fspath__)rstrhasattrpathlibPathpathrrr _is_path_likeAs   r/cCsRt|tr|Sz |WStk rDt|tjr@t|YSYnXtddS)zA Convert *path* to a string or unicode path if possible. znot a path-like objectN)rr)r(AttributeErrorr+r, TypeErrorr-rrr_stringify_pathIs   r2cCstdd|dS)z- Return a product of sequence items. cSs||Srr)abrrr_zproduct..) functoolsreduce)seqrrrproduct[sr;cCs|sd}|t|}nd}|}t|D]V\}}|dkrBd}}q~||}|dkrd|||d7}q&|dkr&|||d7}q&|||t|krtd||fS)z Return a contiguous span of N-D array data. Parameters ---------- shape : tuple strides : tuple itemsize : int Specify array shape data Returns ------- start, end : int The span end points. rr7zarray data is non-contiguous)r; enumerate ValueError)shapestridesitemsizestartendiZdimZstriderrrget_contiguous_spanbs"rDc CsZttjtj}t|6}|d|tjtjd| dW5QRSQRXdS)N)rr7) socketAF_INET SOCK_STREAM contextlibclosingbind setsockopt SOL_SOCKET SO_REUSEADDR getsockname)sockrrrfind_free_ports   rQcCsddlm}|jS)Nruuid4)uuidrShexrRrrrguids rV)T)rIr8r+rFr rr rr'r/r2r;rDrQrVrrrrs  $