-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade sphinxcontrib-towncrier to 0.2.0a0 #9805
Conversation
This comment has been minimized.
This comment has been minimized.
Hmm, it seems like the “Unreleased as on” part is rendered wrong. @webknjaz Do you think this is an issue with pip’s usage or the plugin? This is how pip does it: Lines 1 to 12 in e6a65fc
The incorrect result: https://pip--9805.org.readthedocs.build/en/9805/news/ Expected result (from the main branch): https://pip.pypa.io/en/latest/news/ |
Yes, this is weird. OTOH the only thing that changed functionally is try/except when calling a private function to get the config... Probably needs investigation. |
And since the extension basically dumps |
Yep, I just confirmed that |
This was what I thought: they started passing Ref: twisted/towncrier#276. @uranusjr this will fix the problem diff --git a/tools/news/template.rst b/tools/news/template.rst
index 7ea90573d..d17faa414 100644
--- a/tools/news/template.rst
+++ b/tools/news/template.rst
@@ -1,3 +1,5 @@
+{{ top_line }}
+
{% for section in sections %}
{% set underline = "-" %}
{% if section %} Extension-wise, we could probably add a check for the |
This allows sphinxcontrib-towncrier to render it in the documentation. The rendering of NEWS.rst is unchanged since Towncrier detects automatically if that line exists and does not render a duplicated section title.
That seems to work (I added a couple of extra newline controls for cosmetics). |
Yeah, I tested on your branch locally before posting that diff :) |
@uranusjr I overlooked one thing — it appears that your change adding |
So that Towncrier regression makes normal and draft runs produce different outputs: twisted/towncrier#105. Possible fix: twisted/towncrier#303. |
See sphinx-contrib/sphinxcontrib-towncrier#44. Let’s see if this works.