diff options
author | Géry Ogam <gery.ogam@gmail.com> | 2020-01-14 11:58:29 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2020-01-14 11:58:29 (GMT) |
commit | 1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d (patch) | |
tree | 1cecc3868d762cd3e1c2414520d954dfe05aea17 /Misc | |
parent | 9af0e47b1705457bb6b327c197f2ec5737a1d8f6 (diff) | |
download | cpython-1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d.zip cpython-1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d.tar.gz cpython-1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d.tar.bz2 |
bpo-39048: Look up __aenter__ before __aexit__ in async with (GH-17609)
* Reorder the __aenter__ and __aexit__ checks for async with
* Add assertions for async with body being skipped
* Swap __aexit__ and __aenter__ loading in the documentation
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2020-01-13-14-45-22.bpo-39048.iPsj81.rst | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -1219,6 +1219,7 @@ Elena Oat Jon Oberheide Milan Oberkirch Pascal Oberndoerfer +Géry Ogam Jeffrey Ollie Adam Olsen Bryan Olson diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-13-14-45-22.bpo-39048.iPsj81.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-13-14-45-22.bpo-39048.iPsj81.rst new file mode 100644 index 0000000..1179ef4 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-01-13-14-45-22.bpo-39048.iPsj81.rst @@ -0,0 +1,4 @@ +Improve the displayed error message when incorrect types are passed to ``async +with`` statements by looking up the :meth:`__aenter__` special method before +the :meth:`__aexit__` special method when entering an asynchronous context +manager. Patch by Géry Ogam. |