Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/future/standard_library/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/future/standard_library/__init__.pyo
�
,�]c@`s�dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZejd�Z
ejej�Zej�Zeje�e
je�e
jej�ddlmZmZedddd	g�Zi
d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6Zd_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrgZdGefdH��YZdIefdJ��YZ er�ndK�Z!dL�Z"dM�Z#dNefdO��YZ$dP�Z%dQ�Z&dR�Z'dS�Z(e)dT�Z*dU�Z+dV�Z,e-edW�saie_.ndX�Z/e)dY�Z0dZ�Z1d[efd\��YZ2d
ddd ddddd]dddd"dgZ3d^�Z4dS(ss�
Python 3 reorganized the standard library (PEP 3108). This module exposes
several standard library modules to Python 2 under their new Python 3
names.

It is designed to be used as follows::

    from future import standard_library
    standard_library.install_aliases()

And then these normal Py3 imports work on both Py3 and Py2::

    import builtins
    import copyreg
    import queue
    import reprlib
    import socketserver
    import winreg    # on Windows only
    import test.support
    import html, html.parser, html.entites
    import http, http.client, http.server
    import http.cookies, http.cookiejar
    import urllib.parse, urllib.request, urllib.response, urllib.error, urllib.robotparser
    import xmlrpc.client, xmlrpc.server

    import _thread
    import _dummy_thread
    import _markupbase

    from itertools import filterfalse, zip_longest
    from sys import intern
    from collections import UserDict, UserList, UserString
    from collections import OrderedDict, Counter, ChainMap     # even on Py2.6
    from subprocess import getoutput, getstatusoutput
    from subprocess import check_output              # even on Py2.6

(The renamed modules and functions are still available under their old
names on Python 2.)

This is a cleaner alternative to this idiom (see
http://docs.pythonsprints.com/python3_porting/py-porting.html)::

    try:
        import queue
    except ImportError:
        import Queue as queue


Limitations
-----------
We don't currently support these modules, but would like to::

    import dbm
    import dbm.dumb
    import dbm.gnu
    import collections.abc  # on Py33
    import pickle     # should (optionally) bring in cPickle on Python 2

i(tabsolute_importtdivisiontprint_functionNt
future_stdlib(tPY2tPY3ttestturllibtpickletdbmtbuiltinst__builtin__tcopyregtcopy_regtqueuetQueuetsocketserversfuture.moves.socketservertconfigparsertConfigParsertreprlibtreprtwinregt_winregt_threadtthreadt
_dummy_threadtdummy_threadtxmlrpcsfuture.moves.xmlrpcthtmlsfuture.moves.htmlthttpsfuture.moves.httpt_markupbasesfuture.moves._markupbasetcollectionstUserListtUserDictt
UserStringtChainMapsfuture.backports.misct	itertoolstfilterfalsetifilterfalsetzip_longesttizip_longesttsystinterntretASCIItstattST_MODEtbase64tencodebytestencodestringtdecodebytestdecodestringt
subprocesst	getoutputtcommandstgetstatusoutputtcheck_outputtmathtceiltOrderedDicttCountertcounttrecursive_reprt	functoolst
cmp_to_keytRenameImportcB`s>eZdZeZd�Zdd�Zd�Zdd�Z	RS(sX
    A class for import hooks mapping Py3 module names etc. to the Py2 equivalents.
    cC`sN||_t|j��t|j��@}td�|j�D��|_dS(s�
        Pass in a dictionary-like object mapping from old names to new
        names. E.g. {'ConfigParser': 'configparser', 'cPickle': 'pickle'}
        cs`s!|]\}}||fVqdS(N((t.0toldtnew((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pys	<genexpr>�sN(t
old_to_newtsettkeystvaluestdicttitemst
new_to_old(tselfREtboth((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyt__init__�s	"cC`sCtg|jD]}|jd�d^q
�}||kr?|SdS(Nt.i(RFRKtsplittNone(RLtfullnametpathtstnew_base_names((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytfind_modules/cC`snd}|tjkr tj|S||jkrN|j|}|j|�}n|j|�}|tj|<|S(N(RQR)tmodulesRKt_find_and_load_module(RLtnameRStoldnametmodule((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytload_module	s

cC`s�|jd�}x�t|�dkr�|jd�}|j||�}y
|j}Wqtk
r�tjdj|��|t	j
kr�t	j
|Stjd�qXqW|d}tj||�}tj
||�S(sb
        Finds and loads it. But if there's a . in the name, handles it
        properly.
        ROiisPackage {0} has no __path__.sWhat to do here?(RPtlentpopRXt__path__tAttributeErrortflogtdebugtformatR)RWtimpRVR\(RLRYRStbitstpackagenametpackagetmodule_info((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRXs


N(
t__name__t
__module__t__doc__tTruetRENAMERRNRQRVR\RX(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRA�s		thookscB`s eZdZd�Zd�ZRS(s
    Acts as a context manager. Saves the state of sys.modules and restores it
    after the 'with' block.

    Use like this:

    >>> from future import standard_library
    >>> with standard_library.hooks():
    ...     import http.client
    >>> import requests

    For this to work, http.client will be scrubbed from sys.modules after the
    'with' block. That way the modules imported in the 'with' block will
    continue to be accessible in the current namespace but not from any
    imported modules (like requests).
    cC`s,tjtj�|_t�|_t�|S(N(tcopyR)RWtold_sys_modulestdetect_hooksthooks_were_installedt
install_hooks(RL((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyt	__enter__AscG`s|jst�ndS(N(Rrtremove_hooks(RLtargs((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyt__exit__Is	(RiRjRkRtRw(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRn0s	cC`str
tSdtjkr�tjtjtjg}g|D]}tjj	|�d^q8}t
t|��dks�tj
d|�n|dt_n|jtjkr�tSt|d�r�tjj	|j�}|djtj�r�d|dkr�tSntS(s�
    Tries to infer whether the module m is from the Python 2 standard library.
    This may not be reliable on all systems.
    tstdlib_pathiis<Multiple locations found for the Python standard library: %st__file__s
site-packages(RtFalsetis_py2_stdlib_modulet__dict__t
contextlibRytosRoRSRPR]RFRatwarnRxRiR)tbuiltin_module_namesRlthasattrt
startswith(tmtstdlib_filestftstdlib_pathstmodpath((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyR{Vs")	cC`s�tr
iSi}x�tttj��@D]h}|tjkrBq'ntj|}t|�r'tj	dj
|��tj|||<tj|=q'q'W|S(sE
    Removes any Python 2 standard library modules from ``sys.modules`` that
    would interfere with Py3-style imports using import hooks. Examples are
    modules with the same names (like urllib or email).

    (Note that currently import hooks are disabled for modules like these
    with ambiguous names anyway ...)
    s"Deleting (Py2) {} from sys.modules(RtREPLACED_MODULESRFtRENAMESRGR)RWR{RaRbRc(tscrubbedt
modulenameR[((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytscrub_py2_sys_modulests	
cC`siS(s
    Deprecated.
    ((((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytscrub_future_sys_modules�st
suspend_hookscB`s eZdZd�Zd�ZRS(s�
    Acts as a context manager. Use like this:

    >>> from future import standard_library
    >>> standard_library.install_hooks()
    >>> import http.client
    >>> # ...
    >>> with standard_library.suspend_hooks():
    >>>     import requests     # incompatible with ``future``'s standard library hooks

    If the hooks were disabled before the context, they are not installed when
    the context is left.
    cC`st�|_t�|S(N(RqRrRu(RL((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRt�scG`s|jrt�ndS(N(RrRs(RLRv((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRw�s	(RiRjRkRtRw(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyR��s
	cC`sgttj�t|�@}t|�dkrSt|�d}tdj|���ntjj|�dS(sp
    Add any previously scrubbed modules back to the sys.modules cache,
    but only if it's safe to do so.
    is(future module {} clashes with Py2 moduleN(RFR)RWR]tlisttImportErrorRctupdate(R�tclashtfirst((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytrestore_sys_modules�s	cC`sjtr
dSxgtD]_\}}}}t|�tj|}t|�tj|}t||�}t|||�qWddl}ddlm	}ddlm
}	ddlm}
ddlm}ddlm
}||_	|	|_
|
|_||_||_
|tjd<|	tjd	<|
tjd
<|tjd<|tjd<yddl}
Wntk
ranXydd
lm}Wntk
r�nX||
_|tjd<yddl}Wntk
r�n�Xddlm}||_|tjd<yddlm}Wntk
rnX||_|tjd<yddlm}Wntk
rOnX||_|tjd<dS(sm
    Monkey-patches the standard library in Py2.6/7 to provide
    aliases for better Py3 compatibility.
    Ni(trequest(tresponse(tparse(terror(trobotparsersurllib.requestsurllib.responsesurllib.parsesurllib.errorsurllib.robotparser(tsupportstest.support(tdumbsdbm.dumb(tgnusdbm.gnu(tndbmsdbm.ndbm(RtMOVESt
__import__R)RWtgetattrtsetattrRtfuture.backports.urllibR�R�R�R�R�RR�tfuture.moves.testR�R	tfuture.moves.dbmR�R�R�(t
newmodnamet
newobjnamet
oldmodnamet
oldobjnametnewmodtoldmodtobjRR�R�R�R�R�RR�R	R�R�R�((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytinstall_aliases�sl



					






	

	

	

	cC`s|tr
dSt�tjdjtj��tjd�tt�}t	�s_tjj
|�ntjdjtj��dS(s`
    This function installs the future.standard_library import hook into
    sys.meta_path.
    Nssys.meta_path was: {0}sInstalling hooks ...ssys.meta_path is now: {0}(RR�RaRbRcR)t	meta_pathRAR�Rqtappend(tnewhook((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRss
	cC`st�dS(s_
    Deprecated. Use install_hooks() instead. This will be removed by
    ``future`` v1.0.
    N(Rs(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytenable_hooksscC`sztr
dStjd�xLtttj��ddd�D](\}}t|d�r:tj|=q:q:W|rvt�ndS(sC
    This function removes the import hook from sys.meta_path.
    NsUninstalling hooks ...i����Rm(	RRaRbR�t	enumerateR)R�R�R�(tscrub_sys_modulestithook((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRu's
/cC`st�dS(s^
    Deprecated. Use remove_hooks() instead. This will be removed by
    ``future`` v1.0.
    N(Ru(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyt
disable_hooks;scC`s_tjd�tgtjD]}t|d�^q�}|rNtjd�n
tjd�|S(sG
    Returns True if the import hooks are installed, False if not.
    sDetecting hooks ...Rms	Detected.s
Not detected.(RaRbtanyR)R�R�(R�tpresent((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRqCs
+
tpy2_modulescC`shttj�dkrdSddl}|tjd<ddl}|tjd<ddl}|tjd<dS(s�
    Currently this function is unneeded, as we are not attempting to provide import hooks
    for modules with ambiguous names: email, urllib, pickle.
    iNRtemailR(R]R)R�RR�R(RR�R((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytcache_py2_modulesXs

c	C`s�ddl}trt|�S|r+d}nd}|jd�|jd�}g}xGt|�D]9\}}dj||d �}|j|j|��q`WxRtt	t|���D]8\}}|dkr�Pnt
||d|||�q�W|dSdS(s�
    Pass a (potentially dotted) module name of a Python 3 standard library
    module. This function imports the module compatibly on Py2 and Py3 and
    returns the top-level module.

    Example use:
        >>> http = import_('http.client')
        >>> http = import_('http.server')
        >>> urllib = import_('urllib.request')

    Then:
        >>> conn = http.client.HTTPConnection(...)
        >>> response = urllib.request.urlopen('http://mywebsite.com')
        >>> # etc.

    Use as follows:
        >>> package_name = import_(module_name)

    On Py3, equivalent to this:

        >>> import module_name

    On Py2, equivalent to this if backport=False:

        >>> from future.moves import module_name

    or to this if backport=True:

        >>> from future.backports import module_name

    except that it also handles dotted module names such as ``http.client``
    The effect then is like this:

        >>> from future.backports import module
        >>> from future.backports.module import submodule
        >>> module.submodule = submodule

    Note that this would be a SyntaxError in Python:

        >>> from future.backports import http.client

    iNsfuture.backportssfuture.movesROii(t	importlibRR�RPR�tjoinR�t
import_moduletreversedR�R�(	tmodule_nametbackportR�tprefixtpartsRWR�tparttsofar((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytimport_ts .
	% cO`s�trt|�Sd|kr5t|d�r5d}nd}|jd�|jd�}tj|d|�}g|D]}t||�^qu}t|�dkr�|dS|SdS(sa
    Example use:
        >>> HTTPConnection = from_import('http.client', 'HTTPConnection')
        >>> HTTPServer = from_import('http.server', 'HTTPServer')
        >>> urlopen, urlparse = from_import('urllib.request', 'urlopen', 'urlparse')

    Equivalent to this on Py3:

        >>> from module_name import symbol_names[0], symbol_names[1], ...

    and this on Py2:

        >>> from future.moves.module_name import symbol_names[0], ...

    or:

        >>> from future.backports.module_name import symbol_names[0], ...

    except that it also handles dotted module names such as ``http.client``.
    R�sfuture.backportssfuture.movesROiiN(RR�tboolRPR�R�R�R](R�tsymbol_namestkwargsR�R�R[RYtoutput((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytfrom_import�s
	"texclude_local_folder_importscB`s)eZdZd�Zd�Zd�ZRS(sZ
    A context-manager that prevents standard library modules like configparser
    from being imported from the local python-future source folder on Py3.

    (This was need prior to v0.16.0 because the presence of a configparser
    folder would otherwise have prevented setuptools from running on Py3. Maybe
    it's not needed any more?)
    cG`sD||_tg|jD]}d|k^q�r@td��ndS(NROs%Dotted module names are not supported(tmodule_namesR�tNotImplementedError(RLRvR�((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRN�s	(cC`s�tjtj�|_tjtj�|_tjddkrAdSdddddg}x^|jD]S}tg|D]'}tjj	tjj
||��^qp�r`tjj|�q`q`Wx;|jD]0}yt
|dd�}Wq�tk
r�q�Xq�WdS(	Niitfuturetpasttlibfuturizet
libpasteurizeR
tlevel(RoR)RStold_sys_pathRWRptversion_infotallR~texistsR�tremoveR�R�R�(RLtFUTURE_SOURCE_SUBFOLDERStfoldert	subfolderR�R[((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRt�s4
cG`sW|jt_xDt|jj��ttjj��D]}|j|tj|<q5WdS(N(R�R)RSRFRpRGRW(RLRvR�((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyRws/(RiRjRkRNRtRw(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyR��s		 ttkinterc
C`sJtt��8x0tD](}yt|�Wqtk
r;qXqWWdQXdS(N(R�tTOP_LEVEL_MODULESR�R�(R�((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pytimport_top_level_modules)s


(RR R R (RsUserDictsUserDictsUserDict(RR"R"R"(RR#sfuture.backports.miscR#(R$R%R$R&(R$R'R$R((ssyssinterns__builtin__sintern(sreR,sstatsST_MODE(sbase64R0sbase64R1(sbase64R2sbase64R3(s
subprocessR5R6R5(s
subprocessR7R6R7(s
subprocessR8sfuture.backports.miscR8(R9R:sfuture.backports.miscR:(RR;sfuture.backports.miscR;(RR<sfuture.backports.miscR<(RR#sfuture.backports.miscR#(R$scountsfuture.backports.miscscount(RR>sfuture.backports.miscR>(R?R@sfuture.backports.miscR@(5Rkt
__future__RRRR)tloggingRdR}ttypesRoR~t	getLoggerRat	FormattertBASIC_FORMATt
_formattert
StreamHandlert_handlertsetFormattert
addHandlertsetLeveltWARNtfuture.utilsRRRFR�R�R�tobjectRARnR{R�R�R�R�R�RsR�RzRuR�RqR�R�R�R�R�R�R�R�(((sD/usr/lib/python2.7/site-packages/future/standard_library/__init__.pyt<module>;s�




	 F"					P					I	&6	

Spamworldpro Mini