K i!ddlZddlZddlZddlZddlZddlZddlZddlZddlZdZ dZ e fdZ ddZ dZdZdZd Zd Zd Zd Zd ZdZdZdZy)NzApyarrow.{} is deprecated as of {}, please use pyarrow.{} instead.cfd}|S)a A decorator that takes docstring templates, concatenates them, and finally performs string substitution on them. This decorator will add a variable "_docstring_components" to the wrapped callable to keep track of the original docstring template for potential future use. If the docstring is a template, it will be saved as a string. Otherwise, it will be saved as a callable and the docstring will be obtained via the __doc__ attribute. This decorator cannot be used on Cython classes due to a CPython constraint, which enforces the __doc__ attribute to be read-only. See https://github.com/python/cpython/issues/91309 Parameters ---------- *docstrings : None, str, or callable The string / docstring / docstring template to be prepended in order before the default docstring under the callable. **params The key/value pairs used to format the docstring template. c g}D][}|t|dr|j|j.t|ts |j sK|j |]|j r.|j tj|j |Dcgc]4}t|tr tdkDr|jdin|6}}dj|Dcgc]7}t|tr|n"tj|j xsd9c}|_||_|Scc}wcc}w)N_docstring_componentsr) hasattrextendr isinstancestr__doc__appendtextwrapdedentlenformatjoin) decorateddocstring_components docstring componentparams_applied docstringsparamss R/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pyarrow/util.py decoratorzdoc..decorator:sR!$ 7I y"9:$++33Is+y/@/@$++I6 7    ' ' 8I8I(J K 2  )S)c&kAo I   &v &   GG "0  i-__Y%6%6%<"=>   ! ''  s "9D=,.wrappergs! c4 D#F##r) _DEPR_MSGr)old_namenew_namer% next_versionr'r(r&s ` ` @r_deprecate_apir-ds#   8\8 ._DeprecatedMetactjtjjt dt |S)N) stacklevel)r!r"r)r__name__ FutureWarningr )selfother new_classr,r*s r__instancecheck__z;_deprecate_class.._DeprecatedMeta.__instancecheck__ss< MM  <9K9KL  eY/ /rN)r4 __module__ __qualname__r9)r8r,r*sr_DeprecatedMetar0rs 0rr<)r')r*r8r, instancecheckr<s``` r_deprecate_classr>ms' 00$0 8i\2 66rc: t|y#t$rYywxYw)NTF)iter TypeError)objs r _is_iterablerC~s# S  s  c>t|txs t|dS)N __fspath__)r r rpaths r _is_path_likerHs dC ?GD,$??rct|trtjj |S tjj |j S#t $r YtdwxYw)zA Convert *path* to a string or unicode path if possible. znot a path-like object)r r osrG expanduserrEAttributeErrorrArFs r_stringify_pathrMsb$ww!!$'' ww!!$//"344   , -- s,A A43A4c2tjd|dS)z- Return a product of sequence items. c ||zSr r)abs rzproduct..s 1r) functoolsreduce)seqs rproductrWs   ,c1 55rc|sd}|t|z}||fSd}|}t|D]7\}}|dk(rdx}}n)||}|dkDr |||dz zz }'|dks-|||dz zz }9||z |t|zk7r td||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. rrSzarray data is non-contiguous)rW enumerate ValueError)shapestridesitemsizestartendidimstrides rget_contiguous_spanrcs ' #:& ,FAsaxQZFzvq))!37++ , ;(WU^3 3;< < #:rcbtjtjtj}tj|5}|j d|j tjtjd|jdcdddS#1swYyxYw)N)rrrS) socketAF_INET SOCK_STREAM contextlibclosingbind setsockopt SOL_SOCKET SO_REUSEADDR getsockname)socks rfind_free_portrpsz ==);); +>B!!$%%%s AB%%B.c0ddlm}|jS)Nruuid4)uuidrshexrrs rguidrvs 7;;rctjd}tj|}|rS|D]#}||ust |t j s#nn*d}|jtj|}|rSdx}x}}y)Nr)sys _getframegc get_referrersr types FrameTypeclear)frame this_framerefss r!_break_traceback_cycle_from_framersq!J  E "D  EJ&:eU__+M    & !%$D$5:rcddlm}||5}t|d5}|j|j ddddddy#1swYxYw#1swYyxYw)Nr)urlopenwb)urllib.requestropenwriteread)urlout_pathrresponsefs r_download_urllibrs[& % (D ! %Q GGHMMO $ %%% % %%%s! A A A A AA"cddl}|j|5}t|d5}|j|jddddddy#1swYxYw#1swYyxYw)Nrr)requestsgetrrcontent)rrrrrs r_download_requestsrs` c &h (D ! &Q GGH$$ % &&& & &&&s! AAAA AA%ctjdk7rtdtjddl}d}tj j d}tj j|d}d}tj j|d }t j|d  t||t||tj j|sJtj j|sJ|j|j|y#t$rt||t||YwxYw) z Download and extract latest IANA timezone database into the location expected by Arrow which is %USERPROFILE%\Downloads\tzdata. win32z)Timezone database is already provided by rNz5https://data.iana.org/time-zones/tzdata-latest.tar.gzz%USERPROFILE%\Downloads\tzdataz tzdata.tar.gzz^https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xmlzwindowsZones.xmlT)exist_ok)rxplatformrAtarfilerJrG expandvarsrmakedirsr ImportErrorrexistsr extractall)r tzdata_url tzdata_pathtzdata_compressed_pathwindows_zones_urlwindows_zones_paths rdownload_tzdata_on_windowsrs  ||wCCLL>RSSHJ''$$%FGKWW\\+Gxk3EFKK d+@:'=>,.@A 77>>0 11 1 77>>, -- - LL'(33K@ @%;<*,>?@s/D**!E E)T)rJrhrTrzrerxrr|r!r)rr5r-r>rCrHrMrWrcrprvrrrrrrrrs(   H =@@M$(7"@ . 6!H% %.%&Ar