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

ambv webhook-mailer at python.org
Tue Jul 5 08:34:04 EDT 2022


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

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

(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 5ad4f879a33f7..791d43408233c 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -4131,7 +4131,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