a
    lc2                     @   s   d Z ddlZejdk redddlmZ ddlmZ ddlm	Z	 dd	l
mZ dd
lmZ ddlmZ ddlmZ dejejf ZejZejZejZdhZdddZdddZdddZdS )zW
IPython: tools for interactive and parallel computing in Python.

https://ipython.org
    N)      a  
IPython 8+ supports Python 3.8 and above, following NEP 29.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Python 3.3 and 3.4 were supported up to IPython 6.x.
Python 3.5 was supported with IPython 7.0 to 7.9.
Python 3.6 was supported with IPython up to 7.16.
Python 3.7 was still supported with the 7.x branch.

See IPython `README.rst` file for more information:

    https://github.com/ipython/ipython/blob/main/README.rst

   )get_ipython)release)Application)embed)InteractiveShell)sys_info)extract_module_localsz%s <%s>zCVE-2022-21699c                 K   sH   t d\}}| du r|} |du r$|}ddlm} |f | |d| dS )a  Embed and start an IPython kernel in a given scope.

    If you don't want the kernel to initialize the namespace
    from the scope of the surrounding function,
    and/or you want to load full IPython configuration,
    you probably want `IPython.start_kernel()` instead.

    Parameters
    ----------
    module : types.ModuleType, optional
        The module to load into IPython globals (default: caller)
    local_ns : dict, optional
        The namespace to load into IPython user namespace (default: caller)
    **kwargs : various, optional
        Further keyword args are relayed to the IPKernelApp constructor,
        allowing configuration of the Kernel.  Will only have an effect
        on the first embed_kernel call for a given process.
    r   Nr   )embed_kernel)modulelocal_ns)r   Zipykernel.embedr   )r   r   kwargsZcaller_moduleZcaller_localsZreal_embed_kernel r   L/var/www/html/django/DPS/env/lib/python3.9/site-packages/IPython/__init__.pyr   D   s    r   c                 K   s   ddl m} |f d| i|S )a  Launch a normal IPython instance (as opposed to embedded)

    `IPython.embed()` puts a shell in a particular calling scope,
    such as a function or method for debugging purposes,
    which is often not desirable.

    `start_ipython()` does full, regular IPython initialization,
    including loading startup files, configuration, etc.
    much of which is skipped by `embed()`.

    This is a public API method, and will survive implementation changes.

    Parameters
    ----------
    argv : list or None, optional
        If unspecified or None, IPython will parse command-line options from sys.argv.
        To prevent any command-line parsing, pass an empty list: `argv=[]`.
    user_ns : dict, optional
        specify this dictionary to initialize the IPython user namespace with particular values.
    **kwargs : various, optional
        Any other kwargs will be passed to the Application constructor,
        such as `config`.
    r   launch_new_instanceargv)ZIPython.terminal.ipappr   )r   r   r   r   r   r   start_ipythonb   s    r   c                 K   s6   ddl }|jdtdd ddlm} |f d| i|S )at  Launch a normal IPython kernel instance (as opposed to embedded)

    `IPython.embed_kernel()` puts a shell in a particular calling scope,
    such as a function or method for debugging purposes,
    which is often not desirable.

    `start_kernel()` does full, regular IPython initialization,
    including loading startup files, configuration, etc.
    much of which is skipped by `embed()`.

    Parameters
    ----------
    argv : list or None, optional
        If unspecified or None, IPython will parse command-line options from sys.argv.
        To prevent any command-line parsing, pass an empty list: `argv=[]`.
    user_ns : dict, optional
        specify this dictionary to initialize the IPython user namespace with particular values.
    **kwargs : various, optional
        Any other kwargs will be passed to the Application constructor,
        such as `config`.
    r   Nz`start_kernel is deprecated since IPython 8.0, use from `ipykernel.kernelapp.launch_new_instance`   )
stacklevelr   r   )warningswarnDeprecationWarningZipykernel.kernelappr   )r   r   r   r   r   r   r   start_kernel}   s    r   )NN)N)N)__doc__sysversion_infoImportErrorZcore.getipythonr   corer   Zcore.applicationr   Zterminal.embedr   Zcore.interactiveshellr	   Zutils.sysinfor
   Zutils.framer   authorauthor_email
__author__license__license__version__version__Z__patched_cves__r   r   r   r   r   r   r   <module>   s(   


