/opt/cloudlinux/venv/lib/python3.11/site-packages/future/tests/__pycache__
NameSizeModeActions
base.cpython-311.pyc271320644editdlrm
__init__.cpython-311.pyc2120644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/future/tests/__pycache__/base.cpython-311.pyc (27132B)
§ ®Ý9L�,°þãó|—ddlmZmZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z mZmZmZmZddlmZmZmZerddlZd„Zd„ZGd„d e¦«ZGd „d e¦«ZGd „d e¦«ZGd„dej¦«Zejed¦«Zd„Z d„Z!d„Z"d„Z#e$ejd¦«sejj%ej_&dd„Z'e$ejd¦«se ejde'¦«Gd„de(¦«Z)Gd„de)¦«Z*dd„Z+e$ejd¦«se ejde+¦«dSdS)é)Úprint_functionÚabsolute_importN)Údedent)Ú bind_methodÚPY26ÚPY3ÚPY2ÚPY27)Ú check_outputÚSTDOUTÚCalledProcessErrorcó^—| d¦«r |dd…}t|¦«S)z, Removes any leading and dedents. ú éN)Ú startswithr)Úcodes úc/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/future/tests/base.pyÚ reformat_coders1€ð ‡‚�tÑÔðØ�A�B�BŒxˆÝ �$‰<Œ<Ðócó ‡—| d¦«Šd„t‰¦«D¦«}d„t‰¦«D¦«}d„t‰¦«D¦«}| ¦«|ks Jd¦«‚d„}d„}||¦«||¦«ks Jd¦«‚tˆfd „|D¦«¦«}t t ||¦«¦«}tˆfd „|D¦«¦«}t t ||¦«¦«} tˆfd „|D¦«¦«} t t || ¦«¦«} g} t t‰¦«¦«D]}} | |vr|  || ¦«Œ"| |vr|  | | ¦«ŒB| |vr|  | | ¦«Œb|  ‰| ¦«Œ~d  | ¦«S) a Returns the code block with any ``__future__`` import lines sorted, and then any ``future`` import lines sorted, then any ``builtins`` import lines sorted. This only sorts the lines within the expected blocks. See test_order_future_lines() for an example. rcóB—g|]\}}| d¦«¯|‘ŒS)úfrom __future__ import ©r©Ú.0ÚiÚlines rú z&order_future_lines..*sD€ðNðNðN¡7 1 dØ"&§/¢/Ð2KÑ"LÔ"LðN˜QðNðNðNrcól—g|]1\}}| d¦«s| d¦«¯/|‘Œ2S)z from futurez from pastrrs rrz&order_future_lines..-sP€ð>ð>ð>¡  DØ $§¢° Ñ >Ô >ð>à $§¢° Ñ <Ô <ð>˜1ð>ð>ð>rcóB—g|]\}}| d¦«¯|‘ŒS)z from builtinsrrs rrz&order_future_lines..1sC€ðBðBðB¡7 1 dØ $§¢°Ñ @Ô @ðB˜QðBðBðBrzIinternal usage error: dedent the code before calling order_future_lines()cóJ—t|¦«dkrt|¦«ndS)Nr)ÚlenÚmax©Únumberss rÚmymaxz!order_future_lines..mymax7s"€Ý" 7™|œ|¨aÒ/Ð/�s�7‰|Œ|ˆ|°QÐ6rcód—t|¦«dkrt|¦«ntd¦«S)NrÚinf)r"ÚminÚfloatr$s rÚmyminz!order_future_lines..mymin:s(€Ý" 7™|œ|¨aÒ/Ð/�s�7‰|Œ|ˆ|µU¸5±\´\ÐArz2the __future__ and future imports are out of ordercó •—g|] }‰|‘Œ S©r-©rrÚliness €rrz&order_future_lines..Csø€Ð:Ð:Ð:˜q�%˜”(Ð:Ð:Ð:rcó •—g|] }‰|‘Œ Sr-r-r.s €rrz&order_future_lines..Fsø€Ð7Ð7Ð7˜a��q”Ð7Ð7Ð7rcó •—g|] }‰|‘Œ Sr-r-r.s €rrz&order_future_lines..Isø€Ð9Ð9Ð9˜a��q”Ð9Ð9Ð9r) ÚsplitÚ enumerateÚlstripÚsortedÚdictÚzipÚranger"ÚappendÚjoin)rÚuufuture_line_numbersÚfuture_line_numbersÚbuiltins_line_numbersr&r+ÚuulÚsorted_uufuture_linesÚflÚsorted_future_linesÚblÚsorted_builtins_linesÚ new_linesrr/s @rÚorder_future_linesrEs‘ø€ð �JŠJ�tÑ Ô €EðNðN­i¸Ñ.>Ô.>ðNñNôNÐð>ð>­I°eÑ,<Ô,<ð>ñ>ô>ÐðBðB­i¸Ñ.>Ô.>ðBñBôBÐð �;Š;‰=Œ=˜DÒ Ð Ð ð$BÑ Ô Ð ð7ð7ð7ðBðBðBð ˆ5Ð&Ñ 'Ô '¨5¨5Ð1DÑ+EÔ+EÒ EÐ EÐ EØ @ñ FÔ EÐ Eõ Ð:Ð:Ð:Ð:Ð$9Ð:Ñ:Ô:Ñ ;Ô ;€CÝ ¥Ð%:¸CÑ!@Ô!@ÑAÔAÐå Ð7Ð7Ð7Ð7Ð#6Ð7Ñ7Ô7Ñ 8Ô 8€BÝ�sÐ#6¸Ñ;Ô;Ñ<Ô<Ðå Ð9Ð9Ð9Ð9Ð#8Ð9Ñ9Ô9Ñ :Ô :€BÝ ¥Ð%:¸BÑ!?Ô!?Ñ@Ô@Ðð€IÝ •3�u‘:”:Ñ Ô ð'ð'ˆØ Ð%Ð %Ð %Ø × Ò Ð2°1Ô5Ñ 6Ô 6Ð 6Ð 6Ø Ð%Ð %Ð %Ø × Ò Ð0°Ô3Ñ 4Ô 4Ð 4Ð 4Ø Ð'Ð 'Ð 'Ø × Ò Ð2°1Ô5Ñ 6Ô 6Ð 6Ð 6à × Ò ˜U 1œXÑ &Ô &Ð &Ð &Ø �9Š9�YÑ Ô Ðrcó —eZdZdZdd„Zd„ZdS)ÚVerboseCalledProcessErrorz… Like CalledProcessError, but it displays more information (message and script output) for diagnosing test failures etc. Ncó>—||_||_||_||_dS©N)ÚmsgÚ returncodeÚcmdÚoutput)ÚselfrJrKrLrMs rÚ__init__z"VerboseCalledProcessError.__init__`s"€ØˆŒØ$ˆŒØˆŒØˆŒ ˆ ˆ rcó<—d|j|j|j|jfzS)Nz>Command '%s' failed with exit status %d Message: %s Output: %s)rLrKrJrM)rNs rÚ__str__z!VerboseCalledProcessError.__str__fs%€ØRØ”8˜Tœ_¨d¬h¸¼ ÐDñEð FrrI)Ú__name__Ú __module__Ú __qualname__Ú__doc__rOrQr-rrrGrG[sF€€€€€ððððððð FðFðFðFðFrrGcó—eZdZdS)Ú FuturizeErrorN©rRrSrTr-rrrWrWjó€€€€€Ø€DrrWcó—eZdZdS)ÚPasteurizeErrorNrXr-rrr[r[mrYrr[cóz—eZdZdZd„Z dd„Zdd„Zd„Z dd „Zd „Z dd „Z dd „Z dd„Z d e jfd„ZdS)Ú CodeHandlerzt Handy mixin for test classes for writing / reading / futurizing / running .py files in the test suite. có†—td¦«|_td¦«|_tjg|_t j¦«tj j z|_ tj d¦«}|r,dtj ¦«tjz|zi|_dSdtj ¦«i|_dS)zi The outputs from the various futurize stages should have the following headers: zŽ from __future__ import absolute_import from __future__ import division from __future__ import print_function a4 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * Ú PYTHONPATHN)rÚheaders1Úheaders2ÚsysÚ executableÚ interpretersÚtempfileÚmkdtempÚosÚpathÚsepÚtempdirÚgetenvÚgetcwdÚpathsepÚenv)rNÚpypaths rÚsetUpzCodeHandler.setUpvs©€õ&ð' ñ ô ˆŒ õ&ð' ñ ô ˆŒ õ!œ^Ð,ˆÔÝÔ'Ñ)Ô)­B¬G¬KÑ7ˆŒ Ý”˜<Ñ(Ô(ˆØ ð 3Ø$¥b¤i¡k¤kµB´JÑ&>ÀÑ&GÐHˆDŒHˆHˆHà$¥b¤i¡k¤kÐ2ˆDŒHˆHˆHr©réFTcóð—|rt|¦«}| |¦«| ||||¬¦«| ¦«}|r |jD]} | | ¬¦«} Œ|S)a• Converts the code block using ``futurize`` and returns the resulting code. Passing stages=[1] or stages=[2] passes the flag ``--stage1`` or ``stage2`` to ``futurize``. Passing both stages runs ``futurize`` with both stages by default. If from3 is False, runs ``futurize``, converting from Python 2 to both 2 and 3. If from3 is True, runs ``pasteurize`` to convert from Python 3 to both 2 and 3. Optionally reformats the code block first using the reformat() function. If run is True, runs the resulting code under all Python interpreters in self.interpreters. )ÚstagesÚ all_importsÚfrom3Ú conservative)Ú interpreter)rÚ_write_test_scriptÚ_futurize_test_scriptÚ_read_test_scriptrdÚ_run_test_script) rNrrtrurvÚreformatÚrunrwrMrxÚ_s rÚconvertzCodeHandler.convert¡s¡€ð& ð 'Ý  Ñ&Ô&ˆDØ ×Ò Ñ%Ô%Ð%Ø ×"Ò"¨&¸kØ).¸\ð #ñ Kô Kð Kà×'Ò'Ñ)Ô)ˆØ ð CØ#Ô0ð Cð C� Ø×)Ò)°kÐ)ÑBÔB��؈ rcóè—|r*| |¦«}| |¦«}t|t¦«r*t|t¦«s| d¦«}t|t¦«r*t|t¦«s| d¦«}| t | ¦«¦«| ¦«¦«dS)a› Compares whether the code blocks are equal. If not, raises an exception so the test fails. Ignores any trailing whitespace like blank lines. If ignore_imports is True, passes the code blocks into the strip_future_imports method. If one code block is a unicode string and the other a byte-string, it assumes the byte-string is encoded as utf-8. úutf-8N)Ústrip_future_importsÚ isinstanceÚbytesÚdecodeÚ assertEqualrEÚrstrip)rNrMÚexpectedÚignore_importss rÚcomparezCodeHandler.compare¿sÜ€ð ð ;Ø×.Ò.¨vÑ6Ô6ˆFØ×0Ò0°Ñ:Ô:ˆHÝ �f�eÑ $Ô $ð ,­Z¸Å%Ñ-HÔ-Hð ,Ø—]’] 7Ñ+Ô+ˆFÝ �h¥Ñ &Ô &ð 0­z¸&Å%Ñ/HÔ/Hð 0Ø—’ wÑ/Ô/ˆHØ ×ÒÕ+¨F¯MªM©O¬OÑ<Ô<Ø!ŸšÑ*Ô*ñ ,ô ,ð ,ð ,ð ,rcóB—g}| d¦«D]s}| d¦«s\| d¦«sG| d¦«s2d|vs.d|vs*| d¦«s| |¦«Œtd |¦«S)a Strips any of these import lines: from __future__ import from future from future. from builtins or any line containing: install_hooks() or: install_aliases() Limitation: doesn't handle imports split across multiple lines like this: from __future__ import (absolute_import, division, print_function, unicode_literals) rrz from future zfrom builtins zinstall_hooks()zinstall_aliases()z from future.)r2rr9r:)rNrrMrs rrƒz CodeHandler.strip_future_importsÕs·€ð(ˆð—J’J˜tÑ$Ô$ð $ð $ˆDØ—O’OÐ$=Ñ>Ô>ð $Ø—’ ~Ñ6Ô6ð $à—’Ð'7Ñ8Ô8ð $ð)¨DÐ0Ð0Ø*¨dÐ2Ð2à—’ ~Ñ6Ô6ð3ð— ’ ˜dÑ#Ô#Ð#øØ�yŠy˜Ñ Ô Ð rc óÊ—| ||||||¬¦«} |rd|vr|jn|j} nd} t|¦«} | | vrd} | | | | z|¬¦«dS)a< Convenience method that calls convert() and compare(). Reformats the code blocks automatically using the reformat_code() function. If all_imports is passed, we add the appropriate import headers for the stage(s) selected to the ``expected`` code-block, so they needn't appear repeatedly in the test code. If ignore_imports is True, ignores the presence of any lines beginning: from __future__ import ... from future import ... for the purpose of the comparison. )rtrurvr~rwrrÚ)rŠN)r€rar`rr‹) rNÚbeforer‰rtrurŠrvr~rwrMÚheadersÚ reformatteds rÚ convert_checkzCodeHandler.convert_check÷s�€ð*—’˜f¨VÀØ$)¨sÀðñOôOˆà ð Ø'(¨F { {�d”m�m¸¼ ˆGˆGàˆGå# HÑ-Ô-ˆ Ø �kÐ !Ð !؈Gà � Š �V˜W {Ñ2Ø$2ð ñ 4ô 4ð 4ð 4ð 4rc ó$—|j||fi|¤ŽdS)ze Convenience method to ensure the code is unchanged by the futurize process. N)r’)rNrÚkwargss rÚ unchangedzCodeHandler.unchangeds'€ð ˆÔ˜4 Ð0Ð0¨Ð0Ð0Ð0Ð0Ð0rúmytestscript.pycó—t|t¦«r| d¦«}tj|j|zdd¬¦«5}| t|¦«¦«ddd¦«dS#1swxYwYdS)zœ Dedents the given code (a multiline string) and writes it out to a file in a temporary folder like /tmp/tmpUDCn7x/mytestscript.py. r‚Úwt©ÚencodingN)r„r…r†ÚioÚopenrjÚwriter)rNrÚfilenameÚfs rryzCodeHandler._write_test_script!s¾€õ �d�EÑ "Ô "ð (Ø—;’;˜wÑ'Ô'ˆDå ŒW�T”\ HÑ,¨d¸WÐ EÑ EÔ Eð "ÈØ �GŠG•F˜4‘L”LÑ !Ô !Ð !ð "ð "ð "ñ "ô "ð "ð "ð "ð "ð "ð "ð "øøøð "ð "ð "ð "ð "ð "sÁ #A:Á:A>ÂA>cóœ—tj|j|zdd¬¦«5}| ¦«}ddd¦«n #1swxYwY|S)NÚrtr‚r™)r›rœrjÚread)rNržrŸÚ newsources rr{zCodeHandler._read_test_script,s…€Ý ŒW�T”\ HÑ,¨d¸WÐ EÑ EÔ Eð !ÈØŸš™œˆIð !ð !ð !ñ !ô !ð !ð !ð !ð !ð !ð !øøøð !ð !ð !ð !àÐs AÁAÁAc ó—g}t|¦«}|r| d¦«|rd}n]d}|dgkr| d¦«n'|dgkr| d¦«n |ddgksJ‚|r| d¦«|j|z}tj|g|zd |gz} t | t |j¬ ¦«} n¾#t$r±} t|¦«5} d d   | ¦«›d d|jz›d|›dd|   ¦«z›�} ddd¦«n #1swxYwYd|vrtnt}t| d¦«sd| _|| | j| j| j¬¦«‚d} ~ wwxYw| S)Nz --all-importsz pasteurize.pyz futurize.pyrz--stage1rrz--stage2z--conservativez-w)ÚstderrrnúError running the command ú rúenv=%sú Contents of file ú: ú ---- %s ----ÚfuturizerM©rM)Úlistr9rjrbrcr r rnr rœr:r¢rWr[ÚhasattrrMrKrL)rNržrtrurvrwÚparamsÚscriptÚfnÚ call_argsrMÚerŸrJÚ ErrorClasss rrzz!CodeHandler._futurize_test_script1s€ðˆÝ�f‘”ˆØ ð +Ø �MŠM˜/Ñ *Ô *Ð *Ø ð 0Ø$ˆFˆFà"ˆFؘ!˜Š}ˆ}Ø— ’ ˜jÑ)Ô)Ð)Ð)ؘA˜3’�Ø— ’ ˜jÑ)Ô)Ð)Ð)à ! Q Ò'Ð'Ð'Ð'Øð 0Ø— ’ Ð.Ñ/Ô/Ð/ðŒ\˜HÑ $ˆÝ”^ VÐ,¨vÑ5¸¸r¸ ÑBˆ ð HÝ! )µFÀÄÐIÑIÔIˆFˆFøÝ!ð Hð Hð HÝ�b‘”ð ˜Q˜Q🚠Ñ+Ô+Ð+Ð+Ø  4¤8Ñ+Ð+Ð+ؘ˜Ø(¨1¯6ª6©8¬8Ñ3Ð3ð �ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð,6¸Ð+?Ð+?�-˜-Å_ˆJå˜1˜hÑ'Ô'ð à�”Ø�*˜S !¤,°´¸a¼hÐGÑGÔGÐ Gøøøøð% Høøøð&ˆ s=Â,C à FÃE?Ã"?D-Ä! E?Ä-D1 Ä1E?Ä4D1 Ä5A E?Å?Fc ó¾—|j|z} t||g|jt¬¦«}n²#t$r¥}t |¦«5}dd ||g¦«›dd|jz›d|›dd| ¦«z›�}ddd¦«n #1swxYwYt|d ¦«sd|_ t||j |j |j ¬ ¦«‚d}~wwxYw|S) N)rnr¥r¦r§rr¨r©rªr«rMr­) rjr rnr r rœr:r¢r¯rMrGrKrL)rNržrxr²rMr´rŸrJs rr|zCodeHandler._run_test_script`sI€ðŒ\˜HÑ $ˆð WÝ! ;°Ð"3Ø&*¤hµvð?ñ?ô?ˆFˆFøå!ð Wð Wð WÝ�b‘”ð ˜Q˜Q🚠+¨rÐ!2Ñ3Ô3Ð3Ð3Ø  4¤8Ñ+Ð+Ð+ؘ˜Ø(¨1¯6ª6©8¬8Ñ3Ð3ð �ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð õ˜1˜hÑ'Ô'ð à�”Ý+¨C°´¸q¼uÈQÌXÐVÑVÔVÐ Vøøøøð! Wøøøð"ˆ s9Œ+« CµCÁAB CÂB ÂCÂB ÂÒ>¸xØ?C¼}ñ Nô Nñ Oô Oð Oð Oð Oð × Ò Ð1×8Ò8¸ÑBÔBÑ CÔ CÐ CÐ CÐ Cs¢ /¯AÁAN)rRrSrTrUrírñr-rrrârâÊs=€€€€€ØLÐLð ð ð ð Dð Dð Dð Dð DrrâcóT—t|||¦«}| d|||¦«S)a•Fail unless a warning of class warnClass is triggered by callable_obj when invoked with arguments args and keyword arguments kwargs. If a different type of warning is triggered, it will not be handled: depending on the other warning filtering rules in effect, it might be silenced, printed out, or raised as an exception. If called with callable_obj omitted or None, will return a context object used like this:: with self.assertWarns(SomeWarning): do_something() An optional keyword argument 'msg' can be provided when assertWarns is used as a context object. The context manager keeps a reference to the first matching warning as the 'warning' attribute; similarly, the 'filename' and 'lineno' attributes give you information about the line of Python code from which the warning was triggered. This allows you to inspect the warning after the assertion:: with self.assertWarns(SomeWarning) as cm: do_something() the_warning = cm.warning self.assertEqual(the_warning.some_attribute, 147) Ú assertWarns)rârà)rNÚexpected_warningr×rßr”Úcontexts rrþrþûs.€õ8"Ð"2°D¸,ÑGÔG€GØ �>Š>˜-¨°t¸VÑ DÔ DÐDrrþrI),Ú __future__rrrgrer¸rbrÉrêr›ÚtextwraprÚ future.utilsrrrr r Úfuture.moves.subprocessr r r Ú unittest2rrErGrWr[ÚTestCaser]ÚskipIfÚskip26r¼r¿rÂrÄr¯ÚassertRaisesRegexprÅrÐÚobjectrÒrârþr-rrúr s!ðØ6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ø € € € Ø€€€Ø€€€Ø € € € Ø € € € Ø€€€Ø € € € ØÐÐÐÐÐà:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:ØLÐLÐLÐLÐLÐLÐLÐLÐLÐLàð!Ø Ð Ð Ð ðððð= ð= ð= ð@ Fð Fð Fð Fð FÐ 2ñ Fô Fð Fð ð ð ð ð Ð-ñ ô ð ð ð ð ð ð Ð/ñ ô ð ðGðGðGðGðG�(Ô#ñGôGðGðV ˆŒ˜ÐDÑ EÔ E€ð*ð*ð*ð *ð*ð*ð *ð*ð*ð *ð*ð*ð€wˆxÔ Ð"5Ñ6Ô6ðOØ*2Ô*;Ô*N€HÔÔ'ð)ð)ð)ð)ð€wˆxÔ  -Ñ0Ô0ð?Ø€K�Ô! =°+Ñ>Ô>Ð>ð *ð *ð *ð *ð *˜vñ *ô *ð *ðD.Dð.Dð.Dð.Dð.DÐ2ñ.Dô.Dð.DðbEðEðEðEð>€wˆxÔ  -Ñ0Ô0ð?Ø€K�Ô! =°+Ñ>Ô>Ð>Ð>Ð>ð?ð?r