zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
U
G=®dP    ã@sldZddlZddlmZddlmZddlmZm    Z    ddl
Z
ddl m Z Gdd    „d    eƒZ Gd
d „d eƒZdS) zy
Customized Mixin2to3 support:
 
 - adds support for converting doctests
 
 
This module raises an ImportError on Python 2.
éN)Ú    Mixin2to3)Úlog)ÚRefactoringToolÚget_fixers_from_packageé)ÚSetuptoolsDeprecationWarningc@s$eZdZdd„Zdd„Zdd„ZdS)ÚDistutilsRefactoringToolcOstj|f|žŽdS©N)rÚerror)ÚselfÚmsgÚargsÚkw©rúLD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/lib2to3_ex.pyÚ    log_errorsz"DistutilsRefactoringTool.log_errorcGstj|f|žŽdSr    )rÚinfo©r r r rrrÚ log_messagesz$DistutilsRefactoringTool.log_messagecGstj|f|žŽdSr    )rÚdebugrrrrÚ    log_debugsz"DistutilsRefactoringTool.log_debugN)Ú__name__Ú
__module__Ú __qualname__rrrrrrrrsrc@s&eZdZd    dd„Zdd„Zdd„ZdS)
rFcCs~|jjdk    rdS|sdSt dt¡t dd |¡¡| ¡|     ¡|rnt
j rzt |j ƒ}|j|dddn t ||¡dS)NTz¥2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.zFixing ú )ÚwriteZ doctests_only)Ú distributionZuse_2to3ÚwarningsÚwarnrrrÚjoinÚ_Mixin2to3__build_fixer_namesÚ_Mixin2to3__exclude_fixersÚ
setuptoolsZrun_2to3_on_doctestsrÚ fixer_namesÚrefactorÚ
_Mixin2to3Úrun_2to3)r ÚfilesZdoctestsÚrrrrr&s  û
zMixin2to3.run_2to3cCsZ|jr
dSg|_tjD]}|j t|ƒ¡q|jjdk    rV|jjD]}|j t|ƒ¡q@dSr    )r#r"Zlib2to3_fixer_packagesÚextendrrZuse_2to3_fixers)r ÚprrrZ__build_fixer_names7s
  zMixin2to3.__build_fixer_namescCsJt|dgƒ}|jjdk    r&| |jj¡|D]}||jkr*|j |¡q*dS)NZexclude_fixers)ÚgetattrrZuse_2to3_exclude_fixersr)r#Úremove)r Zexcluded_fixersZ
fixer_namerrrZ__exclude_fixersAs   
zMixin2to3.__exclude_fixersN)F)rrrr&r r!rrrrrs
 
r)Ú__doc__rÚdistutils.utilrr%Ú    distutilsrÚlib2to3.refactorrrr"Z_deprecation_warningrrrrrrÚ<module>s