403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/test_importlib/source/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/test_importlib/source/__pycache__/test_source_encoding.cpython-313.pyc
�

��i����SSKJr \R"S5rSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKr\R"S\R5r"SS5r"SS\5r\R""\\S	9urr"S
S\5r\R""\\S	9urr"SS
5r"SS\5r\R""\\S	9urr"SS\5r\R""\\S	9urr\S:Xa\
R>"5 gg)�)�utilzimportlib.machineryNz&^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)c�~�\rSrSrSrSrSrSR\\5rSr	Sr
SrS	rS
r
SrSrS
rSrSrSrg)�EncodingTest�a�PEP 3120 makes UTF-8 the default encoding for source code
[default encoding].

PEP 263 specifies how that can change on a per-file basis. Either the first
or second line can contain the encoding line [encoding first line]
[encoding second line]. If the file has the BOM marker it is considered UTF-8
implicitly [BOM]. If any encoding is specified it must be UTF-8, else it is
an error [BOM and utf-8][BOM conflict].

�ü�Éz{0} = '{1}'
�_tempc��[R"UR5n[X RS5nUR	U5 SSS5 UR
R
URX R5nURU5sSSS5 $!,(df   NZ=f!,(df   g=f)N�wb)r�create_modules�module_name�open�write�	machinery�SourceFileLoader�load)�self�source�mapping�file�loaders     �DC:\Python313\\Lib\test\test_importlib\source\test_source_encoding.py�run_test�EncodingTest.run_test%s���
�
 �
 ��!1�!1�
