mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Bump mako from 1.2.4 to 1.3.2 (#2256)
* Bump mako from 1.2.4 to 1.3.2 Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.4 to 1.3.2. - [Release notes](https://github.com/sqlalchemy/mako/releases) - [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES) - [Commits](https://github.com/sqlalchemy/mako/commits) --- updated-dependencies: - dependency-name: mako dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update mako==1.3.2 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
52819f7da6
commit
4468c3e4af
29 changed files with 83 additions and 54 deletions
|
@ -1,8 +1,8 @@
|
|||
# mako/__init__.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
|
||||
__version__ = "1.2.4"
|
||||
__version__ = "1.3.2"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/_ast_util.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/ast.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/cache.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/cmd.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -25,7 +25,6 @@ def _exit():
|
|||
|
||||
|
||||
def cmdline(argv=None):
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--var",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/codegen.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -816,7 +816,6 @@ class _GenerateRenderMethod:
|
|||
)
|
||||
or len(self.compiler.default_filters)
|
||||
):
|
||||
|
||||
s = self.create_filter_callable(
|
||||
node.escapes_code.args, "%s" % node.text, True
|
||||
)
|
||||
|
@ -1181,7 +1180,6 @@ class _Identifiers:
|
|||
|
||||
def visitBlockTag(self, node):
|
||||
if node is not self.node and not node.is_anonymous:
|
||||
|
||||
if isinstance(self.node, parsetree.DefTag):
|
||||
raise exceptions.CompileException(
|
||||
"Named block '%s' not allowed inside of def '%s'"
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# mako/compat.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
import collections
|
||||
from importlib import metadata as importlib_metadata
|
||||
from importlib import util
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
win32 = sys.platform.startswith("win")
|
||||
pypy = hasattr(sys, "pypy_version_info")
|
||||
py38 = sys.version_info >= (3, 8)
|
||||
|
||||
ArgSpec = collections.namedtuple(
|
||||
"ArgSpec", ["args", "varargs", "keywords", "defaults"]
|
||||
|
@ -62,12 +62,6 @@ def exception_name(exc):
|
|||
return exc.__class__.__name__
|
||||
|
||||
|
||||
if py38:
|
||||
from importlib import metadata as importlib_metadata
|
||||
else:
|
||||
import importlib_metadata # noqa
|
||||
|
||||
|
||||
def importlib_metadata_get(group):
|
||||
ep = importlib_metadata.entry_points()
|
||||
if hasattr(ep, "select"):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/exceptions.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/autohandler.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/babelplugin.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/beaker_cache.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/extract.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/linguaplugin.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/preprocessors.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/pygmentplugin.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ext/turbogears.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/filters.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/lexer.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -247,6 +247,8 @@ class Lexer:
|
|||
continue
|
||||
if self.match_python_block():
|
||||
continue
|
||||
if self.match_percent():
|
||||
continue
|
||||
if self.match_text():
|
||||
continue
|
||||
|
||||
|
@ -352,14 +354,24 @@ class Lexer:
|
|||
else:
|
||||
return True
|
||||
|
||||
def match_percent(self):
|
||||
match = self.match(r"(?<=^)(\s*)%%(%*)", re.M)
|
||||
if match:
|
||||
self.append_node(
|
||||
parsetree.Text, match.group(1) + "%" + match.group(2)
|
||||
)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def match_text(self):
|
||||
match = self.match(
|
||||
r"""
|
||||
(.*?) # anything, followed by:
|
||||
(
|
||||
(?<=\n)(?=[ \t]*(?=%|\#\#)) # an eval or line-based
|
||||
# comment preceded by a
|
||||
# consumed newline and whitespace
|
||||
(?<=\n)(?=[ \t]*(?=%|\#\#)) # an eval or line-based
|
||||
# comment, preceded by a
|
||||
# consumed newline and whitespace
|
||||
|
|
||||
(?=\${) # an expression
|
||||
|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/lookup.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -178,7 +178,6 @@ class TemplateLookup(TemplateCollection):
|
|||
lexer_cls=None,
|
||||
include_error_handler=None,
|
||||
):
|
||||
|
||||
self.directories = [
|
||||
posixpath.normpath(d) for d in util.to_list(directories, ())
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/parsetree.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/pygen.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/pyparser.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -64,7 +64,6 @@ class FindIdentifiers(_ast_util.NodeVisitor):
|
|||
self._add_declared(node.name)
|
||||
|
||||
def visit_Assign(self, node):
|
||||
|
||||
# flip around the visiting of Assign so the expression gets
|
||||
# evaluated first, in the case of a clause like "x=x+5" (x
|
||||
# is undeclared)
|
||||
|
@ -99,7 +98,6 @@ class FindIdentifiers(_ast_util.NodeVisitor):
|
|||
yield arg
|
||||
|
||||
def _visit_function(self, node, islambda):
|
||||
|
||||
# push function state onto stack. dont log any more
|
||||
# identifiers as "declared" until outside of the function,
|
||||
# but keep logging identifiers as "undeclared". track
|
||||
|
@ -122,7 +120,6 @@ class FindIdentifiers(_ast_util.NodeVisitor):
|
|||
self.local_ident_stack = local_ident_stack
|
||||
|
||||
def visit_For(self, node):
|
||||
|
||||
# flip around visit
|
||||
|
||||
self.visit(node.iter)
|
||||
|
|
|
@ -530,7 +530,7 @@ class Namespace:
|
|||
def _populate(self, d, l):
|
||||
for ident in l:
|
||||
if ident == "*":
|
||||
for (k, v) in self._get_star():
|
||||
for k, v in self._get_star():
|
||||
d[k] = v
|
||||
else:
|
||||
d[ident] = getattr(self, ident)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/template.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
@ -26,7 +26,6 @@ from mako.lexer import Lexer
|
|||
|
||||
|
||||
class Template:
|
||||
|
||||
r"""Represents a compiled template.
|
||||
|
||||
:class:`.Template` includes a reference to the original
|
||||
|
|
|
@ -103,7 +103,6 @@ def _assert_raises(
|
|||
check_context=False,
|
||||
cause_cls=None,
|
||||
):
|
||||
|
||||
with _expect_raises(except_cls, msg, check_context, cause_cls) as ec:
|
||||
callable_(*args, **kwargs)
|
||||
return ec.error
|
||||
|
|
|
@ -19,6 +19,10 @@ def result_lines(result):
|
|||
]
|
||||
|
||||
|
||||
def result_raw_lines(result):
|
||||
return [x for x in re.split(r"\r?\n", result) if x.strip() != ""]
|
||||
|
||||
|
||||
def make_path(
|
||||
filespec: Union[Path, str],
|
||||
make_absolute: bool = True,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# mako/util.py
|
||||
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import functools
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import typing as t
|
||||
|
@ -14,10 +13,7 @@ if t.TYPE_CHECKING:
|
|||
_P = te.ParamSpec("_P")
|
||||
|
||||
|
||||
__version__ = "2.1.3"
|
||||
|
||||
_strip_comments_re = re.compile(r"<!--.*?-->", re.DOTALL)
|
||||
_strip_tags_re = re.compile(r"<.*?>", re.DOTALL)
|
||||
__version__ = "2.1.5"
|
||||
|
||||
|
||||
def _simple_escaping_wrapper(func: "t.Callable[_P, str]") -> "t.Callable[_P, Markup]":
|
||||
|
@ -162,9 +158,41 @@ class Markup(str):
|
|||
>>> Markup("Main »\t<em>About</em>").striptags()
|
||||
'Main » About'
|
||||
"""
|
||||
# Use two regexes to avoid ambiguous matches.
|
||||
value = _strip_comments_re.sub("", self)
|
||||
value = _strip_tags_re.sub("", value)
|
||||
value = str(self)
|
||||
|
||||
# Look for comments then tags separately. Otherwise, a comment that
|
||||
# contains a tag would end early, leaving some of the comment behind.
|
||||
|
||||
while True:
|
||||
# keep finding comment start marks
|
||||
start = value.find("<!--")
|
||||
|
||||
if start == -1:
|
||||
break
|
||||
|
||||
# find a comment end mark beyond the start, otherwise stop
|
||||
end = value.find("-->", start)
|
||||
|
||||
if end == -1:
|
||||
break
|
||||
|
||||
value = f"{value[:start]}{value[end + 3:]}"
|
||||
|
||||
# remove tags using the same method
|
||||
while True:
|
||||
start = value.find("<")
|
||||
|
||||
if start == -1:
|
||||
break
|
||||
|
||||
end = value.find(">", start)
|
||||
|
||||
if end == -1:
|
||||
break
|
||||
|
||||
value = f"{value[:start]}{value[end + 1:]}"
|
||||
|
||||
# collapse spaces
|
||||
value = " ".join(value.split())
|
||||
return self.__class__(value).unescape()
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ importlib-metadata==6.8.0
|
|||
importlib-resources==6.0.1
|
||||
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
||||
IPy==1.01
|
||||
Mako==1.2.4
|
||||
Mako==1.3.2
|
||||
MarkupSafe==2.1.3
|
||||
musicbrainzngs==0.7.1
|
||||
packaging==23.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue