kr.motd.maven.sphinx.dist.jinja2.loaders$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
???? 1U f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
jinja2.loaders
~~~~~~~~~~~~~~
Jinja loader classes.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
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
os org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
sys " weakref $ types & java/lang/String (
ModuleType *
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; , -
. path 0 hashlib 2 sha1 4 jinja2.exceptions 6 TemplateNotFound 8 jinja2.utils : open_if_exists < internalcode > jinja2._compat @ string_types B iteritems D org/python/core/Py F EmptyObjects [Lorg/python/core/PyObject; H I G J org/python/core/PyFunction L f_globals Lorg/python/core/PyObject; N O P split_template_path$1 ?Split a path into segments and perform a sanity check. If it detects
'..' in the path it will raise a `TemplateNotFound` error.
S org/python/core/PyList U ([Lorg/python/core/PyObject;)V W X
V Y (ILorg/python/core/PyObject;)V [
\ getlocal (I)Lorg/python/core/PyObject; ^ _
` split b org/python/core/PyObject d __getattr__ .(Ljava/lang/String;)Lorg/python/core/PyObject; f g
e h / j __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; l m
e n __iter__ ()Lorg/python/core/PyObject; p q
e r getglobal t g
u sep w _in 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; y z
e { __nonzero__ ()Z } ~
e altsep ? pardir ? _eq ? z
e ?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException; ? ?
G ? . ? _ne ? z
e ? append ? __iternext__ ? q
e ? f_lasti I ? ? ? jinja2/loaders$py ? Lorg/python/core/PyCode; R ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V W ?
M ? split_template_path ? object ? getname ? g
?
BaseLoader ? BaseLoader$2
__module__ ? __name__ ??Baseclass for all loaders. Subclass this and override `get_source` to
implement a custom loading mechanism. The environment provides a
`get_template` method that calls the loader's `load` method to get the
:class:`Template` object.
A very basic example for a loader that looks up templates on the file
system could look like this::
from jinja2 import BaseLoader, TemplateNotFound
from os.path import join, exists, getmtime
class MyLoader(BaseLoader):
def __init__(self, path):
self.path = path
def get_source(self, environment, template):
path = join(self.path, template)
if not exists(path):
raise TemplateNotFound(template)
mtime = getmtime(path)
with file(path) as f:
source = f.read().decode('utf-8')
return source, path, lambda: mtime == getmtime(path)
? True ? has_source_access ? get_source$3?Get the template source, filename and reload helper for a template.
It's passed the environment and template name and has to return a
tuple in the form ``(source, filename, uptodate)`` or raise a
`TemplateNotFound` error if it can't locate the template.
The source part of the returned tuple must be the source of the
template as unicode string or a ASCII bytestring. The filename should
be the name of the file on the filesystem if it was loaded from there,
otherwise `None`. The filename is used by python for the tracebacks
if no loader extension is used.
The last item in the tuple is the `uptodate` function. If auto
reloading is enabled it's always called to check if the template
changed. No arguments are passed so the function must store the
old state somewhere (for example in a closure). If it returns `False`
the template will be reloaded.
? __not__ ? q
e ? RuntimeError ? &%s cannot provide access to the source ? __class__ ? _mod ? z
e ? ? ? ? ?
get_source ? list_templates$4 ?Iterates over all templates. If the loader does not support that
it should raise a :exc:`TypeError` which is the default behavior.
? TypeError ? -this loader cannot iterate over all templates ? ? ? ? ? list_templates ? None ? load$5cLoads a template. This method looks up the template in the cache
or loads one by calling :meth:`get_source`. Subclasses should not
override this method as loaders working on collections of other
loaders (such as :class:`PrefixLoader` or :class:`ChoiceLoader`)
will not call this method but `get_source` directly.
? _is ? z
e ? org/python/core/PyDictionary ?
? Y m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; l ?
e ? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject; ? ?
G ? bytecode_cache ? _isnot ? z
e ?
get_bucket ? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; l ?
e ? code ? compile ? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; l ?
e ? __setattr__ ?
e ?
set_bucket ? template_class ? from_code ? ? ? ? load getf_locals q
? ? ? makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;
G java/util/Arrays
fill (([Ljava/lang/Object;Ljava/lang/Object;)V
FileSystemLoader FileSystemLoader$6"Loads templates from the file system. This loader can find templates
in folders on the file system and is the preferred way to load them.
The loader takes the path to the templates as string, or if multiple
locations are wanted a list of them which is then looked up in the
given order::
>>> loader = FileSystemLoader('/path/to/templates')
>>> loader = FileSystemLoader(['/path/to/templates', '/other/path'])
Per default the template encoding is ``'utf-8'`` which can be changed
by setting the `encoding` parameter to something else.
To follow symbolic links, set the *followlinks* parameter to ``True``::
>>> loader = FileSystemLoader('/path/to/templates', followlinks=True)
.. versionchanged:: 2.8+
The *followlinks* parameter was added.
utf-8 False
__init__$7
isinstance list
searchpath! encoding# followlinks% ? O G' ? ?) __init__+ get_source$8 join.
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;01
e2 setderef4 [
5 getderef7 _
8 read: 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; l<
e= decode? closeA addTraceback 1(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)VCD
GE java/lang/ThrowableG getmtimeI
uptodate$9 setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;LM
GN OSErrorP org/python/core/PyExceptionR match (Lorg/python/core/PyObject;)ZTU
SVK ? ?X
getclosureZ _
[ ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V W]
M^ org/python/core/PyTuple`
a Y- ? ?c list_templates$10 setf walkh g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; lj
ek lenm __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;op
eq strips replaceu
newInteger (I)Lorg/python/core/PyInteger;wx
Gy ./{ _notin} z
e~ add? sorted?e ? ?? ? ??
PackageLoader? PackageLoader$11,Load templates from python eggs or packages. It is constructed with
the name of the python package and the path to the templates in that
package::
loader = PackageLoader('mypackage', 'views')
If the package path is not given, ``'templates'`` is assumed.
Per default the template encoding is ``'utf-8'`` which can be changed
by setting the `encoding` parameter to something else. Due to the nature
of eggs it's only possible to reload templates if the package was loaded
from the file system and not a zip file.
? templates? __init__$12
pkg_resources? DefaultProvider? ResourceManager? get_provider? manager? filesystem_bound? provider? package_path?? ? ??
get_source$13 tuple? _add? z
e? has_resource? get_resource_filename? uptodate$14? ? ?? get_resource_string?? ? ?? list_templates$15 to_cell (II)V??
? ? _walk$16 resource_listdir? resource_isdir? lstrip?? ? ?? sort?? ? ??? ? ??
DictLoader?
DictLoader$17Loads a template from a python dict. It's passed a dict of unicode
strings bound to template names. This loader is useful for unittesting:
>>> loader = DictLoader({'index.html': 'source here'})
Because auto reloading is rarely useful this is disabled per default.
? __init__$18 mapping?? ? ??
get_source$19 __getitem__? z
e? f$20 get?? ? ?? k(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;[Lorg/python/core/PyObject;)V W?
M?? ? ?? list_templates$21? ? ??? ? ?? FunctionLoader? FunctionLoader$22?A loader that is passed a function which does the loading. The
function receives the name of the template and has to return either
an unicode string with the template source, a tuple in the form ``(source,
filename, uptodatefunc)`` or `None` if the template does not exist.
>>> def load_template(name):
... if name == 'index.html':
... return '...'
...
>>> loader = FunctionLoader(load_template)
The `uptodatefunc` is a function that is called if autoreload is enabled
and has to return `True` if the template is still up to date. For more
details have a look at :meth:`BaseLoader.get_source` which has the same
return value.
? __init__$23 load_func?? ? ??
get_source$24? ? ??? ? ?? PrefixLoader? PrefixLoader$25A loader that is passed a dict of loaders where each loader is bound
to a prefix. The prefix is delimited from the template by a slash per
default, which can be changed by setting the `delimiter` argument to
something else::
loader = PrefixLoader({
'app1': PackageLoader('mypackage.app1'),
'app2': PackageLoader('mypackage.app2')
})
By loading ``'app1/index.html'`` the file from the app1 package is loaded,
by loading ``'app2/index.html'`` the file from the second.
? __init__$26 delimiter?? ? ??
get_loader$27
ValueError KeyError? ? ?
get_loader
get_source$28 ? ? load$29 ? ? list_templates$30 ? ?? ? ? ChoiceLoader ChoiceLoader$31?This loader works like the `PrefixLoader` just that no prefix is
specified. If a template could not be found by one loader the next one
is tried.
>>> loader = ChoiceLoader([
... FileSystemLoader('/path/to/user/templates'),
... FileSystemLoader('/path/to/system/templates')
... ])
This is useful if you want to allow users to override builtin templates
from a different location.
__init__$32 loaders ? ?
get_source$33 ? ? load$34 ? ?! list_templates$35 update$# ? ?& ? ?( _TemplateModule* _TemplateModule$36 9Like a normal module but with support for weak references-, ? ?/ ModuleLoader1 ModuleLoader$376This loader loads templates from precompiled templates.
Example usage:
>>> loader = ChoiceLoader([
... ModuleLoader('/path/to/compiled/templates'),
... FileSystemLoader('/path/to/templates')
... ])
Templates can be precompiled with :meth:`Environment.compile_templates`.
4 __init__$38 _jinja2_module_templates_%x7 id9 __path__; proxy= f$39 modules@ popB? ? ?D __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)VFG
eH moduleJ package_nameL6 ? ?N get_template_key$40 tmpl_Q encodeS hexdigestUP ? ?W staticmethodY get_template_key[ get_module_filename$41 .py^] ? ?` get_module_filenameb load$42 %s.%se getattrg
__import__i rootk ImportErrorm from_module_dicto __dict__qd ? ?s3 ? ?u (Ljava/lang/String;)V org/python/core/PyFunctionTablex ()V Wz
y{ self Ljinja2/loaders$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;??
G? ? ?? template? pieces? piece?} environment? name? globals? source? filename? uptodate? bcc? bucket? f? contents? mtime? found? walk_dir? dirpath? dirnames? filenames? p? results? offset? _walk? fullname? ? rv? prefix? loader?
local_name? result? mod? x? key? getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V ? Ww
????
?? org/python/core/CodeLoader? createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;??
?? runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V??
G? 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;
?? R
?? ?
?? ?
?? ?
?? ?
??
??
??-
??K
??e
???
???
??
??
??
??
? ?
??
?
?
??
??
??
??
??
??
??
??
?
?!
?#
?%
?'
?)
?+
?-#
?/,
?13
?36
?5?
?7P
?9]
?;d
?= org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; value % Lorg/python/compiler/MTime; `9?h Lorg/python/compiler/Filename; X/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/jinja2/loaders.py org/python/core/ThreadStateI I [Ljava/lang/String;L java/lang/ObjectN Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! ?y @ , }~ ? R ? ? ? ? ? ? ? ? ? ? ? - ? K ? e ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # ? , ? 3 ? 6 ? ? ? P ? ] ? d ? 0 P ? ~+? ? +
? ? W+? +? N+-? !N+? #+? N+#-? !N+
? %+? N+%-? !N+? '? )N-+S-+? /N-2:++? !:+? ? )N-1S-+? /N-2:+1? !:+? 3? )N-5S-+? /N-2:+5? !:+? 7? )N-9S-+? /N-2:+9? !:+? ;? )N-=S-?S-+? /N-2:+=? !:-2:+?? !:+? A? )N-CS-ES-+? /N-2:+C? !:-2:+E? !:+? ? KN? MY+? Q-? ?T? ? ?N+?-? !N+%? ? eN+?? ?-__S?-??:+?? !:-?+ ?? ? eN+?? ?-__S-???:+? !:-?+ Ͷ ? eN+?? ?-__S?-?ȸ:+?? !:-?+? ? eN+?? ?-__S?-??:+?? !:-?+$? ? eN+?? ?-__S?-???:+?? !:-?+B? ? eN+?? ?-__S?-??:+?? !:-?+x? ? eN+?? ?-__S-?)?:+? !:-?+?? ? eN++? ?-__S+-?0?:++? !:-?+?? ? eN+?? ?-__S2-?v?:+2? !:-?+? ??(? Q R
% ? ? $ B x ? ? R P T+? T? W+? ? VY? K? ZN+-? ]N+? +? ac? i,k? ? o? sN? ?+? ]+? +1? vx? i:+? a_? |:Y? ?? UW+1? v?? iY? ?? W+1? v?? i:+? a_? |:Y? ?? W+? a:+1? v?? i_? ?:? ?? +? +9? v,+? a? o? ??+ ? +? aY? ?? W+? a:?? _? ?:? ?? +!? +? a?? i,+? a? oW? +? -? ?:??+"? +? aN+? ?-? Q &