diff options
Diffstat (limited to 'deps/v8/third_party')
-rw-r--r-- | deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.md5 | 1 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.sha512 | 1 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.md5 | 1 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.sha512 | 1 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/OWNERS | 1 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/README.chromium | 10 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/__init__.py | 2 | ||||
-rwxr-xr-x | deps/v8/third_party/jinja2/get_jinja2.sh | 4 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/lexer.py | 6 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/patches/0002-jinja2-add-_identifier-to-pydeps-for-py3.patch | 34 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/sandbox.py | 17 | ||||
-rw-r--r-- | deps/v8/third_party/jinja2/tests.py | 2 | ||||
-rw-r--r-- | deps/v8/third_party/zlib/google/zip_internal.cc | 4 | ||||
-rw-r--r-- | deps/v8/third_party/zlib/google/zip_internal.h | 2 | ||||
-rw-r--r-- | deps/v8/third_party/zlib/google/zip_reader.cc | 2 |
15 files changed, 64 insertions, 24 deletions
diff --git a/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.md5 b/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.md5 new file mode 100644 index 0000000000..479d0d13cf --- /dev/null +++ b/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.md5 @@ -0,0 +1 @@ +0ae535be40fd215a8114a090c8b68e5a Jinja2-2.10.1.tar.gz diff --git a/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.sha512 b/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.sha512 new file mode 100644 index 0000000000..217887094d --- /dev/null +++ b/deps/v8/third_party/jinja2/Jinja2-2.10.1.tar.gz.sha512 @@ -0,0 +1 @@ +a00153a0e07bb7d67f301b4eaf7af657726a1985e9ffc7ae2d76bdbb4c062d672efc8065e398767e1039b18a483a0092e206deac91e4047aad64920b56869623 Jinja2-2.10.1.tar.gz diff --git a/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.md5 b/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.md5 deleted file mode 100644 index 9137ee129a..0000000000 --- a/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.md5 +++ /dev/null @@ -1 +0,0 @@ -61ef1117f945486472850819b8d1eb3d Jinja2-2.10.tar.gz diff --git a/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.sha512 b/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.sha512 deleted file mode 100644 index 087d24c18e..0000000000 --- a/deps/v8/third_party/jinja2/Jinja2-2.10.tar.gz.sha512 +++ /dev/null @@ -1 +0,0 @@ -0ea7371be67ffcf19e46dfd06523a45a0806e678a407d54f5f2f3e573982f0959cf82ec5d07b203670309928a62ef71109701ab16547a9bba2ebcdc178cb67f2 Jinja2-2.10.tar.gz diff --git a/deps/v8/third_party/jinja2/OWNERS b/deps/v8/third_party/jinja2/OWNERS index 05a4a96035..c4b81d802a 100644 --- a/deps/v8/third_party/jinja2/OWNERS +++ b/deps/v8/third_party/jinja2/OWNERS @@ -1,3 +1,4 @@ timloh@chromium.org haraken@chromium.org +wnwen@chromium.org yukishiino@chromium.org diff --git a/deps/v8/third_party/jinja2/README.chromium b/deps/v8/third_party/jinja2/README.chromium index ecaf5a618c..37e91391be 100644 --- a/deps/v8/third_party/jinja2/README.chromium +++ b/deps/v8/third_party/jinja2/README.chromium @@ -1,8 +1,8 @@ Name: Jinja2 Python Template Engine Short Name: jinja2 URL: https://jinja.palletsprojects.com/ -Version: 2.10 -CPEPrefix: cpe:/a:pocoo:jinja2:2.10 +Version: 2.10.1 +CPEPrefix: cpe:/a:pocoo:jinja2:2.10.1 License: BSD 3-Clause License File: LICENSE Security Critical: no @@ -10,9 +10,9 @@ Security Critical: no Description: Template engine for code generation in Blink. -Source: https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz -MD5: 61ef1117f945486472850819b8d1eb3d -SHA-1: 34b69e5caab12ee37b9df69df9018776c008b7b8 +Source: https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz +MD5: 0ae535be40fd215a8114a090c8b68e5a +SHA-512: a00153a0e07bb7d67f301b4eaf7af657726a1985e9ffc7ae2d76bdbb4c062d672efc8065e398767e1039b18a483a0092e206deac91e4047aad64920b56869623 Local Modifications: This only includes the jinja2 directory from the tarball and the LICENSE and diff --git a/deps/v8/third_party/jinja2/__init__.py b/deps/v8/third_party/jinja2/__init__.py index 42aa763d57..15e13b6f2e 100644 --- a/deps/v8/third_party/jinja2/__init__.py +++ b/deps/v8/third_party/jinja2/__init__.py @@ -27,7 +27,7 @@ :license: BSD, see LICENSE for more details. """ __docformat__ = 'restructuredtext en' -__version__ = '2.10' +__version__ = '2.10.1' # high level interface from jinja2.environment import Environment, Template diff --git a/deps/v8/third_party/jinja2/get_jinja2.sh b/deps/v8/third_party/jinja2/get_jinja2.sh index 941ba96f1f..15ed7dee7c 100755 --- a/deps/v8/third_party/jinja2/get_jinja2.sh +++ b/deps/v8/third_party/jinja2/get_jinja2.sh @@ -5,8 +5,8 @@ # Download page: # https://pypi.python.org/pypi/Jinja2 PACKAGE='Jinja2' -VERSION='2.10' -SRC_URL='https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz' +VERSION='2.10.1' +SRC_URL='https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz' PACKAGE_DIR='jinja2' CHROMIUM_FILES="README.chromium OWNERS get_jinja2.sh DIR_METADATA patches" diff --git a/deps/v8/third_party/jinja2/lexer.py b/deps/v8/third_party/jinja2/lexer.py index 6fd135dd5b..1f790259d6 100644 --- a/deps/v8/third_party/jinja2/lexer.py +++ b/deps/v8/third_party/jinja2/lexer.py @@ -45,12 +45,6 @@ else: from jinja2 import _identifier name_re = re.compile(r'[\w{0}]+'.format(_identifier.pattern)) check_ident = True - # remove the pattern from memory after building the regex - import sys - del sys.modules['jinja2._identifier'] - import jinja2 - del jinja2._identifier - del _identifier float_re = re.compile(r'(?<!\.)\d+\.\d+') newline_re = re.compile(r'(\r\n|\r|\n)') diff --git a/deps/v8/third_party/jinja2/patches/0002-jinja2-add-_identifier-to-pydeps-for-py3.patch b/deps/v8/third_party/jinja2/patches/0002-jinja2-add-_identifier-to-pydeps-for-py3.patch new file mode 100644 index 0000000000..a979bed788 --- /dev/null +++ b/deps/v8/third_party/jinja2/patches/0002-jinja2-add-_identifier-to-pydeps-for-py3.patch @@ -0,0 +1,34 @@ +From c07882fb6ea8a02869c84fd79e48855229ca5985 Mon Sep 17 00:00:00 2001 +From: Peter Wen <wnwen@chromium.org> +Date: Wed, 18 Aug 2021 09:53:11 -0400 +Subject: [PATCH] [PATCH] jinja2: add _identifier to pydeps for py3 + +If _identifier is deleted then build/print_python_deps.py fails to +detect _identifier.py as a pydep for jinja, resulting in the isolate +files missing third_party/jinja2/_identifier.py as a necessary file. + +Bug: 1228231 +--- + third_party/jinja2/lexer.py | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/third_party/jinja2/lexer.py b/third_party/jinja2/lexer.py +index 6fd135dd5b0a..1f790259d671 100644 +--- a/third_party/jinja2/lexer.py ++++ b/third_party/jinja2/lexer.py +@@ -45,12 +45,6 @@ else: + from jinja2 import _identifier + name_re = re.compile(r'[\w{0}]+'.format(_identifier.pattern)) + check_ident = True +- # remove the pattern from memory after building the regex +- import sys +- del sys.modules['jinja2._identifier'] +- import jinja2 +- del jinja2._identifier +- del _identifier + + float_re = re.compile(r'(?<!\.)\d+\.\d+') + newline_re = re.compile(r'(\r\n|\r|\n)') +-- +2.33.0.rc1.237.g0d66db33f3-goog + diff --git a/deps/v8/third_party/jinja2/sandbox.py b/deps/v8/third_party/jinja2/sandbox.py index 93fb9d45f3..752e81289f 100644 --- a/deps/v8/third_party/jinja2/sandbox.py +++ b/deps/v8/third_party/jinja2/sandbox.py @@ -137,7 +137,7 @@ class _MagicFormatMapping(Mapping): def inspect_format_method(callable): if not isinstance(callable, (types.MethodType, types.BuiltinMethodType)) or \ - callable.__name__ != 'format': + callable.__name__ not in ('format', 'format_map'): return None obj = callable.__self__ if isinstance(obj, string_types): @@ -402,7 +402,7 @@ class SandboxedEnvironment(Environment): obj.__class__.__name__ ), name=attribute, obj=obj, exc=SecurityError) - def format_string(self, s, args, kwargs): + def format_string(self, s, args, kwargs, format_func=None): """If a format call is detected, then this is routed through this method so that our safety sandbox can be used for it. """ @@ -410,6 +410,17 @@ class SandboxedEnvironment(Environment): formatter = SandboxedEscapeFormatter(self, s.escape) else: formatter = SandboxedFormatter(self) + + if format_func is not None and format_func.__name__ == 'format_map': + if len(args) != 1 or kwargs: + raise TypeError( + 'format_map() takes exactly one argument %d given' + % (len(args) + (kwargs is not None)) + ) + + kwargs = args[0] + args = None + kwargs = _MagicFormatMapping(args, kwargs) rv = formatter.vformat(s, args, kwargs) return type(s)(rv) @@ -418,7 +429,7 @@ class SandboxedEnvironment(Environment): """Call an object from sandboxed code.""" fmt = inspect_format_method(__obj) if fmt is not None: - return __self.format_string(fmt, args, kwargs) + return __self.format_string(fmt, args, kwargs, __obj) # the double prefixes are to avoid double keyword argument # errors when proxying the call. diff --git a/deps/v8/third_party/jinja2/tests.py b/deps/v8/third_party/jinja2/tests.py index b14f85ff14..0adc3d4dbc 100644 --- a/deps/v8/third_party/jinja2/tests.py +++ b/deps/v8/third_party/jinja2/tests.py @@ -10,7 +10,7 @@ """ import operator import re -from collections.abc import Mapping +from collections import Mapping from jinja2.runtime import Undefined from jinja2._compat import text_type, string_types, integer_types import decimal diff --git a/deps/v8/third_party/zlib/google/zip_internal.cc b/deps/v8/third_party/zlib/google/zip_internal.cc index cea1e88d03..00e9eefe6c 100644 --- a/deps/v8/third_party/zlib/google/zip_internal.cc +++ b/deps/v8/third_party/zlib/google/zip_internal.cc @@ -84,7 +84,7 @@ void* ZipOpenFunc(void* opaque, const void* filename, int mode) { } #endif -#if defined(OS_POSIX) +#if defined(OS_POSIX) || defined(OS_FUCHSIA) // Callback function for zlib that opens a file stream from a file descriptor. // Since we do not own the file descriptor, dup it so that we can fdopen/fclose // a file stream. @@ -286,7 +286,7 @@ unzFile OpenForUnzipping(const std::string& file_name_utf8) { return unzOpen2_64(file_name_utf8.c_str(), zip_func_ptrs); } -#if defined(OS_POSIX) +#if defined(OS_POSIX) || defined(OS_FUCHSIA) unzFile OpenFdForUnzipping(int zip_fd) { zlib_filefunc64_def zip_funcs; FillFdOpenFileFunc(&zip_funcs, zip_fd); diff --git a/deps/v8/third_party/zlib/google/zip_internal.h b/deps/v8/third_party/zlib/google/zip_internal.h index ef5b5d0906..c7feba692b 100644 --- a/deps/v8/third_party/zlib/google/zip_internal.h +++ b/deps/v8/third_party/zlib/google/zip_internal.h @@ -35,7 +35,7 @@ namespace internal { // Windows. unzFile OpenForUnzipping(const std::string& file_name_utf8); -#if defined(OS_POSIX) +#if defined(OS_POSIX) || defined(OS_FUCHSIA) // Opens the file referred to by |zip_fd| for unzipping. unzFile OpenFdForUnzipping(int zip_fd); #endif diff --git a/deps/v8/third_party/zlib/google/zip_reader.cc b/deps/v8/third_party/zlib/google/zip_reader.cc index 8ddd8dfc25..2ad1398499 100644 --- a/deps/v8/third_party/zlib/google/zip_reader.cc +++ b/deps/v8/third_party/zlib/google/zip_reader.cc @@ -157,7 +157,7 @@ bool ZipReader::Open(const base::FilePath& zip_file_path) { bool ZipReader::OpenFromPlatformFile(base::PlatformFile zip_fd) { DCHECK(!zip_file_); -#if defined(OS_POSIX) +#if defined(OS_POSIX) || defined(OS_FUCHSIA) zip_file_ = internal::OpenFdForUnzipping(zip_fd); #elif defined(OS_WIN) zip_file_ = internal::OpenHandleForUnzipping(zip_fd); |