a
    Wä%b=  ã                   @   s`   d Z ddlmZmZmZ ddlmZ g d¢Zdd„ Zej	sXeD ]Z
ee
ƒeƒ e
< q>eZng ZdS )aý  
This disables builtin functions (and one exception class) which are
removed from Python 3.3.

This module is designed to be used like this::

    from future.builtins.disabled import *

This disables the following obsolete Py2 builtin functions::

    apply, cmp, coerce, execfile, file, input, long,
    raw_input, reduce, reload, unicode, xrange

We don't hack __builtin__, which is very fragile because it contaminates
imported modules too. Instead, we just create new functions with
the same names as the obsolete builtins from Python 2 which raise
NameError exceptions when called.

Note that both ``input()`` and ``raw_input()`` are among the disabled
functions (in this module). Although ``input()`` exists as a builtin in
Python 3, the Python 2 ``input()`` builtin is unsafe to use because it
can lead to shell injection. Therefore we shadow it by default upon ``from
future.builtins.disabled import *``, in case someone forgets to import our
replacement ``input()`` somehow and expects Python 3 semantics.

See the ``future.builtins.misc`` module for a working version of
``input`` with Python 3 semantics.

(Note that callable() is not among the functions disabled; this was
reintroduced into Python 3.2.)

This exception class is also disabled:

    StandardError

é    )ÚdivisionÚabsolute_importÚprint_function)Úutils)ÚapplyÚchrÚcmpZcoerceZexecfileÚfileÚinputÚlongÚ	raw_inputÚreduceÚreloadÚunicodeÚxrangeÚStandardErrorc                    s   ‡ fdd„}|S )z2
    Returns a function that cannot be called
    c                     s   t d ˆ ¡ƒ‚dS )zy
        A function disabled by the ``future`` module. This function is
        no longer a builtin in Python 3.
        z)obsolete Python 2 builtin {0} is disabledN)Ú	NameErrorÚformat)ÚargsÚkwargs©Úname© úh/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/future/builtins/disabled.pyÚdisabled4   s    z#disabled_function.<locals>.disabledr   )r   r   r   r   r   Údisabled_function0   s    r   N)Ú__doc__Ú
__future__r   r   r   Úfuturer   ZOBSOLETE_BUILTINSr   ÚPY3ÚfnameÚlocalsÚ__all__r   r   r   r   Ú<module>   s   %