kr.motd.maven.sphinx.dist.jinja2.sandbox$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1} f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ j
jinja2.sandbox
~~~~~~~~~~~~~~
Adds a sandbox layer to Jinja as it was the default behavior in the old
Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the
default behavior is easier to use.
The behavior can be changed by subclassing the environment.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD.
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
types org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
operator " collections $ java/lang/String & Mapping (
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; * +
, jinja2.environment . Environment 0 jinja2.exceptions 2
SecurityError 4 jinja2._compat 6 string_types 8 PY2 : jinja2.utils < Markup >
markupsafe @ EscapeFormatter B string D Formatter F ?? org/python/core/Py I
newInteger (I)Lorg/python/core/PyInteger; K L
J M MAX_RANGE O getname .(Ljava/lang/String;)Lorg/python/core/PyObject; Q R
S org/python/core/PyObject U __nonzero__ ()Z W X
V Y set [ org/python/core/PyList ] func_closure _ func_code a func_dict c
func_defaults e func_globals g ([Lorg/python/core/PyObject;)V i j
^ k __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; m n
V o UNSAFE_FUNCTION_ATTRIBUTES q 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; m s
V t im_class v im_func x im_self z UNSAFE_METHOD_ATTRIBUTES | gi_frame ~ gi_code ? UNSAFE_GENERATOR_ATTRIBUTES ? cr_frame ? cr_code ? UNSAFE_COROUTINE_ATTRIBUTES ? ag_code ? ag_frame ? !UNSAFE_ASYNC_GENERATOR_ATTRIBUTES ? warnings ? filterwarnings ? __getattr__ ? R
V ? ignore ? the sets module ? DeprecationWarning ? jinja2.sandbox ? module ? g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; m ?
V ? deque ? org/python/core/PyTuple ?
? k _mutable_set_types ? dict ? _mutable_mapping_types ? list ? _mutable_sequence_types ? UserDict ? DictMixin ? UserList ? _iadd 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
V ? setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException; ? ?
J ? ImportError ? org/python/core/PyException ? match (Lorg/python/core/PyObject;)Z ? ?
? ? java/lang/Throwable ? sets ? Set ?
MutableSet ? MutableMapping ? MutableSequence ? frozenset ? add ? clear ? difference_update ? discard ? pop ? remove ? symmetric_difference_update ? update ? popitem ?
setdefault ? append ? reverse ? insert ? sort ? extend ?
appendleft ?
extendleft ? popleft ? rotate ?
_mutable_spec ? _MagicFormatMapping ? _MagicFormatMapping$1
__module__ __name__ ?This class implements a dummy wrapper to fix a bug in the Python
standard library for string formatting.
See https://bugs.python.org/issue13598 for information about why
this is necessary.
EmptyObjects [Lorg/python/core/PyObject; J
org/python/core/PyFunction f_globals Lorg/python/core/PyObject;
__init__$2 getlocal (I)Lorg/python/core/PyObject;
_args __setattr__
V _kwargs _last_index f_lasti I ! " None$ J% jinja2/sandbox$py' Lorg/python/core/PyCode;) (* j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V i,
- __init__/
__getitem__$3 2 _eq4 ?
V5 (ILorg/python/core/PyObject;)V 7
8 __getitem__: ?
V; LookupError= getglobal? R
@ strB1) (D:
__iter__$4 iterHG) (J __iter__L __len__$5 lenON) (Q __len__S getf_locals ()Lorg/python/core/PyObject;UV
W) (Y makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;[\
J] java/util/Arrays_ fill (([Ljava/lang/Object;Ljava/lang/Object;)Vab
`c inspect_format_method$6
isinstancef
MethodTypeh BuiltinMethodTypej m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ml
Vm __not__oV
Vp formatr _net ?
Vu$ __self__xe) (z inspect_format_method| safe_range$7 WA range that can't generate ranges with a length of more than
MAX_RANGE items.
range?
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;??
V? _gt? ?
V?
OverflowError? +range too big, maximum size for range is %d? _mod? ?
V?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;??
J?~) (?
safe_range? unsafe$8 nMarks a function or method as unsafe.
::
@unsafe
def delete(self):
pass
? True? unsafe_callable??) (? unsafe? is_internal_attribute$9?Test if the attribute given is an internal python attribute. For
example this function returns `True` for the `func_code` attribute of
python objects. This is useful if the environment method
:meth:`~SandboxedEnvironment.is_safe_attribute` is overridden.
>>> from jinja2.sandbox import is_internal_attribute
>>> is_internal_attribute(str, "mro")
True
>>> is_internal_attribute(str, "upper")
False
? FunctionType? _in? ?
V? type? mro? CodeType?
TracebackType? FrameType?
GeneratorType? hasattr?
CoroutineType? AsyncGeneratorType?
startswith? __??) (? is_internal_attribute? modifies_known_mutable$10?This function checks if an attribute on a builtin mutable object
(list, dict, set or deque) would modify it if called. It also supports
the "user"-versions of the objects (`sets.Set`, `UserDict.*` etc.) and
with Python 2.6 onwards the abstract base classes `MutableSet`,
`MutableMapping`, and `MutableSequence`.
>>> modifies_known_mutable({}, "clear")
True
>>> modifies_known_mutable({}, "keys")
False
>>> modifies_known_mutable([], "append")
True
>>> modifies_known_mutable([], "index")
False
If called with an unsupported object (such as unicode) `False` is
returned.
>>> modifies_known_mutable("foo", "upper")
False
?LV
V? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;??
J? __iternext__?V
V? False??) (? modifies_known_mutable? SandboxedEnvironment? SandboxedEnvironment$11?The sandboxed environment. It works like the regular environment but
tells the compiler to generate sandboxed code. Additionally subclasses of
this environment may override the methods that tell the runtime what
attributes or functions are safe to access.
If the template tries to access insecure code a :exc:`SecurityError` is
raised. However also other exceptions may occur during the rendering so
the caller has to ensure that all exceptions are caught.
? sandboxed? org/python/core/PyDictionary? +? -? sub? *? mul? /? truediv? //? floordiv? **? pow? %? mod?
? k default_binop_table? pos? neg default_unop_table intercepted_binops intercepted_unops intercept_unop$12?Called during template compilation with the name of a unary
operator to check if it should be intercepted at runtime. If this
method returns `True`, :meth:`call_unop` is excuted for this unary
operator. The default implementation of :meth:`call_unop` will use
the :attr:`unop_table` dictionary to perform the operator with the
same logic as the builtin one.
The following unary operators are interceptable: ``+`` and ``-``
Intercepted calls are always slower than the native operator call,
so make sure only to intercept the ones you are interested in.
.. versionadded:: 2.6
) ( intercept_unop
__init__$13 globals __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V
V copy binop_table
unop_table) ( is_safe_attribute$14YThe sandboxed environment will call this method to check if the
attribute of an object is safe to access. Per default all attributes
starting with an underscore are considered private as well as the
special attributes of internal python objects as returned by the
:func:`is_internal_attribute` function.
_!) (# is_safe_attribute% is_safe_callable$15Check if an object is safely callable. Per default a function is
considered safe unless the `unsafe_callable` attribute exists and is
True. Override this method to alter the behavior, but this won't
affect the `unsafe` decorator from this module.
( getattr* ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; m,
V- alters_data/') (1 is_safe_callable3
call_binop$16 ?For intercepted binary operator calls (:meth:`intercepted_binops`)
this function is executed instead of the builtin operator. This can
be used to fine tune the behavior of certain operators.
.. versionadded:: 2.6
65) (8
call_binop: call_unop$17 ?For intercepted unary operator calls (:meth:`intercepted_unops`)
this function is executed instead of the builtin operator. This can
be used to fine tune the behavior of certain operators.
.. versionadded:: 2.6
=<) (? call_unopA
getitem$18 (Subscribe an object from sandboxed code.D TypeErrorF ExceptionH AttributeErrorJ unsafe_undefinedL undefinedN objP nameRC) (T getitemV
getattr$19 ?Subscribe an object from sandboxed code and prefer the
attribute. The attribute passed *must* be a bytestring.
YX) ([ unsafe_undefined$20 1Return an undefined object for unsafe attributes.^ .access to attribute %r of %r object is unsafe.` __class__b excd]) (f format_string$21 ?If a format call is detected, then this is routed through this
method so that our safety sandbox can be used for it.
i SandboxedEscapeFormatterk escapem SandboxedFormattero vformatqh) (s
format_stringu call$22 #Call an object from sandboxed code.x _isnotz ?
V{ %r is not safely callable} callw) (??) (? ImmutableSandboxedEnvironment? ImmutableSandboxedEnvironment$23 ?Works exactly like the regular `SandboxedEnvironment` but does not
permit modifications on the builtin mutable objects `list`, `set`, and
`dict` by using the :func:`modifies_known_mutable` function.
? is_safe_attribute$24 ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; m?
V??) (??) (? _string? formatter_field_name_split? formatter_field_name_split$25 _formatter_field_name_split??) (? object? SandboxedFormatterMixin? SandboxedFormatterMixin$26 __init__$27 _env??) (? get_field$28 get_value??) (? get_field??) (? SandboxedFormatter$29 __init__$30?) (??) (? SandboxedEscapeFormatter$31 __init__$32?) (??) (? (Ljava/lang/String;)V org/python/core/PyFunctionTable? ()V i?
?? self Ljinja2/sandbox$py;?? (? ? newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;??
J? ) (?? args? kwargs? key? idx? callable? rng? f? attr? typespec? value? context? left? right? arg? argument? attribute? s? formatter? rv? __self? __context? __obj? fmt?
field_name? env? first? rest is_attr i getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V' i?
(
( org/python/core/CodeLoader createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;
runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V
J getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrap )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
($
(&
((1
(*G
(,N
(.e
(0~
(2?
(4?
(6?
(8?
(:
(<
(>
(@'
(B5
(D<