HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/__pycache__/codeop.cpython-310.pyc
o

�N�g��@svdZddlZddlZdd�ejD�Zgd�ZdZdZdd	�Zd
d�Z	dd
�Z
ddd�ZGdd�d�ZGdd�d�Z
dS)aAUtilities to compile possibly incomplete Python source code.

This module provides two interfaces, broadly similar to the builtin
function compile(), which take program text, a filename and a 'mode'
and:

- Return code object if the command is complete and valid
- Return None if the command is incomplete
- Raise SyntaxError, ValueError or OverflowError if the command is a
  syntax error (OverflowError and ValueError can be produced by
  malformed literals).

The two interfaces are:

compile_command(source, filename, symbol):

    Compiles a single command in the manner described above.

CommandCompiler():

    Instances of this class have __call__ methods identical in
    signature to compile_command; the difference is that if the
    instance compiles program text containing a __future__ statement,
    the instance 'remembers' and compiles all subsequent program texts
    with the statement in force.

The module also provides another class:

Compile():

    Instances of this class act like the built-in function compile,
    but with 'memory' in the sense described above.
�NcCsg|]}tt|��qS�)�getattr�
__future__)�.0�fnamerr�,/opt/saltstack/salt/lib/python3.10/codeop.py�
<listcomp>&s�r)�compile_command�Compile�CommandCompilerii@cCs|�d�D]}|��}|r|ddkrnq|dkrd}t���[t�dttf�z||||�WnBtysz||d||�WYWd�dStyp}zdt|�vrfWYd}~YWd�dSWYd}~nd}~wwYnwWd�n1s~wY||||�S)N�
r�#�eval�pass�ignorezincomplete input)	�split�strip�warnings�catch_warnings�simplefilter�
SyntaxWarning�DeprecationWarning�SyntaxError�str)�compiler�source�filename�symbol�line�errr�_maybe_compile1s8�
��	�����
r cCs4t|�}t|�}d|vrd|vrdS||krdSdS)Nzwas never closedFT)�repr)Zerr1Zerr2Zrep1Zrep2rrr�_is_syntax_errorLsr"cCst|||ttB�S�N)�compile�PyCF_DONT_IMPLY_DEDENT�PyCF_ALLOW_INCOMPLETE_INPUT�rrrrrr�_compileUsr(�<input>�singlecCstt|||�S)a�Compile a command and determine whether it is incomplete.

    Arguments:

    source -- the source string; may contain \n characters
    filename -- optional filename from which source was read; default
                "<input>"
    symbol -- optional grammar start symbol; "single" (default), "exec"
              or "eval"

    Return value / exceptions raised:

    - Return a code object if the command is complete and valid
    - Return None if the command is incomplete
    - Raise SyntaxError, ValueError or OverflowError if the command is a
      syntax error (OverflowError and ValueError can be produced by
      malformed literals).
    )r r(r'rrrr	Xsr	c@s eZdZdZdd�Zdd�ZdS)r
z�Instances of this class behave much like the built-in compile
    function, but if one is used to compile text containing a future
    statement, it "remembers" and compiles all subsequent program texts
    with the statement in force.cCsttB|_dSr#)r%r&�flags��selfrrr�__init__rszCompile.__init__cCs<t||||jd�}tD]}|j|j@r|j|jO_q|S)NT)r$r+�	_features�co_flagsZ
compiler_flag)r-rrrZcodeobZfeaturerrr�__call__us�zCompile.__call__N��__name__�
__module__�__qualname__�__doc__r.r1rrrrr
msr
c@s"eZdZdZdd�Zd	dd�ZdS)
ra(Instances of this class have __call__ methods identical in
    signature to compile_command; the difference is that if the
    instance compiles program text containing a __future__ statement,
    the instance 'remembers' and compiles all subsequent program texts
    with the statement in force.cCst�|_dSr#)r
rr,rrrr.�szCommandCompiler.__init__r)r*cCst|j|||�S)a�Compile a command and determine whether it is incomplete.

        Arguments:

        source -- the source string; may contain \n characters
        filename -- optional filename from which source was read;
                    default "<input>"
        symbol -- optional grammar start symbol; "single" (default) or
                  "eval"

        Return value / exceptions raised:

        - Return a code object if the command is complete and valid
        - Return None if the command is incomplete
        - Raise SyntaxError, ValueError or OverflowError if the command is a
          syntax error (OverflowError and ValueError can be produced by
          malformed literals).
        )r r)r-rrrrrrr1�szCommandCompiler.__call__N�r)r*r2rrrrr|srr7)r6rrZall_feature_namesr/�__all__r%r&r r"r(r	r
rrrrr�<module>s"