File manager - Edit - /opt/saltstack/salt/lib/python3.10/lib2to3/fixes/__pycache__/fix_urllib.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlmZmZ ddlmZmZmZmZm Z m Z mZ dg d�fdg d�fdd gfgdg d �fdddgfgd �Zed � ed d � dd� ZG dd� de�ZdS )z�Fix changes imports of urllib which are now incompatible. This is rather similar to fix_imports, but because of the more complex nature of the fixing for urllib, it has its own fixer. � )� alternates� FixImports)�Name�Comma� FromImport�Newline�find_indentation�Node�symszurllib.request) Z URLopenerZFancyURLopenerZurlretrieveZ _urlopener�urlopenZ urlcleanupZpathname2urlZurl2pathnameZ getproxieszurllib.parse)�quote� quote_plus�unquote�unquote_plus� urlencode� splitattr� splithost� splitnport�splitpasswd� splitport� splitquery�splittag� splittype� splituser� splitvaluezurllib.errorZContentTooShortError)r Zinstall_openerZbuild_opener�RequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandler�FileHandlerZ FTPHandlerZCacheFTPHandlerZUnknownHandler�URLError� HTTPError)�urllib�urllib2r r � c c sx � t � } t�� D ]1\}}|D ]*}|\}}t|�}d||f V d|||f V d| V d| V d||f V qqd S )Nz�import_name< 'import' (module=%r | dotted_as_names< any* module=%r any* >) > z�import_from< 'from' mod_member=%r 'import' ( member=%s | import_as_name< member=%s 'as' any > | import_as_names< members=any* >) > zIimport_from< 'from' module_star=%r 'import' star='*' > ztimport_name< 'import' dotted_as_name< module_as=%r 'as' any > > zKpower< bare_with_attr=%r trailer< '.' member=%s > any* > )�set�MAPPING�itemsr )ZbareZ old_moduleZchanges�changeZ new_module�members� r'