From 592b77d7c38a82acc2b605f6671a0ce6ed46fe08 Mon Sep 17 00:00:00 2001 From: Alc-Alc <45509143+Alc-Alc@users.noreply.github.com> Date: Fri, 26 Jul 2024 22:45:34 +0530 Subject: [PATCH] chore(release): Release new minor version 2.10.0 (#3648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * v2.9.1 * chore(release): Prepare for 2.10.0 release fix(release): Fixed the regex so it works on versions with more than one digit. eg: 10.10.10 * chore: apply pre commit --------- Co-authored-by: Janek Nouvertné <25355197+provinzkraut@users.noreply.github.com> Co-authored-by: Alc-Alc --- docs/release-notes/changelog.rst | 68 ++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- tools/prepare_release.py | 4 +- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/changelog.rst b/docs/release-notes/changelog.rst index e7ff024243..03fefbd852 100644 --- a/docs/release-notes/changelog.rst +++ b/docs/release-notes/changelog.rst @@ -3,6 +3,74 @@ 2.x Changelog ============= +.. changelog:: 2.10.0 + :date: 2024-07-26 + + .. change:: Allow creating parent directories for a file store + :type: feature + :pr: 3526 + + Allow ``mkdir`` True when creating a file store. + + .. change:: Add ``logging_module`` parameter to ``LoggingConfig`` + :type: feature + :pr: 3578 + :issue: 3536 + + Provide a way in the ``logging_module`` to switch easily from ``logging`` to ``picologging``. + + .. change:: Add handler name to exceptions in handler validation + :type: feature + :pr: 3575 + + Add handler name to exceptions raise by ``_validate_handler_function``. + + .. change:: Add strict validation support for Pydantic plugin + :type: feature + :pr: 3608 + :issue: 3572 + + Adds parameters in pydantic plugin to support strict validation and all the ``model_dump`` args + + .. change:: Fix signature model signatures clash + :type: bugfix + :pr: 3605 + :issue: 3593 + + Ensures that the functions used by the signature model itself do not interfere with the signature model created. + + .. change:: Correctly handle Annotated ``NewType`` + :type: bugfix + :pr: 3615 + :issue: 3614 + + Resolves infinite loop in schema generation when a model has an Annotated ``NewType``. + + .. change:: Use `ASGIConnection` instead of ``Request`` for ``flash`` + :type: bugfix + :pr: 3626 + + Currently, the ``FlashPlugin`` expects the ``request`` parameter to be a type of ``Request``. However, there's no reason it can't use the parent class ``ASGIConnection``. + + Doing this, allows for flash to be called in guards that expect an ``ASGIConnection`` instead of ``Request``: + + .. code-block:: python + + def requires_active_user(connection: ASGIConnection, _: BaseRouteHandler) -> None: + if connection.user.is_active: + return + msg = "Your user account is inactive." + flash(connection, msg, category="error") + raise PermissionDeniedException(msg) + + .. change:: Allow returning ``Response[None]`` from head route handlers + :type: bugfix + :pr: 3641 + :issue: 3640 + + Fix a bug where the validation of the return annotation for the ``head`` route handler was too strict and would not allow returning a ``Response[None]``. + + .. changelog:: 2.9.1 :date: 2024-06-21 diff --git a/pyproject.toml b/pyproject.toml index e116e9f087..d7840599d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ maintainers = [ name = "litestar" readme = "README.md" requires-python = ">=3.8,<4.0" -version = "2.9.1" +version = "2.10.0" [project.urls] Blog = "https://blog.litestar.dev" diff --git a/tools/prepare_release.py b/tools/prepare_release.py index 7192eadee7..a3d290b9d5 100644 --- a/tools/prepare_release.py +++ b/tools/prepare_release.py @@ -368,7 +368,7 @@ def update_pyproject_version(new_version: str) -> None: # can't use tomli-w / tomllib for this as is messes up the formatting pyproject = pathlib.Path("pyproject.toml") content = pyproject.read_text() - content = re.sub(r'(\nversion ?= ?")\d\.\d\.\d("\s*\n)', rf"\g<1>{new_version}\g<2>", content) + content = re.sub(r'(\nversion ?= ?")\d+\.\d+\.\d+("\s*\n)', rf"\g<1>{new_version}\g<2>", content) pyproject.write_text(content) @@ -408,7 +408,7 @@ def cli( if base is None: base = _get_latest_tag() - if not re.match(r"\d\.\d\.\d", version): + if not re.match(r"\d+\.\d+\.\d+", version): click.secho(f"Invalid version: {version!r}") quit(1)