diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f7fe1f52..420a30b0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,16 @@ # Description + +Fixes # + # Checklist * [ ] Make sure changes are covered by existing or new tests. -* [ ] For at least one Python version, make sure local test run is green. -* [ ] Create a file in `src/towncrier/newsfragments/`. Describe your - change and include important information. Your change will be included in the public release notes. +* [ ] For at least one Python version, make sure test pass on your local environment. +* [ ] Create a file in `src/towncrier/newsfragments/`. Briefly describe your + changes, with information useful to end users. Your change will be included in the public release notes. * [ ] Make sure all GitHub Actions checks are green (they are automatically checking all of the above). * [ ] Ensure `docs/tutorial.rst` is still up-to-date. * [ ] If you add new **CLI arguments** (or change the meaning of existing ones), make sure `docs/cli.rst` reflects those changes. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 697d578d..bfd92756 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,8 +159,8 @@ jobs: python: # Use a recent version to avoid having common disconnects between # local development setups and CI. - - name: CPython 3.11 - python-version: '3.11' + - name: CPython 3.12 + python-version: '3.12' task: - name: Check Newsfragment run: | @@ -264,7 +264,8 @@ jobs: python -I admin/check_tag_version_match.py "${{ github.ref }}" - name: Publish to PyPI - on tag - uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 + # This was tag 1.9.0 on 2024-07-30 + uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 coverage: @@ -277,7 +278,7 @@ jobs: - uses: actions/setup-python@v4 with: # Use latest Python, so it understands all syntax. - python-version: 3.11 + python-version: 3.12 - run: python -Im pip install --upgrade coverage[toml] diff --git a/NEWS.rst b/NEWS.rst index 23215d55..dbc9c12b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -5,6 +5,64 @@ Release notes .. towncrier release notes start +Towncrier 24.7.0 (2024-07-31) +============================= + +No changes since the previous release candidate. + + +Features +-------- + +- ``towncrier build`` now handles removing news fragments which are not part of the git repository. For example, uncommitted or unstaged files. (`#357 `_) +- Inferring the version of a Python package now tries to use the metadata of the installed package before importing the package explicitly (which only looks for ``[package].__version__``). (`#432 `_) +- If no filename is given when doing ``towncrier`` create, interactively ask for the issue number and fragment type (and then launch an interactive editor for the fragment content). + + Now by default, when creating a fragment it will be appended with the ``filename`` option's extension (unless an extension is explicitly provided). For example, ``towncrier create 123.feature`` will create ``news/123.feature.rst``. This can be changed in configuration file by setting `add_extension = false`. + + A new line is now added by default to the end of the fragment contents. This can be reverted in the configuration file by setting `add_newline = false`. (`#482 `_) +- The temporary file ``towncrier create`` creates now uses the correct ``.rst`` or ``.md`` extension, which may help your editor with with syntax highlighting. (`#594 `_) +- Running ``towncrier`` will now traverse back up directories looking for the configuration file. (`#601 `_) +- The ``towncrier create`` action now uses sections defined in your config (either interactively, or via the new ``--section`` option). (`#603 `_) +- News fragments are now sorted by issue number even if they have non-digit characters. + + For example:: + + - some issue (gh-3, gh-10) + - another issue (gh-4) + - yet another issue (gh-11) + + The sorting algorithm groups the issues first by non-text characters and then by number. (`#608 `_) +- The ``title_format`` configuration option now uses a markdown format for markdown templates. (`#610 `_) +- newsfragment categories can now be marked with ``check = false``, causing them to be ignored in ``towncrier check`` (`#617 `_) +- ``towncrier check`` will now fail if any news fragments have invalid filenames. + + Added a new configuration option called ``ignore`` that allows you to specify a list of filenames that should be ignored. If this is set, ``towncrier build`` will also fail if any filenames are invalid, except for those in the list. (`#622 `_) + + +Bugfixes +-------- + +- Add explicit encoding to read_text. (`#561 `_) +- The default Markdown template now renders a title containing the release version and date, even when the `name` configuration is left empty. (`#587 `_) +- Orphan news fragments, fragments not associated with an issue, consisting of only digits (e.g. '+12345678.feature') now retain their leading marker character. (`#588 `_) +- Orphan news fragments, fragments not associated with an issue, will now still show in categories that are marked to not show content, since they do not have an issue number to show. (`#612 `_) + + +Improved Documentation +---------------------- + +- Clarify version discovery behavior. (`#432 `_, `#602 `_) +- The tutorial now introduces the `filename` option in the appropriate paragraph and mentions its default value. (`#586 `_) +- Add docs to explain how ``towncrier create +.feature.rst`` (orphan fragments) works. (`#589 `_) + + +Misc +---- + +- `#491 `_, `#561 `_, `#562 `_, `#568 `_, `#569 `_, `#571 `_, `#574 `_, `#575 `_, `#582 `_, `#591 `_, `#596 `_, `#597 `_, `#625 `_ + + towncrier 23.11.0 (2023-11-08) ============================== diff --git a/RELEASE.rst b/RELEASE.rst index d6611536..a8842341 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -59,6 +59,25 @@ For now, the GitHub release text is reStructuredText as it's easy to copy and pa In the future we might create a separate Markdown version. +Release candidate publish failures +---------------------------------- + +The PyPI publish process is automatically triggered when a tag is created. + +The publish is skipped for PRs, so we can check that the automated process works only a release time. +It can happen for the automated publish process to fail. + +As long as the package was not published to PyPI, do the followings: + +* Manually delete the candidate release from GitHub releases +* Manually delete the tag for the release candidate + +Try to fix the issue and trigger the same release candidate again. + +Once the package is published on PyPI, do not delete the release or the tag. +Proceed with create a new release candidate instead. + + Final release ------------- diff --git a/src/towncrier/_version.py b/src/towncrier/_version.py index 93736bae..32acbe3e 100644 --- a/src/towncrier/_version.py +++ b/src/towncrier/_version.py @@ -2,11 +2,11 @@ Provides towncrier version information. """ -# For dev - 23.11.1.dev0 -# For RC - 23.11.1.rc1 -# For final - 23.11.1 +# For dev - 23.11.0.dev0 +# For RC - 23.11.0rc1 (release candidate starts at 1) +# For final - 23.11.0 # make sure to follow PEP440 -__version__ = "23.11.1.dev0" +__version__ = "24.7.1.dev0" _hatchling_version = __version__ __all__ = ["_hatchling_version"] diff --git a/src/towncrier/newsfragments/357.feature.rst b/src/towncrier/newsfragments/357.feature.rst deleted file mode 100644 index d459d5c3..00000000 --- a/src/towncrier/newsfragments/357.feature.rst +++ /dev/null @@ -1 +0,0 @@ -``towncrier build`` now handles removing news fragments which are not part of the git repository. For example, uncommitted or unstaged files. diff --git a/src/towncrier/newsfragments/432.doc.rst b/src/towncrier/newsfragments/432.doc.rst deleted file mode 100644 index 92e5247f..00000000 --- a/src/towncrier/newsfragments/432.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarify version discovery behavior. diff --git a/src/towncrier/newsfragments/432.feature.rst b/src/towncrier/newsfragments/432.feature.rst deleted file mode 100644 index 94f19ea4..00000000 --- a/src/towncrier/newsfragments/432.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Inferring the version of a Python package now tries to use the metadata of the installed package before importing the package explicitly (which only looks for ``[package].__version__``). diff --git a/src/towncrier/newsfragments/482.feature.rst b/src/towncrier/newsfragments/482.feature.rst deleted file mode 100644 index 81b66604..00000000 --- a/src/towncrier/newsfragments/482.feature.rst +++ /dev/null @@ -1,5 +0,0 @@ -If no filename is given when doing ``towncrier`` create, interactively ask for the issue number and fragment type (and then launch an interactive editor for the fragment content). - -Now by default, when creating a fragment it will be appended with the ``filename`` option's extension (unless an extension is explicitly provided). For example, ``towncrier create 123.feature`` will create ``news/123.feature.rst``. This can be changed in configuration file by setting `add_extension = false`. - -A new line is now added by default to the end of the fragment contents. This can be reverted in the configuration file by setting `add_newline = false`. diff --git a/src/towncrier/newsfragments/491.misc b/src/towncrier/newsfragments/491.misc deleted file mode 100644 index 1fc092d2..00000000 --- a/src/towncrier/newsfragments/491.misc +++ /dev/null @@ -1,3 +0,0 @@ -Remove incremental dependency from towncrier. - -Towncrier can still read incremental versions, it just doesn't rely on the package itself any more. diff --git a/src/towncrier/newsfragments/561.bugfix.rst b/src/towncrier/newsfragments/561.bugfix.rst deleted file mode 100644 index 9e0d382e..00000000 --- a/src/towncrier/newsfragments/561.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Add explicit encoding to read_text. diff --git a/src/towncrier/newsfragments/561.misc.rst b/src/towncrier/newsfragments/561.misc.rst deleted file mode 100644 index bdb991a5..00000000 --- a/src/towncrier/newsfragments/561.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Enable reporting of EncodingWarnings when running tests. diff --git a/src/towncrier/newsfragments/562.misc b/src/towncrier/newsfragments/562.misc deleted file mode 100644 index 88d21020..00000000 --- a/src/towncrier/newsfragments/562.misc +++ /dev/null @@ -1 +0,0 @@ -Improved structure and readability of some tests for building the changelog. diff --git a/src/towncrier/newsfragments/568.misc b/src/towncrier/newsfragments/568.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/569.misc.rst b/src/towncrier/newsfragments/569.misc.rst deleted file mode 100644 index 3dfd8638..00000000 --- a/src/towncrier/newsfragments/569.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Constrain jinja2 to v3+ -- our templates require this and it was released over 3 years ago (May 2021) diff --git a/src/towncrier/newsfragments/571.misc b/src/towncrier/newsfragments/571.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/574.misc b/src/towncrier/newsfragments/574.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/575.misc b/src/towncrier/newsfragments/575.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/582.misc b/src/towncrier/newsfragments/582.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/586.doc b/src/towncrier/newsfragments/586.doc deleted file mode 100644 index cbaf3461..00000000 --- a/src/towncrier/newsfragments/586.doc +++ /dev/null @@ -1 +0,0 @@ -The tutorial now introduces the `filename` option in the appropriate paragraph and mentions its default value. diff --git a/src/towncrier/newsfragments/587.bugfix b/src/towncrier/newsfragments/587.bugfix deleted file mode 100644 index eeec305f..00000000 --- a/src/towncrier/newsfragments/587.bugfix +++ /dev/null @@ -1 +0,0 @@ -The default Markdown template now renders a title containing the release version and date, even when the `name` configuration is left empty. diff --git a/src/towncrier/newsfragments/588.bugfix b/src/towncrier/newsfragments/588.bugfix deleted file mode 100644 index f1c3e8ef..00000000 --- a/src/towncrier/newsfragments/588.bugfix +++ /dev/null @@ -1 +0,0 @@ -Orphan news fragments, fragments not associated with an issue, consisting of only digits (e.g. '+12345678.feature') now retain their leading marker character. diff --git a/src/towncrier/newsfragments/589.doc b/src/towncrier/newsfragments/589.doc deleted file mode 100644 index 3664626f..00000000 --- a/src/towncrier/newsfragments/589.doc +++ /dev/null @@ -1 +0,0 @@ -Add docs to explain how ``towncrier create +.feature.rst`` (orphan fragments) works. diff --git a/src/towncrier/newsfragments/591.misc.rst b/src/towncrier/newsfragments/591.misc.rst deleted file mode 100644 index 10f5e3a7..00000000 --- a/src/towncrier/newsfragments/591.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Leveraged pathlib in most file operations. diff --git a/src/towncrier/newsfragments/594.feature.rst b/src/towncrier/newsfragments/594.feature.rst deleted file mode 100644 index 0f8d1296..00000000 --- a/src/towncrier/newsfragments/594.feature.rst +++ /dev/null @@ -1 +0,0 @@ -The temporary file ``towncrier create`` creates now uses the correct ``.rst`` or ``.md`` extension, which may help your editor with with syntax highlighting. diff --git a/src/towncrier/newsfragments/596.misc.rst b/src/towncrier/newsfragments/596.misc.rst deleted file mode 100644 index d1b07d7b..00000000 --- a/src/towncrier/newsfragments/596.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Remove github edit link in non-trunk versions of docs diff --git a/src/towncrier/newsfragments/597.misc.rst b/src/towncrier/newsfragments/597.misc.rst deleted file mode 100644 index e7c7562c..00000000 --- a/src/towncrier/newsfragments/597.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix readthedocs to keep the edit link for ``latest`` in addition to ``trunk``. diff --git a/src/towncrier/newsfragments/601.feature.rst b/src/towncrier/newsfragments/601.feature.rst deleted file mode 100644 index ca209ca5..00000000 --- a/src/towncrier/newsfragments/601.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Running ``towncrier`` will now traverse back up directories looking for the configuration file. diff --git a/src/towncrier/newsfragments/602.doc.rst b/src/towncrier/newsfragments/602.doc.rst deleted file mode 100644 index 92e5247f..00000000 --- a/src/towncrier/newsfragments/602.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarify version discovery behavior. diff --git a/src/towncrier/newsfragments/603.feature.rst b/src/towncrier/newsfragments/603.feature.rst deleted file mode 100644 index afe48164..00000000 --- a/src/towncrier/newsfragments/603.feature.rst +++ /dev/null @@ -1 +0,0 @@ -The ``towncrier create`` action now uses sections defined in your config (either interactively, or via the new ``--section`` option). diff --git a/src/towncrier/newsfragments/608.feature.rst b/src/towncrier/newsfragments/608.feature.rst deleted file mode 100644 index 4cccc128..00000000 --- a/src/towncrier/newsfragments/608.feature.rst +++ /dev/null @@ -1,8 +0,0 @@ -News fragments are now sorted by issue number even if they have non-digit characters. -For example:: - - - some issue (gh-3, gh-10) - - another issue (gh-4) - - yet another issue (gh-11) - -The sorting algorithm groups the issues first by non-text characters and then by number. diff --git a/src/towncrier/newsfragments/610.feature.rst b/src/towncrier/newsfragments/610.feature.rst deleted file mode 100644 index 5b76ab2c..00000000 --- a/src/towncrier/newsfragments/610.feature.rst +++ /dev/null @@ -1 +0,0 @@ -The ``title_format`` configuration option now uses a markdown format for markdown templates. diff --git a/src/towncrier/newsfragments/612.bugfix.rst b/src/towncrier/newsfragments/612.bugfix.rst deleted file mode 100644 index 577a9c48..00000000 --- a/src/towncrier/newsfragments/612.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Orphan news fragments, fragments not associated with an issue, will now still show in categories that are marked to not show content, since they do not have an issue number to show. diff --git a/src/towncrier/newsfragments/617.feature.rst b/src/towncrier/newsfragments/617.feature.rst deleted file mode 100644 index 95799672..00000000 --- a/src/towncrier/newsfragments/617.feature.rst +++ /dev/null @@ -1 +0,0 @@ -newsfragment categories can now be marked with ``check = false``, causing them to be ignored in ``towncrier check`` diff --git a/src/towncrier/newsfragments/622.feature.rst b/src/towncrier/newsfragments/622.feature.rst deleted file mode 100644 index 6ca64a71..00000000 --- a/src/towncrier/newsfragments/622.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -``towncrier check`` will now fail if any news fragments have invalid filenames. - -Added a new configuration option called ``ignore`` that allows you to specify a list of filenames that should be ignored. If this is set, ``towncrier build`` will also fail if any filenames are invalid, except for those in the list. diff --git a/src/towncrier/newsfragments/625.misc b/src/towncrier/newsfragments/625.misc deleted file mode 100644 index e69de29b..00000000