[Python-checkins] gh-94538: Fix Argument Clinic output to custom file (GH-94539) (GH-94556)

ambv webhook-mailer at python.org
Tue Jul 5 08:33:30 EDT 2022


https://github.com/python/cpython/commit/5bd56a030ddf19052f23194e7ff95b4b9144f94f
commit: 5bd56a030ddf19052f23194e7ff95b4b9144f94f
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2022-07-05T14:33:23+02:00
summary:

gh-94538: Fix Argument Clinic output to custom file (GH-94539) (GH-94556)

(cherry picked from commit 2b8ed4d3d4741811da31fc774a202d535755c0a9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland at protonmail.com>

files:
A Misc/NEWS.d/next/Tools-Demos/2022-07-04-01-37-42.gh-issue-94538.1rgy1Y.rst
M Tools/clinic/clinic.py

diff --git a/Misc/NEWS.d/next/Tools-Demos/2022-07-04-01-37-42.gh-issue-94538.1rgy1Y.rst b/Misc/NEWS.d/next/Tools-Demos/2022-07-04-01-37-42.gh-issue-94538.1rgy1Y.rst
new file mode 100644
index 0000000000000..e39ae3950c0fe
--- /dev/null
+++ b/Misc/NEWS.d/next/Tools-Demos/2022-07-04-01-37-42.gh-issue-94538.1rgy1Y.rst
@@ -0,0 +1,2 @@
+Fix Argument Clinic output to custom file destinations. Patch by Erlend E.
+Aasland.
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 9ea2784085aac..8deea13b63750 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -4053,7 +4053,7 @@ def directive_output(self, command_or_name, destination=''):
             self.block.output.append('\n')
             return
 
-        d = self.clinic.get_destination(destination)
+        d = self.clinic.get_destination_buffer(destination)
 
         if command_or_name == "everything":
             for name in list(fd):



More information about the Python-checkins mailing list