kr.motd.maven.sphinx.dist.jinja2.bccache$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__ ?
jinja2.bccache
~~~~~~~~~~~~~~
This module implements the bytecode cache system Jinja is optionally
using. This is useful if you have very complex template situations and
the compiliation of all those templates slow down your application too
much.
Situations where this is useful are often forking web applications that
are initialized on the first request.
: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
os java/lang/String path listdir org/python/core/imp
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; ! "
# setlocal %
& importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject; ( )
* sys , stat . errno 0 marshal 2 tempfile 4 fnmatch 6 hashlib 8 sha1 : jinja2.utils < open_if_exists > jinja2._compat @ BytesIO B pickle D PY2 F text_type H getname .(Ljava/lang/String;)Lorg/python/core/PyObject; J K
L org/python/core/PyObject N __not__ ()Lorg/python/core/PyObject; P Q
O R __nonzero__ ()Z T U
O V dump X __getattr__ Z K
O [ marshal_dump ] load _ marshal_load a org/python/core/Py c EmptyObjects [Lorg/python/core/PyObject; e f d g org/python/core/PyFunction i f_globals Lorg/python/core/PyObject; k l m marshal_dump$1
isinstance p getglobal r K
s getlocal (I)Lorg/python/core/PyObject; u v
w file y __call__ m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; { |
O } write dumps ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; { ?
O ? f_lasti I ? ? ? None ? l d ? jinja2/bccache$py ? Lorg/python/core/PyCode; o ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V ? ?
j ? marshal_load$2 loads ? read ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; { ?
O ? ? ? ? ?
newInteger (I)Lorg/python/core/PyInteger; ? ?
d ?
bc_version ? j2 ? encode ? ascii ? _add 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
O ? version_info ? __getitem__ ? ?
O ? _lshift ? ?
O ? _or ? ?
O ? bc_magic ? object ? Bucket ? Bucket$3
__module__ ? __name__ ?uBuckets are used to store the bytecode for one template. It's created
and initialized by the bytecode cache and passed to the loading functions.
The buckets get an internal checksum from the cache assigned and use this
to automatically reject outdated cache material. Individual bytecode
cache subclasses don't have to care about cache invalidation.
?
__init__$4 environment ? __setattr__ ?
O ? key ? checksum ? reset ? ? ? ? ? __init__ ? reset$5 )Resets the bucket (unloads the bytecode). ? ? code ? ? ? ? ? load_bytecode$6 /Loads bytecode from a file or file like object. ? len ? (ILorg/python/core/PyObject;)V % ?
? _ne ? ?
O ? setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException; ? ?
d ? org/python/core/PyTuple ? EOFError ?
ValueError ? TypeError ? ([Lorg/python/core/PyObject;)V ? ?
? ? org/python/core/PyException ? match (Lorg/python/core/PyObject;)Z ? ?
? ? java/lang/Throwable ? ? ?
load_bytecode write_bytecode$7 ;Dump the bytecode into the file or file like object passed. _is ?
O
can't write empty bucket
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;
d ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; {
O ? ? write_bytecode bytecode_from_string$8 Load bytecode from a string. ? ? bytecode_from_string bytecode_to_string$9 Return the bytecode as string.! getvalue# ? ?% bytecode_to_string' getf_locals) Q
* ? ? ?, makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;./
d0 java/util/Arrays2 fill (([Ljava/lang/Object;Ljava/lang/Object;)V45
36
BytecodeCache8 BytecodeCache$10?To implement your own bytecode cache you have to subclass this class
and override :meth:`load_bytecode` and :meth:`dump_bytecode`. Both of
these methods are passed a :class:`~jinja2.bccache.Bucket`.
A very basic bytecode cache that saves the bytecode on the file system::
from os import path
class MyCache(BytecodeCache):
def __init__(self, directory):
self.directory = directory
def load_bytecode(self, bucket):
filename = path.join(self.directory, bucket.key)
if path.exists(filename):
with open(filename, 'rb') as f:
bucket.load_bytecode(f)
def dump_bytecode(self, bucket):
filename = path.join(self.directory, bucket.key)
with open(filename, 'wb') as f:
bucket.write_bytecode(f)
A more advanced version of a filesystem based bytecode cache is part of
Jinja2.
; load_bytecode$11 ?Subclasses have to override this method to load bytecode into a
bucket. If they are not able to find code in the cache for the
bucket, it must not do anything.
> NotImplementedError@= ? ?B dump_bytecode$12 ?Subclasses have to override this method to write the bytecode
from a bucket back to the cache. If it unable to do so it must not
fail silently but raise an exception.
ED ? ?G
dump_bytecodeI clear$13 ?Clears the cache. This method is not used by Jinja2 but should be
implemented to allow applications to clear the bytecode cache used
by a particular environment.
LK ? ?N clearP get_cache_key$14 3Returns the unique hash key for this template name.S utf-8U _isnotW ?
OX |Z update\ hexdigest^R ? ?`
get_cache_keyb get_source_checksum$15 "Returns a checksum for the source.ed ? ?g get_source_checksumi
get_bucket$16 wReturn a cache bucket for the given template. All arguments are
mandatory but filename may be `None`.
lk ? ?n
get_bucketp
set_bucket$17 Put the bucket into the cache.sr ? ?u
set_bucketw: ? ?y FileSystemBytecodeCache{ FileSystemBytecodeCache$18?A bytecode cache that stores bytecode on the filesystem. It accepts
two arguments: The directory where the cache items are stored and a
pattern string that is used to build the filename.
If no directory is specified a default cache directory is selected. On
Windows the user's temp directory is used, on UNIX systems a directory
is created for the user in the system temp directory.
The pattern can be used to have multiple separate caches operate on the
same directory. The default pattern is ``'__jinja2_%s.cache'``. ``%s``
is replaced with the cache key.
>>> bcc = FileSystemBytecodeCache('/tmp/jinja_cache', '%s.cache')
This bytecode cache supports clearing of the cache using the clear method.
~ __jinja2_%s.cache? __init__$19 _get_default_cache_dir? directory? pattern?? ? ?? _get_default_cache_dir$20 _unsafe_dir$21 RuntimeError? JCannot determine safe temp directory. You need to explicitly provide one.?? ? ??
gettempdir? name? nt? _eq? ?
O? hasattr? getuid? _jinja2-cache-%d? _mod? ?
O? join? mkdir? S_IRWXU? OSError? value? l ?? EEXIST? ()Lorg/python/core/PyException;?
d? chmod? lstat? st_uid? S_ISDIR? st_mode? S_IMODE?? ? ?? _get_cache_filename$22? ? ?? _get_cache_filename? load_bytecode$23 rb? close? addTraceback 1(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)V??
d?? ? ?? dump_bytecode$24 open? wb?? ? ?? clear$25 remove? filter? *? __iter__? Q
O? __iternext__? Q
O?? ? ??} ? ?? MemcachedBytecodeCache? MemcachedBytecodeCache$26vThis class implements a bytecode cache that uses a memcache cache for
storing the information. It does not enforce a specific memcache library
(tummy's memcache or cmemcache) but will accept any class that provides
the minimal interface required.
Libraries compatible with this class:
- `werkzeug `_.contrib.cache
- `python-memcached `_
- `cmemcache `_
(Unfortunately the django cache interface is not compatible because it
does not support storing binary data, only unicode. You can however pass
the underlying cache client to the bytecode cache which is available
as `django.core.cache.cache._client`.)
The minimal interface for the client passed to the constructor is this:
.. class:: MinimalClientInterface
.. method:: set(key, value[, timeout])
Stores the bytecode in the cache. `value` is a string and
`timeout` the timeout of the key. If timeout is not provided
a default timeout or no timeout should be assumed, if it's
provided it's an integer with the number of seconds the cache
item should exist.
.. method:: get(key)
Returns the value for the cache key. If the item does not
exist in the cache the return value must be `None`.
The other arguments to the constructor are the prefix for all keys that
is added before the actual cache key and the timeout for the bytecode in
the cache system. We recommend a high (or no) timeout.
This bytecode cache does not support clearing of used items in the cache.
The clear method is a no-operation function.
.. versionadded:: 2.7
Added support for ignoring memcache errors through the
`ignore_memcache_errors` parameter.
? jinja2/bytecode/? True? __init__$27 client? prefix? timeout? ignore_memcache_errors?? ? ?? load_bytecode$28 get Exception? ? ? dump_bytecode$29 _iadd ?
O set
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;
O ? ?? ? ? (Ljava/lang/String;)V org/python/core/PyFunctionTable ()V ?
self Ljinja2/bccache$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; !
d" ? ?$ f& magic) string+ out- bucket/ filename1 hash3 source5 _unsafe_dir7 tmpdir9 dirname;
actual_dir= e? actual_dir_statA filesC argsE getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V ? ?
?LGH
?N org/python/core/CodeLoaderP createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;RS
QT runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)VVW
dX 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;
?d o
?f ?
?h ?
?j ?
?l ?
?n ?
?p
?r
?t
?v:
?x=
?zD
?|K
?~R
??d
??k
??r
??}
???
???
???
???
???
???
???
???
???
???
??
?? org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; % Lorg/python/compiler/MTime; `9?h Lorg/python/compiler/Filename; X/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/jinja2/bccache.py org/python/core/ThreadState? f java/lang/Object? Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! ? ? ? o ? ? ? ? ? ? ? ? ? ? ? ? ? ? : ? = ? D ? K ? R ? d ? k ? r ? } ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # ? M ?+? ? +? ? W+? ? N-S-S-+? $N-2:+? ':-2:+? ':+? +? +N+-? 'N+? -+? +N+--? 'N+? /+? +N+/-? 'N+? 1+? +N+1-? 'N+? 3+? +N+3-? 'N+? 5+? +N+5-? 'N+? 7+? +N+7-? 'N+? 9? N-;S-+? $N-2:+;? ':+? =? N-?S-+? $N-2:+?? ':+? A? N-CS-ES-GS-IS-+? $N-2:+C? ':-2:+E? ':-2:+G? ':-2:+I? ':+? +G? M? S? W? <+ ? +3? MY? \N+^-? 'N+!? +3? M`? \N+b-? 'N? K+$? ? hN? jY+? n-? ?? ?N+^-? 'N+*? ? hN? jY+? n-? ?? ?N+b-? 'N+0? ? ?N+?-? 'N+7? ?? ?? \,?? ? ?+E? M?? \,+?? M? ?? ~? ?+E? M?? \,+-? M?? \? ?? ?? ?? ?+-? M?? \? ?? ?? ?? ?? ?N+?-? 'N+