Skip to content
Myr

Merge pull request #1558 from pallets:update-requirements

Before adoption: this commit came in with the history the project adopted, so no landing records it.

update requirements

authored by David Lord · committed by GitHub · parents 1de7669, cdc4f1d · Browse files · 17 files+51 added−52 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

17 files+51 added−52 removed

  • tests:+0 added−1 removed
  • other:+51 added−51 removed

17 files+51 added−52 removed

modified:requirements/dev.txt+20 added-19 removed
8 unmodified lines
9attrs==21.2.010 # via pytest11babel==2.9.112 # via sphinx13backports.entry-points-selectable==1.1.013backports.entry-points-selectable==1.1.114 # via virtualenv15certifi==2021.10.816 # via requests17cfgv==3.3.118 # via pre-commit19charset-normalizer==2.0.719charset-normalizer==2.0.920 # via requests21click==8.0.322 # via pip-tools23distlib==0.3.323distlib==0.3.424 # via virtualenv25docutils==0.17.126 # via sphinx27filelock==3.3.227filelock==3.4.028 # via29 # tox30 # virtualenv31identify==2.3.331identify==2.4.032 # via pre-commit33idna==3.334 # via requests35imagesize==1.2.035imagesize==1.3.036 # via sphinx37iniconfig==1.1.138 # via pytest39jinja2==3.0.239jinja2==3.0.340 # via sphinx41markupsafe==2.0.142 # via jinja243mypy==0.91043mypy==0.93044 # via -r requirements/typing.in45mypy-extensions==0.4.346 # via mypy47nodeenv==1.6.048 # via pre-commit49packaging==21.249packaging==21.350 # via51 # pallets-sphinx-themes52 # pytest53 # sphinx54 # tox55pallets-sphinx-themes==2.0.155pallets-sphinx-themes==2.0.256 # via -r requirements/docs.in57pep517==0.12.058 # via pip-tools59pip-tools==6.4.0
3 unmodified lines
63pluggy==1.0.064 # via65 # pytest66 # tox67pre-commit==2.15.067pre-commit==2.16.068 # via -r requirements/dev.in69py==1.11.070 # via71 # pytest72 # tox73pygments==2.10.074 # via sphinx75pyparsing==2.4.775pyparsing==3.0.676 # via packaging77pytest==6.2.578 # via -r requirements/tests.in79pytz==2021.3
5 unmodified lines
85six==1.16.086 # via87 # tox88 # virtualenv89snowballstemmer==2.1.089snowballstemmer==2.2.090 # via sphinx91sphinx==4.2.091sphinx==4.3.292 # via93 # -r requirements/docs.in94 # pallets-sphinx-themes95 # sphinx-issues
15 unmodified lines
111sphinxcontrib-serializinghtml==1.1.5112 # via sphinx113toml==0.10.2114 # via115 # mypy115 # pre-commit116 # pytest117 # tox119tomli==1.2.2120 # via pep517118tomli==2.0.0119 # via120 # mypy121 # pep517122tox==3.24.4123 # via -r requirements/dev.in123typing-extensions==3.10.0.2124typing-extensions==4.0.1125 # via mypy126urllib3==1.26.7127 # via requests128virtualenv==20.10.0129 # via130 # pre-commit131 # tox131wheel==0.37.0132wheel==0.37.1133 # via pip-tools134135# The following packages are considered to be unsafe in a requirements file:136# pip
1 unmodified line
modified:requirements/docs.txt+8 added-8 removed
8 unmodified lines
9babel==2.9.110 # via sphinx11certifi==2021.10.812 # via requests13charset-normalizer==2.0.713charset-normalizer==2.0.914 # via requests15docutils==0.17.116 # via sphinx17idna==3.318 # via requests19imagesize==1.2.019imagesize==1.3.020 # via sphinx21jinja2==3.0.221jinja2==3.0.322 # via sphinx23markupsafe==2.0.124 # via jinja225packaging==21.225packaging==21.326 # via27 # pallets-sphinx-themes28 # sphinx29pallets-sphinx-themes==2.0.129pallets-sphinx-themes==2.0.230 # via -r requirements/docs.in31pygments==2.10.032 # via sphinx33pyparsing==2.4.733pyparsing==3.0.634 # via packaging35pytz==2021.336 # via babel37requests==2.26.038 # via sphinx39snowballstemmer==2.1.039snowballstemmer==2.2.040 # via sphinx41sphinx==4.2.041sphinx==4.3.242 # via43 # -r requirements/docs.in44 # pallets-sphinx-themes45 # sphinx-issues
22 unmodified lines
modified:requirements/tests.txt+2 added-2 removed
6 unmodified lines
7attrs==21.2.08 # via pytest9iniconfig==1.1.110 # via pytest11packaging==21.211packaging==21.312 # via pytest13pluggy==1.0.014 # via pytest15py==1.11.016 # via pytest17pyparsing==2.4.717pyparsing==3.0.618 # via packaging19pytest==6.2.520 # via -r requirements/tests.in21toml==0.10.2
1 unmodified line
modified:requirements/typing.txt+3 added-3 removed
2 unmodified lines
3# To update, run:4#5# pip-compile requirements/typing.in6#7mypy==0.9107mypy==0.9308 # via -r requirements/typing.in9mypy-extensions==0.4.310 # via mypy11toml==0.10.211tomli==2.0.012 # via mypy13typing-extensions==3.10.0.213typing-extensions==4.0.114 # via mypy
modified:src/jinja2/compiler.py+1 added-1 removed
216 unmodified lines
217 self.soft_frame = False218219 def copy(self) -> "Frame":220 """Create a copy of the current one."""221 rv = t.cast(Frame, object.__new__(self.__class__))221 rv = object.__new__(self.__class__)222 rv.__dict__.update(self.__dict__)223 rv.symbols = self.symbols.copy()224 return rv225
1732 unmodified lines
modified:src/jinja2/debug.py-2 removed
197 unmodified lines
198 ) -> TracebackType:199 tb.tb_next = tb_next200 return tb201202202elif platform.python_implementation() == "PyPy":203 # PyPy might have special support, and won't work with ctypes.204 try:205 import tputil # type: ignore
17 unmodified lines
223 return op.delegate()224225 return tputil.make_proxy(controller, obj=tb) # type: ignore226228227else:228 # Use ctypes to assign tb_next at the C level since it's read-only229 # from Python.230 import ctypes
27 unmodified lines
modified:src/jinja2/environment.py+6 added-6 removed
936 unmodified lines
937 return template938939 @internalcode940 def _load_template(941 self, name: str, globals: t.Optional[t.Mapping[str, t.Any]]941 self, name: str, globals: t.Optional[t.MutableMapping[str, t.Any]]942 ) -> "Template":943 if self.loader is None:944 raise TypeError("no loader for this environment specified")945 cache_key = (weakref.ref(self.loader), name)
19 unmodified lines
965 def get_template(966 self,967 name: t.Union[str, "Template"],968 parent: t.Optional[str] = None,969 globals: t.Optional[t.Mapping[str, t.Any]] = None,969 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,970 ) -> "Template":971 """Load a template by name with :attr:`loader` and return a972 :class:`Template`. If the template does not exist a973 :exc:`TemplateNotFound` exception is raised.
26 unmodified lines
1000 def select_template(1001 self,1002 names: t.Iterable[t.Union[str, "Template"]],1003 parent: t.Optional[str] = None,1004 globals: t.Optional[t.Mapping[str, t.Any]] = None,1004 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,1005 ) -> "Template":1006 """Like :meth:`get_template`, but tries loading multiple names.1007 If none of the names can be loaded a :exc:`TemplatesNotFound`1008 exception is raised.
47 unmodified lines
1056 template_name_or_list: t.Union[1057 str, "Template", t.List[t.Union[str, "Template"]]1058 ],1059 parent: t.Optional[str] = None,1060 globals: t.Optional[t.Mapping[str, t.Any]] = None,1060 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,1061 ) -> "Template":1062 """Use :meth:`select_template` if an iterable of template names1063 is given, or :meth:`get_template` if one name is given.1064
7 unmodified lines
10721073 def from_string(1074 self,1075 source: t.Union[str, nodes.Template],1076 globals: t.Optional[t.Mapping[str, t.Any]] = None,1076 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,1077 template_class: t.Optional[t.Type["Template"]] = None,1078 ) -> "Template":1079 """Load a template from a source string without using1080 :attr:`loader`.
10 unmodified lines
1091 cls = template_class or self.template_class1092 return cls.from_code(self, self.compile(source), gs, None)10931094 def make_globals(1095 self, d: t.Optional[t.Mapping[str, t.Any]]1095 self, d: t.Optional[t.MutableMapping[str, t.Any]]1096 ) -> t.MutableMapping[str, t.Any]:1097 """Make the globals map for a template. Any given template1098 globals overlay the environment :attr:`globals`.1099
562 unmodified lines
modified:src/jinja2/ext.py+1 added-1 removed
89 unmodified lines
90 self.environment = environment9192 def bind(self, environment: Environment) -> "Extension":93 """Create a copy of this extension bound to another environment."""94 rv = t.cast(Extension, object.__new__(self.__class__))94 rv = object.__new__(self.__class__)95 rv.__dict__.update(self.__dict__)96 rv.environment = environment97 return rv98
781 unmodified lines
modified:src/jinja2/idtracking.py+1 added-1 removed
82 unmodified lines
83 )84 return rv8586 def copy(self) -> "Symbols":87 rv = t.cast(Symbols, object.__new__(self.__class__))87 rv = object.__new__(self.__class__)88 rv.__dict__.update(self.__dict__)89 rv.refs = self.refs.copy()90 rv.loads = self.loads.copy()91 rv.stores = self.stores.copy()
227 unmodified lines
modified:src/jinja2/lexer.py+1 added-1 removed
721 unmodified lines
722 continue723724 # tuples support more options725 if isinstance(tokens, tuple):726 groups = m.groups()726 groups: t.Sequence[str] = m.groups()727728 if isinstance(tokens, OptionalLStrip):729 # Rule supports lstrip. Match will look like730 # text, block type, whitespace control, type, control, ...
139 unmodified lines
modified:src/jinja2/loaders.py+1 added-1 removed
601 unmodified lines
602603 if not isinstance(path, abc.Iterable) or isinstance(path, str):604 path = [path]605606 mod.__path__ = [os.fspath(p) for p in path] # type: ignore606 mod.__path__ = [os.fspath(p) for p in path]607608 sys.modules[package_name] = weakref.proxy(609 mod, lambda x: sys.modules.pop(package_name, None)610 )
42 unmodified lines
modified:src/jinja2/parser.py+1 added-1 removed
158 unmodified lines
159 """Return a new free identifier as :class:`~jinja2.nodes.InternalName`."""160 self._last_identifier += 1161 rv = object.__new__(nodes.InternalName)162 nodes.Node.__init__(rv, f"fi{self._last_identifier}", lineno=lineno)163 return rv # type: ignore163 return rv164165 def parse_statement(self) -> t.Union[nodes.Node, t.List[nodes.Node]]:166 """Parse a single statement."""167 token = self.stream.current
873 unmodified lines
modified:src/jinja2/sandbox.py+1 added-1 removed
407 unmodified lines
408409class SandboxedFormatter(Formatter):410 def __init__(self, env: Environment, **kwargs: t.Any) -> None:411 self._env = env412 super().__init__(**kwargs) # type: ignore412 super().__init__(**kwargs)413414 def get_field(415 self, field_name: str, args: t.Sequence[t.Any], kwargs: t.Mapping[str, t.Any]416 ) -> t.Tuple[t.Any, str]:
12 unmodified lines
modified:src/jinja2/visitor.py+1 added-1 removed
28 unmodified lines
29 """Return the visitor function for this node or `None` if no visitor30 exists for this node. In that case the generic visit function is31 used instead.32 """33 return getattr(self, f"visit_{type(node).__name__}", None) # type: ignore33 return getattr(self, f"visit_{type(node).__name__}", None)3435 def visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:36 """Visit a node."""37 f = self.get_visitor(node)
55 unmodified lines
modified:tests/test_async.py-1 removed
18 unmodified lines
19 def run(coro):20 loop = asyncio.get_event_loop()21 return loop.run_until_complete(coro)222323else:2425 def run(coro):26 return asyncio.run(coro)
633 unmodified lines
modified:.pre-commit-config.yaml+3 added-3 removed
1ci:2 autoupdate_schedule: monthly3repos:4 - repo: https://github.com/asottile/pyupgrade5 rev: v2.29.05 rev: v2.29.16 hooks:7 - id: pyupgrade8 args: ["--py36-plus"]9 - repo: https://github.com/asottile/reorder_python_imports
1 unmodified line
11 hooks:12 - id: reorder-python-imports13 args: ["--application-directories", "src"]14 - repo: https://github.com/psf/black15 rev: 21.10b015 rev: 21.12b016 hooks:17 - id: black18 - repo: https://github.com/PyCQA/flake819 rev: 4.0.120 hooks:21 - id: flake822 additional_dependencies: [flake8-bugbear]23 - repo: https://github.com/pre-commit/pre-commit-hooks24 rev: v4.0.124 rev: v4.1.025 hooks:26 - id: fix-byte-order-marker27 - id: trailing-whitespace28 - id: end-of-file-fixer
modified:setup.cfg+1 added
85 unmodified lines
8687[mypy]88files = src/jinja289python_version = 3.690show_error_codes = True91disallow_subclassing_any = True92disallow_untyped_calls = True93disallow_untyped_defs = True94disallow_incomplete_defs = True
15 unmodified lines