1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 06:59:52 +01:00

updated dependencies

This commit is contained in:
Ed Summers 2023-04-11 08:26:54 -04:00
parent 83b2113be2
commit 480768fc2e
No known key found for this signature in database
GPG Key ID: D012FF557AFFF80A
4 changed files with 11 additions and 11 deletions

View File

@ -64,7 +64,7 @@ class RewriterApp(object):
if not jinja_env: if not jinja_env:
jinja_env = JinjaEnv(globals={'static_path': 'static'}, 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() jinja_env.jinja_env.install_null_translations()
self.jinja_env = jinja_env self.jinja_env = jinja_env

View File

@ -5,7 +5,7 @@ from pywb.utils.loaders import load
from six.moves.urllib.parse import urlsplit, quote 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 jinja2 import FileSystemLoader, PackageLoader, ChoiceLoader
from webassets.ext.jinja2 import AssetsExtension from webassets.ext.jinja2 import AssetsExtension
@ -139,7 +139,7 @@ class JinjaEnv(object):
return loc_map.get(loc) return loc_map.get(loc)
def override_func(jinja_env, name): def override_func(jinja_env, name):
@contextfunction @pass_context
def get_override(context, text): def get_override(context, text):
translate = get_translate(context) translate = get_translate(context)
if not translate: if not translate:
@ -158,7 +158,7 @@ class JinjaEnv(object):
# Special _Q() function to return %-encoded text, necessary for use # Special _Q() function to return %-encoded text, necessary for use
# with text in banner # with text in banner
@contextfunction @pass_context
def quote_gettext(context, text): def quote_gettext(context, text):
translate = get_translate(context) translate = get_translate(context)
if not translate: if not translate:
@ -171,7 +171,7 @@ class JinjaEnv(object):
self.jinja_env.globals['_Q'] = quote_gettext self.jinja_env.globals['_Q'] = quote_gettext
self.jinja_env.globals['default_locale'] = default_locale self.jinja_env.globals['default_locale'] = default_locale
@contextfunction @pass_context
def switch_locale(context, locale): def switch_locale(context, locale):
environ = context.get('env') environ = context.get('env')
curr_loc = environ.get('pywb_lang', '') curr_loc = environ.get('pywb_lang', '')
@ -188,7 +188,7 @@ class JinjaEnv(object):
return app_prefix + '/' + locale + request_uri return app_prefix + '/' + locale + request_uri
@contextfunction @pass_context
def get_locale_prefixes(context): def get_locale_prefixes(context):
environ = context.get('env') environ = context.get('env')
locale_prefixes = {} locale_prefixes = {}

View File

@ -2,18 +2,18 @@ six
warcio>=1.7.1 warcio>=1.7.1
requests requests
redis<3.0 redis<3.0
jinja2<3.0.0 jinja2
surt>=0.3.1 surt>=0.3.1
brotlipy brotlipy
pyyaml pyyaml
werkzeug werkzeug
webencodings webencodings
gevent==21.12.0 gevent
webassets==2.0 webassets==2.0
portalocker portalocker
wsgiprox>=1.5.1 wsgiprox>=1.5.1
fakeredis<1.0 fakeredis<1.0
tldextract tldextract
python-dateutil python-dateutil
markupsafe<2.1.0 markupsafe
ua_parser ua_parser

View File

@ -3,7 +3,7 @@ WebTest
pytest-cov pytest-cov
mock mock
urllib3 urllib3
httpbin==0.5.0 httpbin
flask<2.0 flask
ujson ujson
lxml lxml