Skip to content

Commit c383ec3

Browse files
authored
Merge pull request #9172 from webknjaz/docs/unreleased-change-fragments-preview
Add a preview for the "next release" change notes
2 parents a48ad53 + 0ddfe08 commit c383ec3

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

docs/html/conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import glob
1313
import os
14+
import pathlib
1415
import re
1516
import sys
1617

@@ -34,6 +35,7 @@
3435
'sphinx.ext.intersphinx',
3536
# third-party:
3637
'sphinx_inline_tabs',
38+
'sphinxcontrib.towncrier',
3739
# in-tree:
3840
'docs_feedback_sphinxext',
3941
'pip_sphinxext',
@@ -314,3 +316,10 @@ def to_document_name(path, base_dir):
314316
'What content was useful?',
315317
'What content was not useful?',
316318
)
319+
320+
# -- Options for towncrier_draft extension -----------------------------------
321+
322+
towncrier_draft_autoversion_mode = 'draft' # or: 'sphinx-release', 'sphinx-version'
323+
towncrier_draft_include_empty = True
324+
towncrier_draft_working_directory = pathlib.Path(docs_dir).parent
325+
# Not yet supported: towncrier_draft_config_path = 'pyproject.toml' # relative to cwd

docs/html/news.rst

+2
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Changelog
77
Major and minor releases of pip also include changes listed within
88
prior beta releases.
99

10+
.. towncrier-draft-entries:: |release|, unreleased as on
11+
1012
.. include:: ../../NEWS.rst

news/9172.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Render the unreleased pip version change notes on the news page in docs.

tools/requirements/docs.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sphinx == 3.2.1
22
furo
33
sphinx-inline-tabs
4+
sphinxcontrib-towncrier
45

56
# `docs.pipext` uses pip's internals to generate documentation. So, we install
67
# the current directory to make it work.

0 commit comments

Comments
 (0)