gL i}\vUdZddlZddlZddlZddlZddlZddlZddlmZdZ GddZ dZ Gdd e Z iZeeefed <iZeeeeeffed <d Zd#d ZdZedddZedddZeddefdZdefdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$y)$z"Git implementation of _version.py.N)Callablecd}d}d}|||d}|S)z;Get the keywords needed to look up the version information.z" (HEAD, tag: v2.3.3, origin/2.3.x)(9c8bc3e55188c8aff37207a74f1dd144980b8874z2025-09-30 00:12:09 +0200)refnamesfulldate) git_refnamesgit_fullgit_datekeywordss U/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/_version.py get_keywordsrs$ 8L9H*H((HMH OceZdZdZy)VersioneerConfigz2Container for Versioneer configuration parameters.N__name__ __module__ __qualname____doc__r rrrr#s.decorate@s' h HSM ! frr )r,r+r-s`` rregister_vcs_handlerr.=s Orc Rt|tsJd}i}tjdk(r>>&1 ]#wi$&'  && D !+6 D   G ,  28*= >  "1 % + + - 4 4 6FQ  N7)84 5 Kx( )W'''' 7%% %%%  q!Aww%,,&wi01a s;?E=F&F&%F&c`g}tdD]x}tjj|}|j |r|t |ddddddcS|j |tjj|}z|rtdt|d|td)a"Try to determine the version from the parent directory name. Source tarballs conventionally unpack into a directory that includes both the project name and a version string. We will also support searching up two directory levels for an appropriately named parent directory NFversionzfull-revisioniddirtyerrorrzTried directories z* but none started with prefix z+rootdir doesn't start with parentdir_prefix) rangeospathbasename startswithlenappenddirnamerFr?r%)rrootr!rootdirs_ras rversions_from_parentdirrexsH 1X %''""4(   . /"3'7#8#:;#'   wwt$ %  X0**:); =  E FFrrrcHi} t|d5}|D]}|jjdr,tjd|}|r|j d|d<|jjdr,tjd|}|r|j d|d<|jjd stjd|}|s|j d|d < d d d |S#1swY|SxYw#t $rY|SwxYw) z0Extract version information from the given file.zutf-8)encodingzgit_refnames =z =\s*"(.*)"r6rz git_full =rz git_date =rN)openrHr^researchgrouprB)versionfile_absr fobjlinemos rgit_get_keywordsrps H /G 4 7 7::<**+;<=$7B/1xx{,::<**<8=$7B+-88A;(::<**<8=$7B+-88A;( 7 7 O! 7 O   O s; DB;D D&D=DD DD D! D!r cNd|vr td|jd}|E|jd}|jj dddj dd d}|dj}|j d r|r t d td |jd jdDchc]}|j}}d}|Dchc]"}|j |s|t|d$}}|sI|Dchc]}tjd|s|}}|r!t ddj||z d|r&t ddjt|t|D]c} | j |s| t|d}tjd|s:|rt d|||djdd|dcS|r t dd|djddddScc}wcc}wcc}w)z*Get version information from git keywords.rzShort version file foundrN Tr6z$Formatz"keywords are unexpanded, not usingz.unexpanded keywords, not a git-archive tarballz(),ztag: z\dz discarding 'z ', no digitsz likely tags: zpicking rFrVz2no suitable tags, using unknown + full revision id 0+unknownzno suitable tags)r%get splitlinesrHreplacer^rFsplitr_rirjjoinsortedmatch) r rr!rrrrefsTAGtagsrefs rgit_versions_from_keywordsrs'!677 << D  $zz|##Ca088b!D #))+H9%  6 7LMM'~~d399#> ?!AGGI ?D ? C#' =a1<<+>* %C O%&A88E1%n%#+F#3#9#9#;  & BC#F+113#  O @ >8sH%H<HH"0H"pieces_from_vcsc ^dg}tjdk(rddg}tjj }|j ddt j||}||dd g|| \}}|d k7r|rtd |d td||dddddd|dg|\}}| td|j}||ddg|\} }| td| j} i} | | d<| dd| d<d| d<||gd|\} }|d k7s| td| j} | dk(rn||d d!g|\} }|d k7s| td"| jd#} d$| d vr| j d | D cgc]} | d%d } } d&| vrd&} n | sd} n| d } | | d <|}|jd'}|| d(<|r|d|jd'}d)|vrtjd*|}|s d+|d,| d<| S|j!d-}|j#|s"|rd.}t|||fzd/|d0|d,| d<| S|t%|d| d1<t'|j!d%| d2<|j!d3| d<n1d| d1<||gd4|\}}t%|j| d2<||gd5|d j}|j)d6}|jj+d7d8d-j+d7d9d-| d:<| Scc} w);aGet version from 'git describe' in the root of the source tree. This only gets called if the git-archive 'subst' keywords were *not* expanded, and _version.py hasn't already been rewritten with a short version string, meaning we're inside a checked out source tree. rr0zgit.cmdzgit.exeGIT_DIRN)r3 rev-parsez --git-dir)r2rMrz Directory z not under git controlz('git rev-parse --git-dir' returned errordescribez--tagsz--dirtyz--alwaysz--longz--matchz [[:digit:]]*)r2z'git describe' failedHEADz'git rev-parse' failedlongshortrY)rz --abbrev-refrz+'git rev-parse --abbrev-ref' returned errorbranchz --containsz&'git branch --contains' returned error (master-dirtyrX-z^(.+)-(\d+)-g([0-9a-f]+)$z&unable to parse git-describe output: ''r6z'tag '%s' doesn't start with prefix '%s'ztag 'z' doesn't start with prefix ' closest-tagdistancerU)zrev-listrz --left-right)showz-sz --format=%cirrrrsrtrur)r9r:r[environcopypop functoolspartialrFr%rHr{endswithrindexrirjrkr^r_intryrz)rrbr!runnerGITSr3rdrc describe_outfull_outpieces branch_namebranchesr git_describerXrofull_tagfmtoutrs rgit_pieces_from_vcsrs 7D ||w9% **// CGGIt   v3 /F 4+{3w; WEAr Qw  Jtf$:; <FGG      l, '   L"344%%'L$f 54@LHb455~~H FF6NrlF7OF7OT#HdSOK Qw+%IJJ##%KfdX|$<$G " 7h& HI I>>$' (1+  LLO.666F12J66 x "KK#1+K"F8 L  ! !( +EF7O #$Cl&9&9(&CD  l YY3\ B F|nTUVF7OM88A;"":.?cXz223z!>zl!L  M (Z): ;}!!-z((1+w!%}CNR -z $>D I! L R R TD ?? R DZZ\))#sA6>>sBJF6N M}7s L*returnc.d|jddvryy)z8Return a + if we don't already have one, else return a .+rru.)rx)rs r plus_or_dotrs fjj++ rc|dr9|d}|ds|dr(|t|z }||dd|dz }|dr|dz }|Sd|dd|d}|dr|dz }|S)a,Build up version string, with post-release "local version identifier". Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] rrrX.gr.dirtyz 0+untagged.rrrendereds r render_pep440rsm-( *   F+ +H 6*-.b0AB BHgH$ O! !3 4Bvg6GH '?  H Orc|drF|d}|ds|dr5|ddk7r|dz }|t|z }||dd|dz }|dr|d z }|Sd }|ddk7r|dz }|d |dd|dz }|dr|d z }|S) zTAG[[.dev0]+DISTANCE.gHEX[.dirty]] . The ".dev0" means not master branch. Note that .dev0 sorts backwards (a feature branch will appear "older" than the master branch). Exceptions: 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] rrrXrr.dev0rrr0z +untagged.rrs rrender_pep440_branchrsm-( * h8+G#  F+ +H 6*-.b0AB BHgH$ O  ( x '  Hj !3 4Bvg6GHH '?  H Orc~tj|d}|dt|dk(rt|dxsdfSdfS)zSplit pep440 version string at the post-release segment. Returns the release segments before the post-release and the post-release version number (or -1 if no post-release segment is present). .postrrr6N)r?r{r_r)vervcs rpep440_split_postrsA 3 B a5SW\#bejq/ ;;t ;;rc|drA|dr5t|d\}}|}||d|dzd|dz }|S|d|dz }|S|d}|Sd|d}|S)z_TAG[.postN.devDISTANCE] -- No -dirty. Exceptions: 1: no tags. 0.post0.devDISTANCE rrrr6z.devz .post0.devz 0.post0.dev)r)r tag_version post_versionrs rrender_pep440_prers m * (9&:O(P %K"H'eL1$4#5T&:L9MNN Oj );(<== O m,H O! !3 45 Orc|dr?|d}|ds|dr.|d|dz }|dr|dz }|t|z }|d|dz }|Sd|d}|dr|dz }|d |dz }|S) a$TAG[.postDISTANCE[.dev0]+gHEX] . The ".dev0" means dirty. Note that .dev0 sorts backwards (a dirty tree will appear "older" than the corresponding clean one), but you shouldn't be releasing software with -dirty anyways. Exceptions: 1: no tags. 0.postDISTANCE[.dev0] rrrXrrgr0.post+grrs rrender_pep440_postrsm-( *  %z 234 4HgG#  F+ +H !F7O,- -H O F:./0 '?  Hb)** Orc|drL|d}|ds|dr;|d|dz }|ddk7r|dz }|t|z }|d|d z }|dr|d z }|Sd |d}|ddk7r|dz }|d |d z }|dr|d z }|S) zTAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . The ".dev0" means not master branch. Exceptions: 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] rrrXrrrrrrrrrrrs rrender_pep440_post_branchrsm-( *  %z 234 4Hh8+G#  F+ +H !F7O,- -HgH$ O F:./0 ( x '  Hb)** '?  H Orc|dr&|d}|ds|dr|d|dz }|dr|dz }|Sd|d}|dr|dz }|S)zuTAG[.postDISTANCE[.dev0]] . The ".dev0" means dirty. Exceptions: 1: no tags. 0.postDISTANCE[.dev0] rrrXrrr rs rrender_pep440_oldrs}m-( *  & !3 45 5HgG# OF:./0 '?  H Orcf|dr|d}|dr|d|dd|dz }n|d}|dr|dz }|S)zTAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix) rrr-grrXrr rs rrender_git_describer1sam-( *  !F:./r&/1BC CH'? gH Orc\|dr|d}|d|dd|dz }n|d}|dr|dz }|S)zTAG-DISTANCE-gHEX[-dirty]. Like 'git describe --tags --dirty --always -long'. The distance/hash is unconditional. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix) rrrrrrXrr rs rrender_git_describe_longrEsYm-(az*+2fWo->??'? gH Orc|drd|jdd|dddS|r|dk(rd}|dk(r t|}n|dk(r t|}nu|d k(r t|}nd|d k(r t |}nS|d k(r t |}nB|d k(r t |}n1|d k(r t|}n |dk(r t|}ntd|d||d|dd|jddS)z9Render the given version pieces into the requested style.rYunknownrNrVdefaultrz pep440-branchz pep440-prez pep440-postzpep440-post-branchz pep440-oldz git-describezgit-describe-longzunknown style 'rrXr) rxrrrrrrrr ValueError)rrrs rrenderrYs g %zz&1G_    EY&  ( / !'/ , $V, - %f- & &,V4 , $V, . &v. % %+F3?5'344!&> 6"  rctt}|j} tt|j|S#t $rYnwxYw t jjt}|jjdD]!}t jj|}#n#t$r ddddddcYSwxYw t|j||}t||j S#t $rYnwxYw |j"rt%|j"||Sn#t $rYnwxYwddddddS)z=Get version information or return default if unable to do so./rwNz"unable to find root of source treerVzunable to compute version)r#r!rrrr%r[r\realpath__file__r r{ra NameErrorrrrrre)r"r!rbrdrs r get_versionsrsD ,CkkG ),.#..'RR     ww)''--c2 )A77??4(D )  "#9     $S^^T7Cfcii((       *3+?+?wO O    ,  sF7 AAA"B**B>=B>,C// C;:C;?"D## D/.D/)NFFN)%rrDrr[rir;r9typingrrrr# Exceptionr%r&dictr?__annotations__r'r.rSrerprrrrrrrrrrrrrrr rrrs")    == NIN#%c3h$+-$sDh'' (- +&\G<e^,-6eZ(C)CLe./:EH0HV30:<06:,(('T1r