Skip to content

Commit

Permalink
use beta uvloop for 3.13 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
pkucmus committed Oct 13, 2024
1 parent 2cd6756 commit 4b6394b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ dependencies = [
"pytest-cov",
"coverage[toml]",
"httpx",
"uvloop",
# uvloop 0.20.0 is broken on Python 3.13
# https://github.com/MagicStack/uvloop/issues/622
# waiting for 0.21.0 release
"uvloop==0.21.0b1",
]

[[tool.hatch.envs.hatch-test.matrix]]
Expand All @@ -114,8 +117,6 @@ deploy = "mkdocs gh-deploy --force"
## Pytest configuration

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

## Coverage configuration

Expand Down
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

@pytest.fixture(autouse=True)
def anyio_backend():
# uvloop is not available for Python 3.13
# https://github.com/MagicStack/uvloop/issues/622
# waiting for 0.21.0 release
# import sys
# if sys.version_info < (3, 13):
# return "asyncio"
return "asyncio", {"use_uvloop": True}


Expand Down

0 comments on commit 4b6394b

Please sign in to comment.