-
-
Notifications
You must be signed in to change notification settings - Fork 357
Replace MultiError with BaseExceptionGroup #2213
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
31706e8
Add news fragment for #2210
agronholm 743354b
Replace MultiError with (Base)ExceptionGroup
agronholm 6fdd0fe
Collapse exception groups containing a single exception
agronholm 13de11d
Require exceptiongroup unconditionally for tests
agronholm 9ecca9b
Added exceptiongroup to docs requirements
agronholm 21757c8
Fixed dangling references in the documentation
agronholm 61a1646
Removed obsolete check
agronholm ca05efb
Removed one last MultiError reference in docs
agronholm 0b159e8
Found one more MultiError, in a news fragment
agronholm e9aaabc
Added a test for exception group collapsing
agronholm 83e054c
Merge branch 'master' into exceptiongroup
pquentin 370e40f
Merge branch 'master' into exceptiongroup
agronholm e2fbec0
Updated an example to refer to BaseExceptionGroup
agronholm 95a7b9e
Improved the docs regarding exception groups
agronholm 745f3cf
Added Python 3.11 to the CI matrix
agronholm bc043aa
Attempt at fixing Python 3.11 test runs
agronholm 797c234
Removed Windows and macOS py3.11 test jobs
agronholm 8a09778
Skip test_coroutine_or_error() on Python 3.11
agronholm c1200de
Merge branch 'master' into exceptiongroup
agronholm 30358d1
Changed case to be consistent in BEG messages
agronholm 54eb0ce
Restored (and deprecated) MultiError
agronholm f1cbcf7
Removed unwarranted type annotations
agronholm 0f5dc79
Removed useless failing test
agronholm 36e0eba
Removed unused function
agronholm 20df5d8
Update docs/source/reference-core.rst
agronholm 6eeb137
Merge branch 'master' into exceptiongroup
agronholm 2dc1c64
Update newsfragments/2211.deprecated.rst
agronholm e7faa46
Update docs/source/tutorial/echo-server.py
agronholm c41517a
Update trio/_highlevel_open_tcp_stream.py
agronholm 50963c6
Don't skip the entire test_coroutine_or_error test on py3.11
agronholm ba17fbb
Removed weird test code
agronholm 8911e0a
Update newsfragments/2211.deprecated.rst
agronholm dfd084c
Bump prompt-toolkit from 3.0.26 to 3.0.27
dependabot[bot] b3c79c8
Bump tomli from 2.0.0 to 2.0.1
dependabot[bot] 81feff2
Bump platformdirs from 2.4.1 to 2.5.0
dependabot[bot] bcb442b
Bump towncrier from 21.3.0 to 21.9.0
dependabot[bot] ab78e02
Bump prompt-toolkit from 3.0.27 to 3.0.28
dependabot[bot] 9abddfa
Bump markupsafe from 2.0.1 to 2.1.0
dependabot[bot] efc8b01
Bump click from 8.0.3 to 8.0.4
dependabot[bot] 9a4f512
Bump platformdirs from 2.5.0 to 2.5.1
dependabot[bot] 6cb5ad9
Merged test requirements
agronholm ee245a0
Bump pytest from 7.0.0 to 7.0.1
dependabot[bot] 1e36f8c
Tickle sr.ht CI
pquentin 034bd32
Merge two competing newsfragments
pquentin 80a751f
Bump charset-normalizer from 2.0.11 to 2.0.12
dependabot[bot] 9eb2d1c
Tickle sr.ht CI
pquentin fd56492
Bump version to 0.20.0
pquentin af6233b
Bump version to 0.20.0+dev
pquentin a4876bc
Renamed the news fragment
agronholm 5c09f44
Updated wrapt in test requirements
agronholm c5af0a4
Changed wrapt target git hash so it's compatible with astroid
agronholm 93c81f0
Merge branch 'master' into exceptiongroup
agronholm b4791f8
Fixed error in test_coroutine_or_error() on py3.11
agronholm 70bb109
Updated dependencies
agronholm 1c403b1
Move Python 3.11 to its separate test job
agronholm a28bfac
Fixed bad pytest switch
agronholm 7694592
Implemented the strict_exception_groups setting
agronholm 161c0ab
Implemented NonBaseMultiError which inherits from both MultiError and…
agronholm 226184f
Fixed MultiError reference in version history
agronholm 748ceb8
Removed Python 3.11 from test matrix
agronholm dfdda5b
Documented the MultiError compatibility issue
agronholm d49abbb
Merge branch 'master' into exceptiongroup
agronholm a877191
Merge branch 'master' into exceptiongroup
agronholm e8a1b60
Documentation updates
agronholm 4bd09bc
Changed open_tcp_listeners() and open_tcp_stream() to use ExceptionGr…
agronholm 1101ead
Expose NonBaseMultiError in trio (as a deprecated attribute)
agronholm cd11213
Changed wording in MultiError deprecation messages
agronholm 7088be4
Added missing install dependency on exceptiongroup
agronholm 5bc2bd9
Merge branch 'master' into exceptiongroup
agronholm e87de6c
Updated trio version in deprecation notes
agronholm 6b5e4f6
Fixed formatting error
agronholm 9ff7a45
Use trio's own deprecation mechanism
agronholm 2140b70
Added comment on _collapse=False in derive()
agronholm 1da1af4
Only modify MultiErrors in collapse_exception_group()
agronholm f9e11fc
Retain traceback frames from the MultiError itself
agronholm 1d99b23
Improved prevention of MultiError double initialization
agronholm 2591808
Reworded the comments in the exception group handling examples
agronholm afd798f
Merge branch 'master' into exceptiongroup
agronholm 8c77459
Made all references to (Base)ExceptionGroup into links
agronholm b621e70
Improved the documentation for exception group handling
agronholm 656fad4
Fixed test collection error on Python 3.11
agronholm 6e86da3
Readded the exceptiongroups label
agronholm e29c00f
Merge branch 'master' into exceptiongroup
agronholm 16c19b6
Spelled out MultiError.filter() and MultiError.catch()
agronholm c35fccc
Fixed the instead= part in the deprecation warning
agronholm 7b7acb9
Replaced warn() with warn_deprecated()
agronholm 3b97ce1
Merge branch 'master' into exceptiongroup
agronholm 1075ff0
Fixed the check for StopAsyncIteration
agronholm 458f5e2
Fixed comment in _nested_child_finished()
agronholm 0f39b3f
Fixed deprecation checking in MultiError.catch() tests
agronholm dc35213
Reversed the order of tracebacks when concatenating
agronholm f9eff8e
Restored the IPython custom error handler
agronholm 30b8f3b
Added link to specific IPython issue
agronholm 232688b
Updated wording about extracting submodules to independent packages
agronholm 0b8e908
If present, patch Apport to support exception groups
agronholm 878af56
Added test coverage for collapse_exception_group()
agronholm cc7d76a
Changed cancel scopes to not collapse exceptions by default
agronholm a20e2d8
Extended test coverage
agronholm 1aba33e
Fixed the apport script test
agronholm 0c283b7
Fixed MultiError.collapse attribute missing on Python 3.11
agronholm 0364b48
Added test coverage for cancel scope encountering an excgroup w/o Can…
agronholm bb31ed6
Removed an except block that was never entered
agronholm 2fd8309
Fixed excepthook wrapper name
agronholm 80889b2
Removed unused parameter
agronholm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
trio/_core/tests/test_multierror_scripts/apport_excepthook.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# The apport_python_hook package is only installed as part of Ubuntu's system | ||
# python, and not available in venvs. So before we can import it we have to | ||
# make sure it's on sys.path. | ||
import sys | ||
|
||
sys.path.append("/usr/lib/python3/dist-packages") | ||
import apport_python_hook | ||
|
||
apport_python_hook.install() | ||
|
||
import trio | ||
|
||
raise trio.MultiError([KeyError("key_error"), ValueError("value_error")]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.