Merge branch '3.0.x'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parents 94e80b3, d5e321b · Browse files · 5 files·+21 added−3 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+21 added−3 removed
- tests:+5 added−0 removed
- other:+16 added−3 removed
Provenance
- Commit
6b422a0- Tree
f6eb61c- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
94e80b3- Parent 2
d5e321b
5 files changed+21 added−3 removed
modified:src/flask/sansio/scaffold.py+2 added-1 removed
7 unmodified lines8 from collections import defaultdict9 from functools import update_wrapper10 11 import click12+from jinja2 import BaseLoader13 from jinja2 import FileSystemLoader14 from werkzeug.exceptions import default_exceptions15 from werkzeug.exceptions import HTTPException16 from werkzeug.utils import cached_property255 unmodified lines272 273 self._static_url_path = value274 275 @cached_property275- def jinja_loader(self) -> FileSystemLoader | None:276+ def jinja_loader(self) -> BaseLoader | None:277 """The Jinja loader for this object's templates. By default this278 is a class :class:`jinja2.loaders.FileSystemLoader` to279 :attr:`template_folder` if it is set.280 525 unmodified linesmodified:src/flask/cli.py+3 added-1 removed
856 unmodified lines857 def convert(858 self, value: t.Any, param: click.Parameter | None, ctx: click.Context | None859 ) -> t.Any:860 items = self.split_envvar_value(value)861+ # can't call no-arg super() inside list comprehension until Python 3.12862+ super_convert = super().convert861- return [super().convert(item, param, ctx) for item in items]863+ return [super_convert(item, param, ctx) for item in items]864 865 866 @click.command("run", short_help="Run a development server.")867 @click.option("--host", "-h", default="127.0.0.1", help="The interface to bind to.")244 unmodified linesmodified:tests/test_cli.py+5 added
677 unmodified lines678 app.register_blueprint(bp)679 680 result = app.test_cli_runner().invoke(args=["blue", "--help"])681 assert result.exit_code == 2, f"Unexpected success:\n\n{result.output}"682+683+684+def test_run_exclude_patterns():685+ ctx = run_command.make_context("run", ["--exclude-patterns", __file__])686+ assert ctx.params["exclude_patterns"] == [__file__]modified:CHANGES.rst+10 added
1+Version 3.0.22+-------------3+4+Released 2024-02-035+6+- Correct type for ``jinja_loader`` property. :issue:`5388`7+- Fix error with ``--extra-files`` and ``--exclude-patterns`` CLI options.8+ :issue:`5391`9+10+11 Version 3.0.112 -------------13 14 Released 2024-01-181539 unmodified linesmodified:pyproject.toml+1 added-1 removed
12334567108 unmodified linesExpand all[project]name = "Flask"version = "3.0.1"version = "3.0.2"description = "A simple framework for building complex web applications."readme = "README.rst"license = {file = "LICENSE.rst"}maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]108 unmodified linesExpand all