2�g��g�.�.�/��6�$��
�
�6�"�7��^�^�4�4�T�5E�5E�29�:J�:J�2K�M�F��9�9�V�$�3�
2�6�6��3�
2�s#�B1�B �A
B1� 
B.	�*B1�1
B?c��SRU5n[RU5(deURS5/nUR	UR
RU55 SR
U5$)Nz# coding={0}�utf-8�
)�format�	CODING_RE�match�encode�append�source_line�join)r�encoding�
encoding_line�source_liness    r�
create_source�EncodingTest.create_source-sh��&�-�-�h�7�
����}�-�-�-�-�%�,�,�W�5�6�����D�,�,�3�3�H�=�>��z�z�,�'�'�c��Sn[RU5(deSRU5RS5nUR	U5 g)Nz# coding=koi8-rz	{0}
a=42
zkoi8-r)rr rr!r)rr&rs   r�test_non_obvious_encoding�&EncodingTest.test_non_obvious_encoding4sE��*�
����}�-�-�-�-��%�%�m�4�;�;�H�E���
�
�f�r*c�X�URURRS55 g�Nr)rr#r!�rs r�test_default_encoding�"EncodingTest.test_default_encoding=s���
�
�d�&�&�-�-�g�6�7r*c�L�SnURU5nURU5 g)N�Latin-1�r(r)rr%rs   r�test_encoding_on_first_line�(EncodingTest.test_encoding_on_first_lineAs#�����#�#�H�-���
�
�f�r*c�N�SURS5-nURU5 g)Ns#/usr/bin/python
r4r5�rrs  r�test_encoding_on_second_line�)EncodingTest.test_encoding_on_second_lineGs#��&��);�);�I�)F�F���
�
�f�r*c�z�UR[RURR	S5-5 gr/)r�codecs�BOM_UTF8r#r!r0s r�test_bom�EncodingTest.test_bomLs(���
�
�f�o�o��(8�(8�(?�(?��(H�H�Ir*c�j�[RURS5-nURU5 gr/)r=r>r(rr9s  r�test_bom_and_utf_8�EncodingTest.test_bom_and_utf_8Ps'�����4�#5�#5�g�#>�>���
�
�f�r*c���[RURS5-nUR[5 URU5 SSS5 g!,(df   g=f)Nzlatin-1)r=r>r(�assertRaises�SyntaxErrorrr9s  r�test_bom_conflict�EncodingTest.test_bom_conflictUsA�����4�#5�#5�i�#@�@��
�
�
�{�
+��M�M�&�!�,�
+�
+�s�A�
A!�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�variable�	characterrr#r
rr(r,r1r6r:r?rBrG�__static_attributes__rIr*rrrsX��	��H��I�!�(�(��9�=�K��K�%�(��8���
J��
"r*rc��\rSrSrSrSrg)�EncodingTestPEP451�[c���[R"UR5n[RRURU5UlURU5 U$�N)�types�
ModuleTyper
�	importlibr�spec_from_loader�__spec__�exec_module)rr�modules   rr�EncodingTestPEP451.load]sI���!�!�$�"2�"2�3��#�.�.�9�9�$�:J�:J�F�S������6�"��
r*rIN�rJrKrLrMrrQrIr*rrSrS[���r*rS)rc��\rSrSrSrSrg)�EncodingTestPEP302�ic���[R"5 [R"S[5 UR	UR
5sSSS5 $!,(df   g=f�N�ignore)�warnings�catch_warnings�simplefilter�DeprecationWarning�load_moduler
)rrs  rr�EncodingTestPEP302.loadks?��
�
$�
$�
&��!�!�(�,>�?��%�%�d�&6�&6�7�'�
&�
&�s�6A�
A$rINr_rIr*rrbrbis��8r*rbc�0�\rSrSrSrSrSrSrSrSr	g)	�LineEndingTest�vzfSource written with the three types of line endings (\n, \r\n, \r)
need to be readable [cr][crlf][lf].c�b�Sn/SQnURU5n[R"U5n[XRS5nUR	U5 SSS5 UR
R
UXR5nURXr5sSSS5 $!,(df   NF=f!,(df   g=f)Nr	)sa = 42sb = -13r*r)r$rrrrrrr)r�line_endingr
r'rrrrs        rr�LineEndingTest.run_test{s�����3���!�!�,�/��
�
 �
 ��
-���g�*�D�1�T��
�
�6�"�2��^�^�4�4�[�5<�5I�K�F��9�9�V�1�.�
-�1�1��.�
-�s"�B �B�6B �
B	�B � 
B.c�&�URS5 g)N�
�rr0s r�test_cr�LineEndingTest.test_cr�����
�
�e�r*c�&�URS5 g)Ns
rur0s r�	test_crlf�LineEndingTest.test_crlf�s���
�
�g�r*c�&�URS5 g)Nrrur0s r�test_lf�LineEndingTest.test_lf�rxr*rIN)
rJrKrLrMrNrrvrzr}rQrIr*rrnrnvs��+�	2���r*rnc��\rSrSrSrSrg)�LineEndingTestPEP451�c��[R"U5n[RR	X!5UlUR
U5 U$rV)rWrXrYrrZr[r\)rrr
r]s    rr�LineEndingTestPEP451.load�s;���!�!�+�.��#�.�.�9�9�+�N������6�"��
r*rINr_rIr*rr�r��r`r*r�c��\rSrSrSrSrg)�LineEndingTestPEP302�c��[R"5 [R"S[5 UR	U5sSSS5 $!,(df   g=fre)rgrhrirjrk)rrr
s   rr�LineEndingTestPEP302.load�s9��
�
$�
$�
&��!�!�(�,>�?��%�%�k�2�'�
&�
&�s�,A�
ArINr_rIr*rr�r��s��3r*r��__main__) �test.test_importlibr�import_importlibrr=�importlib.utilrY�rerW�unicodedata�unittestrg�compile�ASCIIrrrS�	test_both�Frozen_EncodingTestPEP451�Source_EncodingTestPEP451rb�Frozen_EncodingTestPEP302�Source_EncodingTestPEP302rnr��Frozen_LineEndingTestPEP451�Source_LineEndingTestPEP451r��Frozen_LineEndingTestPEP302�Source_LineEndingTestPEP302rJ�mainrIr*r�<module>r�s��$��!�!�"7�8�	�
��	�����
�J�J�@�"�(�(�K�	�E"�E"�P���
�^�^�&�)�<����8��8�
�^�^�&�)�<������:�>��
�^�^�(�I�>����3�>�3�
�^�^�(�I�>�����z���M�M�O�r*

Youez - 2016 - github.com/yon3zu
LinuXploit