Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-103791: handle BaseExceptionGroup in contextlib.suppress() #111910

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Nov 9, 2023

@gaogaotiantian
Copy link
Member

I don't think we are going to backport this. This is not a bug in 3.12 - it's doing what the docs says. So I believe the changeversion could be just 3.13.

@Zac-HD
Copy link
Contributor Author

Zac-HD commented Nov 9, 2023

IMO it should be backported to 3.12.1: it seems likely that the missing support for BaseExceptionGroup was simply an oversight (@ambv might be able to confirm?), and it's much easier on users if we patch it promptly - the .0 versions aren't widely used.

Doc/library/contextlib.rst Show resolved Hide resolved
Lib/test/test_contextlib.py Show resolved Hide resolved
@iritkatriel
Copy link
Member

IMO it should be backported to 3.12.1: it seems likely that the missing support for BaseExceptionGroup was simply an oversight (@ambv might be able to confirm?), and it's much easier on users if we patch it promptly - the .0 versions aren't widely used.

I'd call it a bug and backport.

@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) needs backport to 3.12 bug and security fixes labels Nov 9, 2023
@Zac-HD Zac-HD force-pushed the zac-hd/suppress-baseexceptiongroup branch from 0dfe1a7 to bb4220c Compare November 10, 2023 04:40
@Zac-HD Zac-HD force-pushed the zac-hd/suppress-baseexceptiongroup branch from bb4220c to b8bc136 Compare November 10, 2023 04:59
@iritkatriel iritkatriel merged commit d61313b into python:main Nov 10, 2023
24 checks passed
@miss-islington-app
Copy link

Thanks @Zac-HD for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2023
…)` (pythonGH-111910)

(cherry picked from commit d61313b)

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 10, 2023

GH-111955 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Nov 10, 2023
iritkatriel pushed a commit that referenced this pull request Nov 10, 2023
…()` (GH-111910) (#111955)

gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (GH-111910)
(cherry picked from commit d61313b)

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
@Zac-HD Zac-HD deleted the zac-hd/suppress-baseexceptiongroup branch November 10, 2023 17:02
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants