-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add anyio 4.x support * Update pyproject.toml
- Loading branch information
1 parent
6fbc908
commit 358976e
Showing
6 changed files
with
53 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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,4 @@ | ||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
pragma: nopy37 |
This file contains 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 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 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
-e . | ||
|
||
# Compatibility testing. | ||
anyio~=3.2; python_version<'3.11' | ||
|
||
# Packaging. | ||
twine | ||
wheel | ||
|
This file contains 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,19 @@ | ||
import sys | ||
from contextlib import contextmanager | ||
from typing import Generator | ||
|
||
if sys.version_info < (3, 11): # pragma: no cover | ||
from exceptiongroup import BaseExceptionGroup | ||
|
||
|
||
@contextmanager | ||
def collapse_excgroups() -> Generator[None, None, None]: | ||
try: | ||
yield | ||
except BaseException as exc: | ||
while ( | ||
isinstance(exc, BaseExceptionGroup) and len(exc.exceptions) == 1 | ||
): # pragma: nopy37 | ||
exc = exc.exceptions[0] | ||
|
||
raise exc |
This file contains 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