From 06babb24225d41a76e4aee975380294ca1ee1d7c Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 23 Feb 2019 10:43:49 -0800 Subject: bpo-1054041: Add What's New docs. (GH-11999) Add What's New docs about the Ctrl-C improvement. Correct the issue number in the NEWS entry. --- Doc/whatsnew/3.8.rst | 7 +++++++ .../Core and Builtins/2019-02-16-00-42-32.bpo-1054041.BL-WLd.rst | 1 + .../Core and Builtins/2019-02-16-00-42-32.bpo-1054051.BL-WLd.rst | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054041.BL-WLd.rst delete mode 100644 Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054051.BL-WLd.rst diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 72aaafd1b3..f21175a5a2 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -133,6 +133,13 @@ Other Language Changes :meth:`datetime.datetime.astimezone`. (Contributed by Paul Ganssle in :issue:`32417`.) +* When the Python interpreter is interrupted by Ctrl-C (SIGINT) and the + resulting :exc:`KeyboardInterrupt` exception is not caught, the Python process + now exits via a SIGINT signal or with the correct exit code such that the + calling process can detect that it died due to a Ctrl-C. Shells on POSIX + and Windows use this to properly terminate scripts in interactive sessions. + (Contributed by Google via Gregory P. Smith in :issue:`1054041`.) + New Modules =========== diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054041.BL-WLd.rst b/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054041.BL-WLd.rst new file mode 100644 index 0000000000..e61fc0bd61 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054041.BL-WLd.rst @@ -0,0 +1 @@ +When the main interpreter exits due to an uncaught KeyboardInterrupt, the process now exits in the appropriate manner for its parent process to detect that a SIGINT or ^C terminated the process. This allows shells and batch scripts to understand that the user has asked them to stop. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054051.BL-WLd.rst b/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054051.BL-WLd.rst deleted file mode 100644 index e61fc0bd61..0000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2019-02-16-00-42-32.bpo-1054051.BL-WLd.rst +++ /dev/null @@ -1 +0,0 @@ -When the main interpreter exits due to an uncaught KeyboardInterrupt, the process now exits in the appropriate manner for its parent process to detect that a SIGINT or ^C terminated the process. This allows shells and batch scripts to understand that the user has asked them to stop. \ No newline at end of file -- cgit v1.2.1