3 Re. @ s> d dl mZ ddlZddlZddlZddlZd dlmZ dZdZ ej dZejd dkr`e ZeZG d d d eZG dd deZG d d deZG dd deZdd Zdd Zdd Zdd Zdd Zdd Zd7ddZd d! Zd"d# Zd$d% Zd&d' Z d8d(d)Z!d*d+ Z"d,d- Z#d.d/ Z$d9d1d2Z%d:d3d4Z&d;d5d6Z'dS )< )idnadata N)intranges_contain s xn--u [.。.。] c @ s e Zd ZdZdS ) IDNAErrorz7 Base exception for all IDNA-encoding related problems N)__name__ __module____qualname____doc__ r r /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/idna/core.pyr s r c @ s e Zd ZdZdS ) IDNABidiErrorz= Exception when bidirectional requirements are not satisfied N)r r r r r r r r r s r c @ s e Zd ZdZdS )InvalidCodepointz> Exception when a disallowed or unallocated codepoint is used N)r r r r r r r r r s r c @ s e Zd ZdZdS )InvalidCodepointContextzE Exception when the codepoint is not valid in the context it is used N)r r r r r r r r r s r c C s0 t jt| }|dkr,t jt| s,td|S )Nr z Unknown character in unicodedata)unicodedata combiningunichrname ValueError)cpvr r r _combining_class$ s r c C s t t| tj| S )N)r ordr scripts)r scriptr r r _is_script+ s r c C s | j dS )Npunycode)encode)sr r r _punycode. s r c C s dj | S )Nz U+{0:04X})format)r r r r _unot1 s r" c C s t | dkrdS dS )N? FT)len)labelr r r valid_label_length5 s r&