pytest-dev / pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
11.94k stars 2.66k forks source link

📝💅 Always render changelog draft @ Sphinx docs #12493

Closed webknjaz closed 3 months ago

webknjaz commented 3 months ago

The earlier implementation was generating a temporary file, when the docs site was being built with tox. However, this was not enabled in RTD and is hackish. This patch integrates the sphinxcontrib-towncrier extension to make it work in any environment where Sphinx docs are being built.

📝 Preview/demo: https://pytest--12493.org.readthedocs.build/en/12493/changelog.html#to-be-included-in-vrelease-if-present

webknjaz commented 3 months ago

@RonnyPfannschmidt let's label this as a backport and skip news?

webknjaz commented 3 months ago

~NOTE: it currently gets confused with guessing the next version. @RonnyPfannschmidt perhaps we need to reconsider running custom commands in RTD..~

Alright, the workaround is https://docs.readthedocs.io/en/stable/build-customization.html#unshallow-git-clone.

patchback[bot] commented 3 months ago

Backport to 8.2.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/8.2.x/20dd1d6738d0623fe3176e796805bbd6e36cf831/pr-12493

Backported as https://github.com/pytest-dev/pytest/pull/12495

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.