Skip to content

Commit

Permalink
Merge pull request #710 from twisted/release-23.12
Browse files Browse the repository at this point in the history
Release 23.12
  • Loading branch information
glyph committed Dec 22, 2023
2 parents 4b1b3cd + d156615 commit a2bfc12
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
4 changes: 2 additions & 2 deletions NEWS.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NEWS
====

NEXT
----
23.12.0 - 2023-12-22
--------------------

* Fixed a compatibility issue with Werkzeug versions greater than 2.2. [`#575 <https://github.com/twisted/klein/pull/575>`]
* Added explicit support for Python 3.10 and 3.11, although in practice they did work previously in 21.8. [`#578 <https://github.com/twisted/klein/pull/578>`]
Expand Down
18 changes: 15 additions & 3 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ Releasing Klein

#. Start with a clean (no changes) source tree on the trunk branch.
#. Create a new release candidate: :code:`tox -e release -- start`
#. Manually update the ``NEXT`` heading in ``NEWS.rst`` to reference the
version that was just updated, *without* the "rc" release-candidate tag, and
the current RFC3339-formatted date; i.e. write the ``NEWS.rst`` file as if
it were for the final release.
#. Commit and push the branch
#. Open a PR from the branch (follow the usual process for opening a PR).
#. As appropriate, pull the latest code from :code:`trunk`: :code:`git checkout trunk && git pull --rebase` (or use the GitHub UI)
#. To publish a release candidate to PyPI: :code:`tox -e release -- publish`
#. As appropriate, pull the latest code from :code:`trunk`: :code:`git checkout
trunk && git pull --rebase` (or use the GitHub UI)
#. To publish a release candidate to PyPI: :code:`tox -e release -- publish --candidate`
#. Obtain an approving review for the PR using the usual process.
#. To publish a production release: :code:`tox -e release -- publish --final`
#. If the date has changed since the release candidate, update the RFC3339 date
in the ``NEWS.rst`` header for the release to the current date; commit and
push this change to the branch.
#. Publish a production release with the command: :code:`tox -e release --
publish --final`
#. In ``NEWS.rst``, add a new "NEXT" section at the top. You do not need a
separate review for this addition; it should be done after the release, but
before merging to trunk.
#. Merge the PR to the trunk branch.
17 changes: 10 additions & 7 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def fadeToBlack() -> None:
"""
Run black to reformat the source code.
"""
spawn(["tox", "-e", "black-reformat"])
spawn(["pre-commit", "run", "black"])


def incrementVersion(candidate: bool) -> None:
Expand All @@ -77,7 +77,7 @@ def incrementVersion(candidate: bool) -> None:
"""
# Incremental doesn't have an API to do this, so we have to run a
# subprocess. Boo.
args = ["python", "-m", "incremental.update", "klein"]
args = ["python", "-m", "incremental.update", "Klein"]
if candidate:
args.append("--rc")
spawn(args)
Expand Down Expand Up @@ -263,11 +263,10 @@ def publishRelease(final: bool, test: bool = False) -> None:
1,
)

incrementVersion(candidate=False)
incrementVersion(candidate=not final)
version = currentVersion()

versonFile = Path(__file__).parent / "src" / "klein" / "_version.py"
repository.index.add(str(versonFile))
repository.index.add("src/klein")
repository.index.commit(f"Update version to {version}")

tagName = releaseTagName(version)
Expand Down Expand Up @@ -308,10 +307,14 @@ def bump() -> None:

@main.command()
@commandOption(
"--test/--production", help="Use test (or production) PyPI server"
"--test/--production",
help="Use test (or production) PyPI server",
default=False,
)
@commandOption(
"--final/--candidate", help="Publish a final (or candidate) release"
"--final/--candidate",
help="Publish a final (or candidate) release",
default=False,
)
def publish(final: bool, test: bool) -> None:
publishRelease(final=final, test=test)
Expand Down
6 changes: 3 additions & 3 deletions src/klein/_dihttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RequestURL:
"""
Require a hyperlink L{DecodedURL} object from a L{Requirer}.
@since: Klein NEXT
@since: Klein 23.12.0
"""

@classmethod
Expand Down Expand Up @@ -80,7 +80,7 @@ class RequestComponent:
"""
Require a hyperlink L{DecodedURL} object from a L{Requirer}.
@since: Klein NEXT
@since: Klein 23.12.0
"""

interface: Type[Interface]
Expand Down Expand Up @@ -120,7 +120,7 @@ class Response:
- a body object, which can be anything else Klein understands; for
example, an IResource, an IRenderable, str, bytes, etc.
@since: Klein NEXT
@since: Klein 23.12.0
"""

code: int = 200
Expand Down
6 changes: 3 additions & 3 deletions src/klein/_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
Provides klein version information.
Provides Klein version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update klein` to change this file.
# Use `python -m incremental.update Klein` to change this file.

from incremental import Version

__version__ = Version("klein", 23, 5, 0)
__version__ = Version("Klein", 23, 12, 0)
__all__ = ["__version__"]

0 comments on commit a2bfc12

Please sign in to comment.