tags 1136355 +patch
thanks

Hi,

Upstream documentation includes cli.rst, which documents the chango
command line interface. Using this as the manpage source with sphinx
generates a functional manpage.

The attached patch configures cli.rst as the manpage source.

After generating the manpage, I noticed that the documentation for the
default value for "chango release --date" reads "<function _today at
0x…>". The second attached patch adds the string "datetime.date.today()"
as documentation for the default value.

Please forward these patches upstream.

Thanks.

>From a760172e9dd3f852bc31d80b2139ff14e47c8249 Mon Sep 17 00:00:00 2001
From: Teemu Hukkanen <[email protected]>
Date: Tue, 12 May 2026 17:08:25 +0300
Subject: [PATCH 1/2] Use cli.rst as manpage source (Closes: #1136355)

---
 docs/source/conf.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index fd8dbcb..3274c20 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -106,6 +106,9 @@ html_permalinks_icon = "¶"
 # pixels large.
 html_favicon = "../../logo/chango_icon.ico"
 
+man_pages = [
+    ("cli", "chango", "Sphinx extension for changelog generation", "", 1),
+]
 
 # Due to Sphinx behaviour, these imports only work when imported here, not at top of module.
 from docs.auxil.rich_to_rst import RichConverter  # noqa: E402
-- 
2.53.0

>From 2f8341b86204273b01dea833d670d93bebbe227f Mon Sep 17 00:00:00 2001
From: Teemu Hukkanen <[email protected]>
Date: Wed, 13 May 2026 10:37:54 +0300
Subject: [PATCH 2/2] Add string describing dynamic --date option for chango
 release
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The automatically generated default shows up as "<function _today at
0x…>", describing it as "datetime.date.today()" (which is what _today
calls), together with the description of the date option should make
the default clear.
---
 src/chango/_cli/release.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chango/_cli/release.py b/src/chango/_cli/release.py
index 96f3060..4de4f8a 100644
--- a/src/chango/_cli/release.py
+++ b/src/chango/_cli/release.py
@@ -29,6 +29,7 @@ def release(
             help="The date of the version release. Defaults to today.",
             parser=date_callback,
             default_factory=_today,
+            show_default="datetime.date.today()",
         ),
     ],
 ) -> None:
-- 
2.53.0

Reply via email to