mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 08:04:49 +01:00
updated dependencies
This commit is contained in:
parent
83b2113be2
commit
480768fc2e
@ -64,7 +64,7 @@ class RewriterApp(object):
|
||||
|
||||
if not jinja_env:
|
||||
jinja_env = JinjaEnv(globals={'static_path': 'static'},
|
||||
extensions=['jinja2.ext.i18n', 'jinja2.ext.with_'])
|
||||
extensions=['jinja2.ext.i18n'])
|
||||
jinja_env.jinja_env.install_null_translations()
|
||||
|
||||
self.jinja_env = jinja_env
|
||||
|
@ -5,7 +5,7 @@ from pywb.utils.loaders import load
|
||||
|
||||
from six.moves.urllib.parse import urlsplit, quote
|
||||
|
||||
from jinja2 import Environment, TemplateNotFound, contextfunction, select_autoescape
|
||||
from jinja2 import Environment, TemplateNotFound, pass_context, select_autoescape
|
||||
from jinja2 import FileSystemLoader, PackageLoader, ChoiceLoader
|
||||
|
||||
from webassets.ext.jinja2 import AssetsExtension
|
||||
@ -139,7 +139,7 @@ class JinjaEnv(object):
|
||||
return loc_map.get(loc)
|
||||
|
||||
def override_func(jinja_env, name):
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def get_override(context, text):
|
||||
translate = get_translate(context)
|
||||
if not translate:
|
||||
@ -158,7 +158,7 @@ class JinjaEnv(object):
|
||||
|
||||
# Special _Q() function to return %-encoded text, necessary for use
|
||||
# with text in banner
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def quote_gettext(context, text):
|
||||
translate = get_translate(context)
|
||||
if not translate:
|
||||
@ -171,7 +171,7 @@ class JinjaEnv(object):
|
||||
self.jinja_env.globals['_Q'] = quote_gettext
|
||||
self.jinja_env.globals['default_locale'] = default_locale
|
||||
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def switch_locale(context, locale):
|
||||
environ = context.get('env')
|
||||
curr_loc = environ.get('pywb_lang', '')
|
||||
@ -188,7 +188,7 @@ class JinjaEnv(object):
|
||||
|
||||
return app_prefix + '/' + locale + request_uri
|
||||
|
||||
@contextfunction
|
||||
@pass_context
|
||||
def get_locale_prefixes(context):
|
||||
environ = context.get('env')
|
||||
locale_prefixes = {}
|
||||
|
@ -2,18 +2,18 @@ six
|
||||
warcio>=1.7.1
|
||||
requests
|
||||
redis<3.0
|
||||
jinja2<3.0.0
|
||||
jinja2
|
||||
surt>=0.3.1
|
||||
brotlipy
|
||||
pyyaml
|
||||
werkzeug
|
||||
webencodings
|
||||
gevent==21.12.0
|
||||
gevent
|
||||
webassets==2.0
|
||||
portalocker
|
||||
wsgiprox>=1.5.1
|
||||
fakeredis<1.0
|
||||
tldextract
|
||||
python-dateutil
|
||||
markupsafe<2.1.0
|
||||
markupsafe
|
||||
ua_parser
|
||||
|
@ -3,7 +3,7 @@ WebTest
|
||||
pytest-cov
|
||||
mock
|
||||
urllib3
|
||||
httpbin==0.5.0
|
||||
flask<2.0
|
||||
httpbin
|
||||
flask
|
||||
ujson
|
||||
lxml
|
||||
|
Loading…
x
Reference in New Issue
Block a user