mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Bump mako from 1.2.0 to 1.2.3 (#1845)
* Bump mako from 1.2.0 to 1.2.3 Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.0 to 1.2.3. - [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-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update mako==1.2.3 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
58aab24c28
commit
d26ce224ce
26 changed files with 66 additions and 43 deletions
|
@ -1,8 +1,8 @@
|
||||||
# mako/__init__.py
|
# mako/__init__.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
||||||
|
|
||||||
__version__ = "1.2.0"
|
__version__ = "1.2.3"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/_ast_util.py
|
# mako/_ast_util.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/ast.py
|
# mako/ast.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/cache.py
|
# mako/cache.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/cmd.py
|
# mako/cmd.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/codegen.py
|
# mako/codegen.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/compat.py
|
# mako/compat.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/exceptions.py
|
# mako/exceptions.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/autohandler.py
|
# ext/autohandler.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/babelplugin.py
|
# ext/babelplugin.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/beaker_cache.py
|
# ext/beaker_cache.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/extract.py
|
# ext/extract.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/linguaplugin.py
|
# ext/linguaplugin.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/preprocessors.py
|
# ext/preprocessors.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/pygmentplugin.py
|
# ext/pygmentplugin.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ext/turbogears.py
|
# ext/turbogears.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/filters.py
|
# mako/filters.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/lexer.py
|
# mako/lexer.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
@ -74,12 +74,11 @@ class Lexer:
|
||||||
(start, end) = match.span()
|
(start, end) = match.span()
|
||||||
self.match_position = end + 1 if end == start else end
|
self.match_position = end + 1 if end == start else end
|
||||||
self.matched_lineno = self.lineno
|
self.matched_lineno = self.lineno
|
||||||
lines = re.findall(r"\n", self.text[mp : self.match_position])
|
|
||||||
cp = mp - 1
|
cp = mp - 1
|
||||||
while cp >= 0 and cp < self.textlength and self.text[cp] != "\n":
|
if cp >= 0 and cp < self.textlength:
|
||||||
cp -= 1
|
cp = self.text[: cp + 1].rfind("\n")
|
||||||
self.matched_charpos = mp - cp
|
self.matched_charpos = mp - cp
|
||||||
self.lineno += len(lines)
|
self.lineno += self.text[mp : self.match_position].count("\n")
|
||||||
return match
|
return match
|
||||||
|
|
||||||
def parse_until_text(self, watch_nesting, *text):
|
def parse_until_text(self, watch_nesting, *text):
|
||||||
|
@ -273,20 +272,24 @@ class Lexer:
|
||||||
return self.template
|
return self.template
|
||||||
|
|
||||||
def match_tag_start(self):
|
def match_tag_start(self):
|
||||||
match = self.match(
|
reg = r"""
|
||||||
r"""
|
|
||||||
\<% # opening tag
|
\<% # opening tag
|
||||||
|
|
||||||
([\w\.\:]+) # keyword
|
([\w\.\:]+) # keyword
|
||||||
|
|
||||||
((?:\s+\w+|\s*=\s*|".*?"|'.*?')*) # attrname, = \
|
((?:\s+\w+|\s*=\s*|"[^"]*?"|'[^']*?'|\s*,\s*)*) # attrname, = \
|
||||||
# sign, string expression
|
# sign, string expression
|
||||||
|
# comma is for backwards compat
|
||||||
|
# identified in #366
|
||||||
|
|
||||||
\s* # more whitespace
|
\s* # more whitespace
|
||||||
|
|
||||||
(/)?> # closing
|
(/)?> # closing
|
||||||
|
|
||||||
""",
|
"""
|
||||||
|
|
||||||
|
match = self.match(
|
||||||
|
reg,
|
||||||
re.I | re.S | re.X,
|
re.I | re.S | re.X,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -319,7 +322,7 @@ class Lexer:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def match_tag_end(self):
|
def match_tag_end(self):
|
||||||
match = self.match(r"\</%[\t ]*(.+?)[\t ]*>")
|
match = self.match(r"\</%[\t ]*([^\t ]+?)[\t ]*>")
|
||||||
if match:
|
if match:
|
||||||
if not len(self.tag):
|
if not len(self.tag):
|
||||||
raise exceptions.SyntaxException(
|
raise exceptions.SyntaxException(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/lookup.py
|
# mako/lookup.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/parsetree.py
|
# mako/parsetree.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/pygen.py
|
# mako/pygen.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
@ -43,6 +43,15 @@ class PythonPrinter:
|
||||||
# source lines
|
# source lines
|
||||||
self.source_map = {}
|
self.source_map = {}
|
||||||
|
|
||||||
|
self._re_space_comment = re.compile(r"^\s*#")
|
||||||
|
self._re_space = re.compile(r"^\s*$")
|
||||||
|
self._re_indent = re.compile(r":[ \t]*(?:#.*)?$")
|
||||||
|
self._re_compound = re.compile(r"^\s*(if|try|elif|while|for|with)")
|
||||||
|
self._re_indent_keyword = re.compile(
|
||||||
|
r"^\s*(def|class|else|elif|except|finally)"
|
||||||
|
)
|
||||||
|
self._re_unindentor = re.compile(r"^\s*(else|elif|except|finally).*\:")
|
||||||
|
|
||||||
def _update_lineno(self, num):
|
def _update_lineno(self, num):
|
||||||
self.lineno += num
|
self.lineno += num
|
||||||
|
|
||||||
|
@ -86,8 +95,8 @@ class PythonPrinter:
|
||||||
|
|
||||||
if (
|
if (
|
||||||
line is None
|
line is None
|
||||||
or re.match(r"^\s*#", line)
|
or self._re_space_comment.match(line)
|
||||||
or re.match(r"^\s*$", line)
|
or self._re_space.match(line)
|
||||||
):
|
):
|
||||||
hastext = False
|
hastext = False
|
||||||
else:
|
else:
|
||||||
|
@ -121,12 +130,12 @@ class PythonPrinter:
|
||||||
# note that a line can both decrase (before printing) and
|
# note that a line can both decrase (before printing) and
|
||||||
# then increase (after printing) the indentation level.
|
# then increase (after printing) the indentation level.
|
||||||
|
|
||||||
if re.search(r":[ \t]*(?:#.*)?$", line):
|
if self._re_indent.search(line):
|
||||||
# increment indentation count, and also
|
# increment indentation count, and also
|
||||||
# keep track of what the keyword was that indented us,
|
# keep track of what the keyword was that indented us,
|
||||||
# if it is a python compound statement keyword
|
# if it is a python compound statement keyword
|
||||||
# where we might have to look for an "unindent" keyword
|
# where we might have to look for an "unindent" keyword
|
||||||
match = re.match(r"^\s*(if|try|elif|while|for|with)", line)
|
match = self._re_compound.match(line)
|
||||||
if match:
|
if match:
|
||||||
# its a "compound" keyword, so we will check for "unindentors"
|
# its a "compound" keyword, so we will check for "unindentors"
|
||||||
indentor = match.group(1)
|
indentor = match.group(1)
|
||||||
|
@ -137,9 +146,7 @@ class PythonPrinter:
|
||||||
# its not a "compound" keyword. but lets also
|
# its not a "compound" keyword. but lets also
|
||||||
# test for valid Python keywords that might be indenting us,
|
# test for valid Python keywords that might be indenting us,
|
||||||
# else assume its a non-indenting line
|
# else assume its a non-indenting line
|
||||||
m2 = re.match(
|
m2 = self._re_indent_keyword.match(line)
|
||||||
r"^\s*(def|class|else|elif|except|finally)", line
|
|
||||||
)
|
|
||||||
if m2:
|
if m2:
|
||||||
self.indent += 1
|
self.indent += 1
|
||||||
self.indent_detail.append(indentor)
|
self.indent_detail.append(indentor)
|
||||||
|
@ -167,7 +174,7 @@ class PythonPrinter:
|
||||||
|
|
||||||
# if the current line doesnt have one of the "unindentor" keywords,
|
# if the current line doesnt have one of the "unindentor" keywords,
|
||||||
# return False
|
# return False
|
||||||
match = re.match(r"^\s*(else|elif|except|finally).*\:", line)
|
match = self._re_unindentor.match(line)
|
||||||
# if True, whitespace matches up, we have a compound indentor,
|
# if True, whitespace matches up, we have a compound indentor,
|
||||||
# and this line has an unindentor, this
|
# and this line has an unindentor, this
|
||||||
# is probably good enough
|
# is probably good enough
|
||||||
|
@ -193,6 +200,9 @@ class PythonPrinter:
|
||||||
|
|
||||||
stripspace is a string of space that will be truncated from the
|
stripspace is a string of space that will be truncated from the
|
||||||
start of the line before indenting."""
|
start of the line before indenting."""
|
||||||
|
if stripspace == "":
|
||||||
|
# Fast path optimization.
|
||||||
|
return self.indentstring * self.indent + line
|
||||||
|
|
||||||
return re.sub(
|
return re.sub(
|
||||||
r"^%s" % stripspace, self.indentstring * self.indent, line
|
r"^%s" % stripspace, self.indentstring * self.indent, line
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/pyparser.py
|
# mako/pyparser.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/template.py
|
# mako/template.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -80,6 +80,16 @@ class TemplateTest:
|
||||||
output = filters(output)
|
output = filters(output)
|
||||||
eq_(output, expected)
|
eq_(output, expected)
|
||||||
|
|
||||||
|
def indicates_unbound_local_error(self, rendered_output, unbound_var):
|
||||||
|
var = f"'{unbound_var}'"
|
||||||
|
error_msgs = (
|
||||||
|
# < 3.11
|
||||||
|
f"local variable {var} referenced before assignment",
|
||||||
|
# >= 3.11
|
||||||
|
f"cannot access local variable {var} where it is not associated",
|
||||||
|
)
|
||||||
|
return any((msg in rendered_output) for msg in error_msgs)
|
||||||
|
|
||||||
|
|
||||||
class PlainCacheImpl(CacheImpl):
|
class PlainCacheImpl(CacheImpl):
|
||||||
"""Simple memory cache impl so that tests which
|
"""Simple memory cache impl so that tests which
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# mako/util.py
|
# mako/util.py
|
||||||
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
|
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
|
||||||
#
|
#
|
||||||
# This module is part of Mako and is released under
|
# This module is part of Mako and is released under
|
||||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
|
@ -22,7 +22,7 @@ importlib-metadata==5.0.0
|
||||||
importlib-resources==5.10.0
|
importlib-resources==5.10.0
|
||||||
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
||||||
IPy==1.01
|
IPy==1.01
|
||||||
Mako==1.2.0
|
Mako==1.2.3
|
||||||
MarkupSafe==2.1.1
|
MarkupSafe==2.1.1
|
||||||
musicbrainzngs==0.7.1
|
musicbrainzngs==0.7.1
|
||||||
packaging==21.3
|
packaging==21.3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue