Skip to content

Commit 4f0d01e

Browse files
authored
Merge branch 'trunk' into field-number-kind
2 parents 7e2f67d + 6b569bf commit 4f0d01e

11 files changed

+39
-25
lines changed

.pre-commit-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ repos:
1414
rev: "23.3.0"
1515
hooks:
1616
- id: black
17-
args: ["--target-version", "py37"]
1817

1918
- repo: https://github.com/PyCQA/autoflake
2019
rev: "v2.1.1"

NEWS.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
NEWS
22
====
33

4-
NEXT
5-
----
4+
23.12.0 - 2023-12-22
5+
--------------------
66

77
* Fixed a compatibility issue with Werkzeug versions greater than 2.2. [`#575 <https://github.com/twisted/klein/pull/575>`]
88
* 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>`]

docs/release.rst

+15-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,22 @@ Releasing Klein
1313

1414
#. Start with a clean (no changes) source tree on the trunk branch.
1515
#. Create a new release candidate: :code:`tox -e release -- start`
16+
#. Manually update the ``NEXT`` heading in ``NEWS.rst`` to reference the
17+
version that was just updated, *without* the "rc" release-candidate tag, and
18+
the current RFC3339-formatted date; i.e. write the ``NEWS.rst`` file as if
19+
it were for the final release.
1620
#. Commit and push the branch
1721
#. Open a PR from the branch (follow the usual process for opening a PR).
18-
#. As appropriate, pull the latest code from :code:`trunk`: :code:`git checkout trunk && git pull --rebase` (or use the GitHub UI)
19-
#. To publish a release candidate to PyPI: :code:`tox -e release -- publish`
22+
#. As appropriate, pull the latest code from :code:`trunk`: :code:`git checkout
23+
trunk && git pull --rebase` (or use the GitHub UI)
24+
#. To publish a release candidate to PyPI: :code:`tox -e release -- publish --candidate`
2025
#. Obtain an approving review for the PR using the usual process.
21-
#. To publish a production release: :code:`tox -e release -- publish --final`
26+
#. If the date has changed since the release candidate, update the RFC3339 date
27+
in the ``NEWS.rst`` header for the release to the current date; commit and
28+
push this change to the branch.
29+
#. Publish a production release with the command: :code:`tox -e release --
30+
publish --final`
31+
#. In ``NEWS.rst``, add a new "NEXT" section at the top. You do not need a
32+
separate review for this addition; it should be done after the release, but
33+
before merging to trunk.
2234
#. Merge the PR to the trunk branch.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ build-backend = "setuptools.build_meta"
77
[tool.black]
88

99
line-length = 80
10-
target-version = ["py36"]
10+
target-version = ["py37"]

release.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def fadeToBlack() -> None:
6666
"""
6767
Run black to reformat the source code.
6868
"""
69-
spawn(["tox", "-e", "black-reformat"])
69+
spawn(["pre-commit", "run", "black"])
7070

7171

7272
def incrementVersion(candidate: bool) -> None:
@@ -77,7 +77,7 @@ def incrementVersion(candidate: bool) -> None:
7777
"""
7878
# Incremental doesn't have an API to do this, so we have to run a
7979
# subprocess. Boo.
80-
args = ["python", "-m", "incremental.update", "klein"]
80+
args = ["python", "-m", "incremental.update", "Klein"]
8181
if candidate:
8282
args.append("--rc")
8383
spawn(args)
@@ -263,11 +263,10 @@ def publishRelease(final: bool, test: bool = False) -> None:
263263
1,
264264
)
265265

266-
incrementVersion(candidate=False)
266+
incrementVersion(candidate=not final)
267267
version = currentVersion()
268268

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

273272
tagName = releaseTagName(version)
@@ -308,10 +307,14 @@ def bump() -> None:
308307

309308
@main.command()
310309
@commandOption(
311-
"--test/--production", help="Use test (or production) PyPI server"
310+
"--test/--production",
311+
help="Use test (or production) PyPI server",
312+
default=False,
312313
)
313314
@commandOption(
314-
"--final/--candidate", help="Publish a final (or candidate) release"
315+
"--final/--candidate",
316+
help="Publish a final (or candidate) release",
317+
default=False,
315318
)
316319
def publish(final: bool, test: bool) -> None:
317320
publishRelease(final=final, test=test)

requirements/black.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
black==23.11.0
1+
black==23.12.1

requirements/mypy.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
mypy==1.7.1
2-
mypy-zope==1.0.2
1+
mypy==1.8.0
2+
mypy-zope==1.0.3
33
types-click==7.1.8

requirements/tox-pin-base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
attrs==23.1.0
1+
attrs==23.2.0
22
Automat==22.10.0
33
characteristic==14.3.0
44
constantly==15.1.0

requirements/tox-tests.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
idna==3.4
1+
idna==3.6
22
treq==22.2.0

src/klein/_dihttp.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RequestURL:
4747
"""
4848
Require a hyperlink L{DecodedURL} object from a L{Requirer}.
4949
50-
@since: Klein NEXT
50+
@since: Klein 23.12.0
5151
"""
5252

5353
@classmethod
@@ -80,7 +80,7 @@ class RequestComponent:
8080
"""
8181
Require a hyperlink L{DecodedURL} object from a L{Requirer}.
8282
83-
@since: Klein NEXT
83+
@since: Klein 23.12.0
8484
"""
8585

8686
interface: Type[Interface]
@@ -120,7 +120,7 @@ class Response:
120120
- a body object, which can be anything else Klein understands; for
121121
example, an IResource, an IRenderable, str, bytes, etc.
122122
123-
@since: Klein NEXT
123+
@since: Klein 23.12.0
124124
"""
125125

126126
code: int = 200

src/klein/_version.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""
2-
Provides klein version information.
2+
Provides Klein version information.
33
"""
44

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

88
from incremental import Version
99

10-
__version__ = Version("klein", 23, 5, 0, release_candidate=1)
10+
__version__ = Version("Klein", 23, 12, 0)
1111
__all__ = ["__version__"]

0 commit comments

Comments
 (0)