提交 a45c2f5e 编写于 作者: D Donald Stufft

Generate our NEWS.rst with towncrier

上级 16944a63
此差异已折叠。
include AUTHORS.txt
include LICENSE.txt
include CHANGES.txt
include NEWS.rst
include README.rst
include pyproject.toml
include pip/_vendor/README.rst
include pip/_vendor/vendor.txt
......@@ -20,6 +21,7 @@ recursive-include docs Makefile *.rst *.py *.bat
prune .github
prune .travis
prune docs/_build
prune news
prune contrib
prune tasks
prune tests
此差异已折叠。
......@@ -88,6 +88,28 @@ Later, when you think you're ready, get in touch with one of the maintainers,
and they will initiate a vote.
Adding News
===========
The pip project manages its changelog/news file using
`towncrier <https://pypi.org/project/towncrier/>`_. To add a new item to the
news file, you must create a file inside of the ``news/`` directory.
This file must be named as ``<issue>.<ext>``, where ``<issue>`` is the issue
number on GitHub (if it's important enough to have a news entry, it should be
important enough to have a bug describing the desired change) and ``<ext>`` is
one of ``removal``, ``feature``, ``bugfix``, ``doc``. Thus a file might be named
something like ``news/1234.bugfix``.
The contents of this file is the news file entry that you wish to add WITHOUT
referencing the issue number (the reference will be added automatically). These
contents can include reStructuredText formatting.
If you wish to reference multiple issues with the same news file entry, then
simply create multiple files with the exact same contents and towncrier will
deduplicate them and reference all of the specified issues.
Release Process
===============
......@@ -96,6 +118,8 @@ Release Process
#. On the current pip ``master`` branch, make a new commit which bumps the
version in ``pip/__init__.py`` to the release version and adjust the
``CHANGES.txt`` file to reflect the current date.
#. On the current pip ``master`` branch, generate a new ``NEWS.rst`` by running
``invoke generate.news`` and commit the results.
#. Create a signed tag of the ``master`` branch of the form ``X.Y.Z`` using the
command ``git tag -s X.Y.Z``.
#. Checkout the tag using ``git checkout X.Y.Z`` and create the distribution
......
......@@ -2,4 +2,4 @@
Release Notes
=============
.. include:: ../CHANGES.txt
.. include:: ../NEWS.rst
Add `--progress-bar <progress_bar>` to ``pip download``, ``pip install`` and
``pip wheel`` commands, to allow selecting a specific progress indicator or, to
completely suppress, (for example in a CI environment) use
``--progress-bar off```.
Return a failing exit status when `pip install`, `pip download`, or `pip wheel`
is called with no requirements.
Add `--progress-bar <progress_bar>` to ``pip download``, ``pip install`` and
``pip wheel`` commands, to allow selecting a specific progress indicator or, to
completely suppress, (for example in a CI environment) use
``--progress-bar off```.
Improved the memory and disk efficiency of the HTTP cache.
Use pkg_resources to parse the entry points file to allow names with colons.
Add `--exclude-editable` to ``pip freeze`` and ``pip list`` to exclude editable
packages from installed package list.
Add `--exclude-editable` to ``pip freeze`` and ``pip list`` to exclude editable
packages from installed package list.
Add support for the new ``@ url`` syntax from PEP 508.
Avoid importing setuptools in the parent pip process, to avoid a race condition
when upgrading one of setuptools dependencies.
Dropped support for Python 2.6.
{% for section in sections %}
{% set underline = "-" %}
{% if section %}
{{section}}
{{ underline * section|length }}{% set underline = "~" %}
{% endif %}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category]|dictsort(by='value') %}
- {{ text }} ({{ values|sort|join(', ') }})
{% endfor %}
{% else %}
- {{ sections[section][category]['']|sort|join(', ') }}
{% endif %}
{% if sections[section][category]|length == 0 %}
No significant changes.
{% else %}
{% endif %}
{% endfor %}
{% else %}
No significant changes.
{% endif %}
{% endfor %}
[tool.towncrier]
package = "pip"
filename = "NEWS.rst"
directory = "news/"
title_format = """
{version} ({project_date})
==================
"""
template = "news/_template.rst"
[[tool.towncrier.type]]
directory = "removal"
name = "Removal"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
......@@ -26,3 +26,14 @@ def authors(ctx):
with io.open("AUTHORS.txt", "w", encoding="utf8") as fp:
fp.write(u"\n".join(authors))
fp.write(u"\n")
@invoke.task
def news(ctx, draft=False):
print("[generate.news] Generating NEWS")
args = []
if draft:
args.append("--draft")
ctx.run("towncrier {}".format(" ".join(args)))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册