-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
urllib.error.HTTPError(..., fp=None)
raises a KeyError
instead of an AttributeError
on attribute access
#98778
Comments
The problem is that Lines 49 to 50 in 3e07f82
cc @orsenthil |
… None (pythongh-99966) (cherry picked from commit dc8a868) Co-authored-by: Dong-hee Na <donghee.na@python.org>
… None (pythongh-99966) (cherry picked from commit dc8a868) Co-authored-by: Dong-hee Na <donghee.na@python.org>
Great! Thanks for the fix :) Do you think it would be interesting to make diff --git a/Lib/traceback.py b/Lib/traceback.py
index 6270100348..a9c15d59be 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -694,7 +694,10 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
# Capture now to permit freeing resources: only complication is in the
# unofficial API _format_final_exc_line
self._str = _safe_string(exc_value, 'exception')
- self.__notes__ = getattr(exc_value, '__notes__', None)
+ try:
+ self.__notes__ = getattr(exc_value, '__notes__', None)
+ except Exception:
+ self.__notes__ = None
if exc_type and issubclass(exc_type, SyntaxError):
# Handle SyntaxError's specially |
@vxgmichel |
353: Bump exceptiongroup from 1.1.0 to 1.1.1 r=alallema a=dependabot[bot] Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.1.0 to 1.1.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <ul> <li>Backported upstream fix for <a href="https://redirect.github.com/agronholm/exceptiongroup/issues/99553">gh-99553</a> (custom subclasses of <code>BaseExceptionGroup</code> that also inherit from <code>Exception</code> should not be able to wrap base exceptions)</li> <li>Moved all initialization code to <code>__new__()</code> (thus matching Python 3.11 behavior)</li> </ul> <p><strong>1.0.4</strong></p> <ul> <li>Fixed regression introduced in v1.0.3 where the code computing the suggestions would assume that both the <code>obj</code> attribute of <code>AttributeError</code> is always available, even though this is only true from Python 3.10 onwards (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/43">#43</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.3</strong></p> <ul> <li>Fixed monkey patching breaking suggestions (on a <code>NameError</code> or <code>AttributeError</code>) on Python 3.10 (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/41">#41</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.2</strong></p> <ul> <li>Updated type annotations to match the ones in <code>typeshed</code></li> </ul> <p><strong>1.0.1</strong></p> <ul> <li>Fixed formatted traceback missing exceptions beyond 2 nesting levels of <code>__context__</code> or <code>__cause__</code></li> </ul> <p><strong>1.0.0</strong></p> <ul> <li>Fixed <code>AttributeError: 'PatchedTracebackException' object has no attribute '__cause__'</code> on Python 3.10 (only) when a traceback is printed from an exception where an exception group is set as the cause (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/33">#33</a>)</li> <li>Fixed a loop in exception groups being rendered incorrectly (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/35">#35</a>)</li> <li>Fixed the patched formatting functions (<code>format_exception()</code>etc.) not passing the <code>compact=True</code> flag on Python 3.10 like the original functions do</li> </ul> <p><strong>1.0.0rc9</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/ba714645f1333d76781782f0efb6240d58dd6e74"><code>ba71464</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/51c1bb9d1366cadd9a97946f5e7bf0b95408f15f"><code>51c1bb9</code></a> Fixed formatting of news item</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/95b78198e16bc3620c35fdc06ccd3c2f9d4b2a79"><code>95b7819</code></a> Work around CPython bug in <code>HTTPError</code> (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/58">#58</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/5fbf14a2701fb8ed76579117bdcbbf331b5f93e0"><code>5fbf14a</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/57">#57</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0208cdfac6cc20c9399754c6049e45acaeeafa76"><code>0208cdf</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/56">#56</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/b8631911d2400ce2e3dc6a5b06b1d49b2c50e36a"><code>b863191</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/55">#55</a>)</li> <li>See full diff in <a href="https://github.com/agronholm/exceptiongroup/compare/1.1.0...1.1.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.1.0&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.1.0 to 1.1.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <ul> <li>Backported upstream fix for <a href="https://redirect.github.com/agronholm/exceptiongroup/issues/99553">gh-99553</a> (custom subclasses of <code>BaseExceptionGroup</code> that also inherit from <code>Exception</code> should not be able to wrap base exceptions)</li> <li>Moved all initialization code to <code>__new__()</code> (thus matching Python 3.11 behavior)</li> </ul> <p><strong>1.0.4</strong></p> <ul> <li>Fixed regression introduced in v1.0.3 where the code computing the suggestions would assume that both the <code>obj</code> attribute of <code>AttributeError</code> is always available, even though this is only true from Python 3.10 onwards (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/43">#43</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.3</strong></p> <ul> <li>Fixed monkey patching breaking suggestions (on a <code>NameError</code> or <code>AttributeError</code>) on Python 3.10 (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/41">#41</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.2</strong></p> <ul> <li>Updated type annotations to match the ones in <code>typeshed</code></li> </ul> <p><strong>1.0.1</strong></p> <ul> <li>Fixed formatted traceback missing exceptions beyond 2 nesting levels of <code>__context__</code> or <code>__cause__</code></li> </ul> <p><strong>1.0.0</strong></p> <ul> <li>Fixed <code>AttributeError: 'PatchedTracebackException' object has no attribute '__cause__'</code> on Python 3.10 (only) when a traceback is printed from an exception where an exception group is set as the cause (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/33">#33</a>)</li> <li>Fixed a loop in exception groups being rendered incorrectly (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/35">#35</a>)</li> <li>Fixed the patched formatting functions (<code>format_exception()</code>etc.) not passing the <code>compact=True</code> flag on Python 3.10 like the original functions do</li> </ul> <p><strong>1.0.0rc9</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/ba714645f1333d76781782f0efb6240d58dd6e74"><code>ba71464</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/51c1bb9d1366cadd9a97946f5e7bf0b95408f15f"><code>51c1bb9</code></a> Fixed formatting of news item</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/95b78198e16bc3620c35fdc06ccd3c2f9d4b2a79"><code>95b7819</code></a> Work around CPython bug in <code>HTTPError</code> (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/58">#58</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/5fbf14a2701fb8ed76579117bdcbbf331b5f93e0"><code>5fbf14a</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/57">#57</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0208cdfac6cc20c9399754c6049e45acaeeafa76"><code>0208cdf</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/56">#56</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/b8631911d2400ce2e3dc6a5b06b1d49b2c50e36a"><code>b863191</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/55">#55</a>)</li> <li>See full diff in <a href="https://github.com/agronholm/exceptiongroup/compare/1.1.0...1.1.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.1.0&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
793: Bump exceptiongroup from 1.1.1 to 1.1.2 r=alallema a=dependabot[bot] Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.1.1 to 1.1.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <ul> <li>Backported upstream fix for <a href="https://redirect.github.com/agronholm/exceptiongroup/issues/99553">gh-99553</a> (custom subclasses of <code>BaseExceptionGroup</code> that also inherit from <code>Exception</code> should not be able to wrap base exceptions)</li> <li>Moved all initialization code to <code>__new__()</code> (thus matching Python 3.11 behavior)</li> </ul> <p><strong>1.0.4</strong></p> <ul> <li>Fixed regression introduced in v1.0.3 where the code computing the suggestions would assume that both the <code>obj</code> attribute of <code>AttributeError</code> is always available, even though this is only true from Python 3.10 onwards (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/43">#43</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.3</strong></p> <ul> <li>Fixed monkey patching breaking suggestions (on a <code>NameError</code> or <code>AttributeError</code>) on Python 3.10 (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/41">#41</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.2</strong></p> <ul> <li>Updated type annotations to match the ones in <code>typeshed</code></li> </ul> <p><strong>1.0.1</strong></p> <ul> <li>Fixed formatted traceback missing exceptions beyond 2 nesting levels of <code>__context__</code> or <code>__cause__</code></li> </ul> <p><strong>1.0.0</strong></p> <ul> <li>Fixed <code>AttributeError: 'PatchedTracebackException' object has no attribute '__cause__'</code> on Python 3.10 (only) when a traceback is printed from an exception where an exception</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/571b12187c0eee916ad224f670fb7739b94fddc7"><code>571b121</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/821d5ebaadfd0b5b16c785a942f69e89933217bf"><code>821d5eb</code></a> Changed handling of a single exception raised in exception group handlers to ...</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/8a104ebc3f0201b5af0787bc90d09522f43e1d4c"><code>8a104eb</code></a> Fixed pre-commit error</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/cad96f68f9ddbb8d347ebe9c26544e26f99584f7"><code>cad96f6</code></a> Added .ruff_cache/ to .gitignore</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/111f33842e2ed91ad795d29d6ca4a1d493f6684d"><code>111f338</code></a> Fixed coveralls reporting</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/c926b0a0c1d6a4755382fb0ff0cc929cc28904b8"><code>c926b0a</code></a> Switched from flake8 and isort to ruff</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0d6338707a1ff6e0dfcf4ffc392609b1cd7c16cd"><code>0d63387</code></a> Added Python 3.12 to the testing matrix</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/9bfc03f402cca2d671a42d00dafb56f5c1e75847"><code>9bfc03f</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/63">#63</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/c604dd818b7dd3b8817594fce048a6f85870832a"><code>c604dd8</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/62">#62</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/516e53262eb4608266f6b314764d2be23900ce1c"><code>516e532</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/61">#61</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.1.1...1.1.2">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.1.1&new-version=1.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
837: Bump exceptiongroup from 1.1.2 to 1.1.3 r=sanders41 a=dependabot[bot] Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.1.2 to 1.1.3. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.1.3</strong></p> <ul> <li><code>catch()</code> now raises a <code>TypeError</code> if passed an async exception handler instead of just giving a <code>RuntimeWarning</code> about the coroutine never being awaited. (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/66">#66</a>, PR by John Litborn)</li> <li>Fixed plain <code>raise</code> statement in an exception handler callback to work like a <code>raise</code> in an <code>except*</code> block</li> <li>Fixed new exception group not being chained to the original exception when raising an exception group from exceptions raised in handler callbacks</li> <li>Fixed type annotations of the <code>derive()</code>, <code>subgroup()</code> and <code>split()</code> methods to match the ones in typeshed</li> </ul> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <ul> <li>Backported upstream fix for <a href="https://redirect.github.com/agronholm/exceptiongroup/issues/99553">gh-99553</a> (custom subclasses of <code>BaseExceptionGroup</code> that also inherit from <code>Exception</code> should not be able to wrap base exceptions)</li> <li>Moved all initialization code to <code>__new__()</code> (thus matching Python 3.11 behavior)</li> </ul> <p><strong>1.0.4</strong></p> <ul> <li>Fixed regression introduced in v1.0.3 where the code computing the suggestions would assume that both the <code>obj</code> attribute of <code>AttributeError</code> is always available, even though this is only true from Python 3.10 onwards (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/43">#43</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.3</strong></p> <ul> <li>Fixed monkey patching breaking suggestions (on a <code>NameError</code> or <code>AttributeError</code>) on Python 3.10 (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/41">#41</a>; PR by Carl Friedrich Bolz-Tereick)</li> </ul> <p><strong>1.0.2</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/31d77ffefa298eb6ab73a97c8cde0c3d5a535983"><code>31d77ff</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/516ade166c0f33c6e5bcb0f57bebc58960d8dee8"><code>516ade1</code></a> Updated type annotations to match typeshed (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/77">#77</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/8b8791b662c0f62a574a09f305cd204dfb0a6a05"><code>8b8791b</code></a> Fixed bare <code>raise</code> and exception chaining when a handler raises an exception ...</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0c94abe0f86fd134990d2a59ad84714e0d3f24d6"><code>0c94abe</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/75">#75</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0878b8331a905f18b4d39b24b105b3e514ada65b"><code>0878b83</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/74">#74</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/fc578bcc6a05d9dbf129778c229f82b5b7bee8ea"><code>fc578bc</code></a> Switched to trusted publishing</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4640be7afa4822e5803f4e09c5201d6669b0d2f8"><code>4640be7</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/73">#73</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/14bf3ed050af2998d0667aa59db306c46e774a64"><code>14bf3ed</code></a> Fixed erroneous TypeError in test_async_handler()</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/c97103955556d859493a2f4750fb9dddf8a9c9b3"><code>c971039</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/72">#72</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/1d604fbe0f5f216bb7efa0ceb932745379e5a4f2"><code>1d604fb</code></a> Made catch() raise TypeError on async handler (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/69">#69</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.1.2...1.1.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.1.2&new-version=1.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
893: Bump exceptiongroup from 1.1.3 to 1.2.0 r=sanders41 a=dependabot[bot] Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.1.3 to 1.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/releases">exceptiongroup's releases</a>.</em></p> <blockquote> <h2>1.2.0</h2> <ul> <li>Added special monkeypatching if <a href="https://github.com/canonical/apport">Apport</a> has overridden <code>sys.excepthook</code> so it will format exception groups correctly (PR by John Litborn)</li> <li>Added a backport of <code>contextlib.suppress()</code> from Python 3.12.1 which also handles suppressing exceptions inside exception groups</li> <li>Fixed bare <code>raise</code> in a handler reraising the original naked exception rather than an exception group which is what is raised when you do a <code>raise</code> in an <code>except*</code> handler</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.2.0</strong></p> <ul> <li>Added special monkeypatching if <code>Apport <https://github.com/canonical/apport></code>_ has overridden <code>sys.excepthook</code> so it will format exception groups correctly (PR by John Litborn)</li> <li>Added a backport of <code>contextlib.suppress()</code> from Python 3.12.1 which also handles suppressing exceptions inside exception groups</li> <li>Fixed bare <code>raise</code> in a handler reraising the original naked exception rather than an exception group which is what is raised when you do a <code>raise</code> in an <code>except*</code> handler</li> </ul> <p><strong>1.1.3</strong></p> <ul> <li><code>catch()</code> now raises a <code>TypeError</code> if passed an async exception handler instead of just giving a <code>RuntimeWarning</code> about the coroutine never being awaited. (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/66">#66</a>, PR by John Litborn)</li> <li>Fixed plain <code>raise</code> statement in an exception handler callback to work like a <code>raise</code> in an <code>except*</code> block</li> <li>Fixed new exception group not being chained to the original exception when raising an exception group from exceptions raised in handler callbacks</li> <li>Fixed type annotations of the <code>derive()</code>, <code>subgroup()</code> and <code>split()</code> methods to match the ones in typeshed</li> </ul> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <ul> <li>Backported upstream fix for <a href="https://redirect.github.com/agronholm/exceptiongroup/issues/99553">gh-99553</a> (custom subclasses of <code>BaseExceptionGroup</code> that also inherit from <code>Exception</code> should not be able to wrap base exceptions)</li> <li>Moved all initialization code to <code>__new__()</code> (thus matching Python 3.11 behavior)</li> </ul> <p><strong>1.0.4</strong></p> <ul> <li>Fixed regression introduced in v1.0.3 where the code computing the suggestions would</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4e2df2190d3c61a2e7940d6908b32658dfadab3f"><code>4e2df21</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/f7c00cf9b45199935cc5f3730e9010d3b8123595"><code>f7c00cf</code></a> Backported <code>contextlib.suppress</code> from Python 3.12.1 (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/95">#95</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/1ede26fbb1d6924de09fc1528a9a29d3093fdad2"><code>1ede26f</code></a> Enabled pyupgrade ruff rules</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/767e62bbd77d1c71742f88ef7f3e28deedb7029c"><code>767e62b</code></a> Eliminated pyupgrade and black in favor of ruff/ruff-format</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/d0252696636e180af30488485d97aa231c6c9975"><code>d025269</code></a> Fixed bare <code>raise</code> in a handler not raising an exception group</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4357e114ab9acbe499d654a953f09ae0e1291dfb"><code>4357e11</code></a> Updated the checkout action to the latest version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/e29916759ef5d04fe8a2866739af3b406a986047"><code>e299167</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/94">#94</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4e4e87991f77cf5f0c9cf0c1d9aac804ebcf9b0c"><code>4e4e879</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/92">#92</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/27a296363bc4e527b3d7271c3cfd08e61130d311"><code>27a2963</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/90">#90</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/fae9d9a6ff0fb0467eb6492ad21f39b11a69f3e0"><code>fae9d9a</code></a> Monkeypatch Apport excepthook (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/88">#88</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.1.3...1.2.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.1.3&new-version=1.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.2.0 to 1.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/releases">exceptiongroup's releases</a>.</em></p> <blockquote> <h2>1.2.1</h2> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.2.1</strong></p> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> <p><strong>1.2.0</strong></p> <ul> <li>Added special monkeypatching if <code>Apport <https://github.com/canonical/apport></code>_ has overridden <code>sys.excepthook</code> so it will format exception groups correctly (PR by John Litborn)</li> <li>Added a backport of <code>contextlib.suppress()</code> from Python 3.12.1 which also handles suppressing exceptions inside exception groups</li> <li>Fixed bare <code>raise</code> in a handler reraising the original naked exception rather than an exception group which is what is raised when you do a <code>raise</code> in an <code>except*</code> handler</li> </ul> <p><strong>1.1.3</strong></p> <ul> <li><code>catch()</code> now raises a <code>TypeError</code> if passed an async exception handler instead of just giving a <code>RuntimeWarning</code> about the coroutine never being awaited. (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/66">#66</a>, PR by John Litborn)</li> <li>Fixed plain <code>raise</code> statement in an exception handler callback to work like a <code>raise</code> in an <code>except*</code> block</li> <li>Fixed new exception group not being chained to the original exception when raising an exception group from exceptions raised in handler callbacks</li> <li>Fixed type annotations of the <code>derive()</code>, <code>subgroup()</code> and <code>split()</code> methods to match the ones in typeshed</li> </ul> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/b91b7a34a0c688fe4bb06edcb2a0befffa21ca5f"><code>b91b7a3</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/521f02f7b1282ea3aaba20f450beb6d6283a5037"><code>521f02f</code></a> Fixed type errors, added type tests (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/118">#118</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4639b1e4cc3b6078d97280487790340ecd38e604"><code>4639b1e</code></a> Fixed test failure on Python 3.12.3</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/684b79a6f2211d39aea823db6e3c300e2a5157b0"><code>684b79a</code></a> Have tox install the package in editable mode</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/9ebe9f5b358ef1ced3d5914b3f170083acf76328"><code>9ebe9f5</code></a> Updated GitHub actions</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/e57b07fed419522020e75da6851076f511deb736"><code>e57b07f</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/115">#115</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/8d2f6273ffe94b0f805f001d20f8e4fadae0b58f"><code>8d2f627</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/113">#113</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/ee53e9fbab93406e1f4f546346a40421f86b47a6"><code>ee53e9f</code></a> BaseExceptionGroup.derive should not copy <strong>notes</strong> (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/112">#112</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/2f23259bdd968bb0a3aa3cf5a5c24a9449cd921e"><code>2f23259</code></a> Corrected the type annotation for the exception handler callback (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/109">#109</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0c89199f96974ddef5da6b4e65b0f33aa7c9a80c"><code>0c89199</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/110">#110</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.2.0...1.2.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.2.0&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
953: Bump exceptiongroup from 1.2.0 to 1.2.1 r=sanders41 a=dependabot[bot] Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.2.0 to 1.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/releases">exceptiongroup's releases</a>.</em></p> <blockquote> <h2>1.2.1</h2> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.2.1</strong></p> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> <p><strong>1.2.0</strong></p> <ul> <li>Added special monkeypatching if <code>Apport <https://github.com/canonical/apport></code>_ has overridden <code>sys.excepthook</code> so it will format exception groups correctly (PR by John Litborn)</li> <li>Added a backport of <code>contextlib.suppress()</code> from Python 3.12.1 which also handles suppressing exceptions inside exception groups</li> <li>Fixed bare <code>raise</code> in a handler reraising the original naked exception rather than an exception group which is what is raised when you do a <code>raise</code> in an <code>except*</code> handler</li> </ul> <p><strong>1.1.3</strong></p> <ul> <li><code>catch()</code> now raises a <code>TypeError</code> if passed an async exception handler instead of just giving a <code>RuntimeWarning</code> about the coroutine never being awaited. (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/66">#66</a>, PR by John Litborn)</li> <li>Fixed plain <code>raise</code> statement in an exception handler callback to work like a <code>raise</code> in an <code>except*</code> block</li> <li>Fixed new exception group not being chained to the original exception when raising an exception group from exceptions raised in handler callbacks</li> <li>Fixed type annotations of the <code>derive()</code>, <code>subgroup()</code> and <code>split()</code> methods to match the ones in typeshed</li> </ul> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/b91b7a34a0c688fe4bb06edcb2a0befffa21ca5f"><code>b91b7a3</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/521f02f7b1282ea3aaba20f450beb6d6283a5037"><code>521f02f</code></a> Fixed type errors, added type tests (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/118">#118</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4639b1e4cc3b6078d97280487790340ecd38e604"><code>4639b1e</code></a> Fixed test failure on Python 3.12.3</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/684b79a6f2211d39aea823db6e3c300e2a5157b0"><code>684b79a</code></a> Have tox install the package in editable mode</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/9ebe9f5b358ef1ced3d5914b3f170083acf76328"><code>9ebe9f5</code></a> Updated GitHub actions</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/e57b07fed419522020e75da6851076f511deb736"><code>e57b07f</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/115">#115</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/8d2f6273ffe94b0f805f001d20f8e4fadae0b58f"><code>8d2f627</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/113">#113</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/ee53e9fbab93406e1f4f546346a40421f86b47a6"><code>ee53e9f</code></a> BaseExceptionGroup.derive should not copy <strong>notes</strong> (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/112">#112</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/2f23259bdd968bb0a3aa3cf5a5c24a9449cd921e"><code>2f23259</code></a> Corrected the type annotation for the exception handler callback (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/109">#109</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0c89199f96974ddef5da6b4e65b0f33aa7c9a80c"><code>0c89199</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/110">#110</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.2.0...1.2.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.2.0&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [exceptiongroup](https://github.com/agronholm/exceptiongroup) from 1.2.0 to 1.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/releases">exceptiongroup's releases</a>.</em></p> <blockquote> <h2>1.2.1</h2> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst">exceptiongroup's changelog</a>.</em></p> <blockquote> <h1>Version history</h1> <p>This library adheres to <code>Semantic Versioning 2.0 <http://semver.org/></code>_.</p> <p><strong>1.2.1</strong></p> <ul> <li>Updated the copying of <code>__notes__</code> to match CPython behavior (PR by CF Bolz-Tereick)</li> <li>Corrected the type annotation of the exception handler callback to accept a <code>BaseExceptionGroup</code> instead of <code>BaseException</code></li> <li>Fixed type errors on Python < 3.10 and the type annotation of <code>suppress()</code> (PR by John Litborn)</li> </ul> <p><strong>1.2.0</strong></p> <ul> <li>Added special monkeypatching if <code>Apport <https://github.com/canonical/apport></code>_ has overridden <code>sys.excepthook</code> so it will format exception groups correctly (PR by John Litborn)</li> <li>Added a backport of <code>contextlib.suppress()</code> from Python 3.12.1 which also handles suppressing exceptions inside exception groups</li> <li>Fixed bare <code>raise</code> in a handler reraising the original naked exception rather than an exception group which is what is raised when you do a <code>raise</code> in an <code>except*</code> handler</li> </ul> <p><strong>1.1.3</strong></p> <ul> <li><code>catch()</code> now raises a <code>TypeError</code> if passed an async exception handler instead of just giving a <code>RuntimeWarning</code> about the coroutine never being awaited. (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/66">#66</a>, PR by John Litborn)</li> <li>Fixed plain <code>raise</code> statement in an exception handler callback to work like a <code>raise</code> in an <code>except*</code> block</li> <li>Fixed new exception group not being chained to the original exception when raising an exception group from exceptions raised in handler callbacks</li> <li>Fixed type annotations of the <code>derive()</code>, <code>subgroup()</code> and <code>split()</code> methods to match the ones in typeshed</li> </ul> <p><strong>1.1.2</strong></p> <ul> <li>Changed handling of exceptions in exception group handler callbacks to not wrap a single exception in an exception group, as per <code>CPython issue 103590 <https://github.com/python/cpython/issues/103590></code>_</li> </ul> <p><strong>1.1.1</strong></p> <ul> <li>Worked around <code>CPython issue [#98778](https://github.com/agronholm/exceptiongroup/issues/98778) <https://github.com/python/cpython/issues/98778></code>_, <code>urllib.error.HTTPError(..., fp=None)</code> raises <code>KeyError</code> on unknown attribute access, on affected Python versions. (PR by Zac Hatfield-Dodds)</li> </ul> <p><strong>1.1.0</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/agronholm/exceptiongroup/commit/b91b7a34a0c688fe4bb06edcb2a0befffa21ca5f"><code>b91b7a3</code></a> Added the release version</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/521f02f7b1282ea3aaba20f450beb6d6283a5037"><code>521f02f</code></a> Fixed type errors, added type tests (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/118">#118</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/4639b1e4cc3b6078d97280487790340ecd38e604"><code>4639b1e</code></a> Fixed test failure on Python 3.12.3</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/684b79a6f2211d39aea823db6e3c300e2a5157b0"><code>684b79a</code></a> Have tox install the package in editable mode</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/9ebe9f5b358ef1ced3d5914b3f170083acf76328"><code>9ebe9f5</code></a> Updated GitHub actions</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/e57b07fed419522020e75da6851076f511deb736"><code>e57b07f</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/115">#115</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/8d2f6273ffe94b0f805f001d20f8e4fadae0b58f"><code>8d2f627</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/113">#113</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/ee53e9fbab93406e1f4f546346a40421f86b47a6"><code>ee53e9f</code></a> BaseExceptionGroup.derive should not copy <strong>notes</strong> (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/112">#112</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/2f23259bdd968bb0a3aa3cf5a5c24a9449cd921e"><code>2f23259</code></a> Corrected the type annotation for the exception handler callback (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/109">#109</a>)</li> <li><a href="https://github.com/agronholm/exceptiongroup/commit/0c89199f96974ddef5da6b4e65b0f33aa7c9a80c"><code>0c89199</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/agronholm/exceptiongroup/issues/110">#110</a>)</li> <li>Additional commits viewable in <a href="https://github.com/agronholm/exceptiongroup/compare/1.2.0...1.2.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=exceptiongroup&package-manager=pip&previous-version=1.2.0&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bug report
The exception
urllib.error.HTTPError(..., fp=None)
raises aKeyError
instead of anAttributeError
when accessing an attribute that does not exist.Your environment
This bug should be reproducible for all python3 versions on all systems.
Context
I found this error while running a code similar to this:
Instead of having the exception logged, I ended up with the following trace:
Note however that the exception is logged properly on python 3.9 (without the
exceptiongroup
module imported). So maybe the following patch should be applied on top ofHTTPError
being fixed in order to make tracebacks more robust:Linked PRs
The text was updated successfully, but these errors were encountered: