We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2022-01-10.18:59:47.731> created_at = <Date 2022-01-10.14:21:23.878> labels = ['library', '3.11'] title = 'Use raise..from in logging/config instead of assigning __cause__' updated_at = <Date 2022-01-10.18:59:47.730> user = 'https://github.com/iritkatriel'
bugs.python.org fields:
activity = <Date 2022-01-10.18:59:47.730> actor = 'iritkatriel' assignee = 'none' closed = True closed_date = <Date 2022-01-10.18:59:47.731> closer = 'iritkatriel' components = ['Library (Lib)'] creation = <Date 2022-01-10.14:21:23.878> creator = 'iritkatriel' dependencies = [] files = [] hgrepos = [] issue_num = 46332 keywords = ['patch'] message_count = 2.0 messages = ['410220', '410243'] nosy_count = 2.0 nosy_names = ['vinay.sajip', 'iritkatriel'] pr_nums = ['30517'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue46332' versions = ['Python 3.11']
The text was updated successfully, but these errors were encountered:
Lib/logging/config.py has this, which looks like it's partly remnants of old exception handling APIs:
except ImportError: e, tb = sys.exc_info()[1:] v = ValueError('Cannot resolve %r: %s' % (s, e)) v.__cause__, v.__traceback__ = e, tb raise v
It is clearer if written as:
except ImportError as e: v = ValueError('Cannot resolve %r: %s' % (s, e)) raise v from e
(note that this doesn't copy the traceback from e to v, but this is redundant information anyway because e is chained to v as the cause).
Sorry, something went wrong.
New changeset 0d63967 by Irit Katriel in branch 'main': bpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517) 0d63967
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: