File: //usr/lib/python3.5/encodings/__pycache__/idna.cpython-35.pyc
Fa# @ s d d l Z d d l Z d d l Z d d l m Z e j d Z d Z d Z d d Z d d Z
d
d Z Gd d
d
e j Z Gd d d e j
Z Gd d d e j Z Gd d d e e j Z Gd d d e e j Z d d Z d S) N) ucd_3_2_0u [.。.。]s xn--zxn--c C s} g } x6 | D]. } t j | r% q
| j t j | q
Wd j | } t j d | } x | D] } t j | s t j | s t j | s t j
| s t j | s t j | s t j
| s t j | s t j | rg t d | qg Wd d | D } x[ | D]S } | r"t d d | D rSt d | d si| d r"t d q"W| S)
N ZNFKCzInvalid character %rc S s g | ] } t j | q S )
stringprepZin_table_d1).0xr r $/usr/lib/python3.5/encodings/idna.py
<listcomp>) s znameprep.<locals>.<listcomp>c s s | ] } t j | Vq d S)N)r Zin_table_d2)r r r r r <genexpr>2 s znameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r zViolation of BIDI requirement 3)r Zin_table_b1appendZmap_table_b2joinunicodedataZ normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9UnicodeErrorany)labelZnewlabelcZRandALr r r nameprep s4
r c C s* y | j d } Wn t k
r' Yn3 Xd t | k oE d k n rN | St d t | } y | j d } Wn t k
r Yn3 Xd t | k o d k n r | St d | j t r t d | j d } t | } d t | k od k n r| St d d S)Nasciir @ zlabel empty or too longzLabel starts with ACE prefixpunycode)encoder lenr
startswithsace_prefix
ace_prefix)r r r r ToASCII>