From: Pablo Galindo Salgado Date: Mon, 7 Nov 2022 13:36:48 +0000 (+0000) Subject: gh-91058: Add what's new entry for the improvement in commit 7cfbb49fcd4c85f9bab37973... X-Git-Tag: v3.12.0a2~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be31ecf8b3a3ceadf947a9a5c6dbc8150527cb0c;p=thirdparty%2FPython%2Fcpython.git gh-91058: Add what's new entry for the improvement in commit 7cfbb49fcd4c85f9bab3797302eadf93df490344 (#99198) --- diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 53c72e957d64..3802d0e32414 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -106,6 +106,16 @@ Improved Error Messages ^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Did you mean to use 'from ... import ...' instead? +* :exc:`ImportError` exceptions raised from failed ``from import + `` statements now include suggestions for the value of ```` based on the + available names in ````. Contributed by Pablo Galindo in :gh:`91058`. + + >>> from collections import chainmap + Traceback (most recent call last): + File "", line 1, in + ImportError: cannot import name 'chainmap' from 'collections'. Did you mean: 'ChainMap'? + + New Features ============