From 5bd766bf6c0392c23b2dec66e3c9464b89992b91 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 21 Dec 2020 21:04:33 -0500 Subject: [PATCH] docs: update changelog and add script to help generate it (#2733) --- docs/changelog.rst | 27 +++++++++++++++++++++- tools/make_changelog.py | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 tools/make_changelog.py diff --git a/docs/changelog.rst b/docs/changelog.rst index 6a12b9537..0ceb2582c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,10 +6,35 @@ Changelog Starting with version 1.8.0, pybind11 releases use a `semantic versioning `_ policy. + v2.6.2 (TBA, not yet released) ------------------------------ -* Details to follow here + +* Fixed segfault in multithreaded environments when using ``scoped_ostream_redirect``. + `#2675 `_ + +* CMake: mixing local and installed pybind11's would prioritize the installed one over the local one (regression in 2.6.0). + `#2716 `_ + +* Fix bug where the constructor of `object` subclasses would not throw on being passed a Python object of the wrong type. + `#2701 `_ + +* Fixed assertion error related to unhandled (later overwritten) exception in CPython 3.8 and 3.9 debug builds. + `#2685 `_ + +* Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build. + `#2683 `_ + +* Fixes segfaults in multithreaded environments when using ``scoped_ostream_redirect``. + `#2675 `_ + +* Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``. + `#2662 `_ + +* Allow thread termination to be avoided during shutdown for CPython 3.7+ via ``.disarm``. + `#2657 `_ + v2.6.1 (Nov 11, 2020) diff --git a/tools/make_changelog.py b/tools/make_changelog.py new file mode 100755 index 000000000..2c8c47c51 --- /dev/null +++ b/tools/make_changelog.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import re + +import ghapi.core + + +ENTRY = re.compile( + r""" + Suggested \s changelog \s entry: + .* + ```rst + \s* + (.*?) + \s* + ``` +""", + re.DOTALL | re.VERBOSE, +) + + +api = ghapi.core.GhApi(owner="pybind", repo="pybind11") + +issues = api.issues.list_for_repo(labels="needs changelog", state="closed") +missing = [] + +for issue in issues: + changelog = ENTRY.findall(issue.body) + if changelog: + (msg,) = changelog + if not msg.startswith("* "): + msg = "* " + msg + if not msg.endswith("."): + msg += "." + + print(msg) + print(f" `#{issue.number} <{issue.html_url}>`_\n") + + else: + missing.append(issue) + +if missing: + print() + print("-" * 30) + print() + + for issue in missing: + print(f"Missing: {issue.title}") + print(f" {issue.html_url}")