Skip to content

Commit

Permalink
fix: use asyncio instead of async_timeout for python 3.11+
Browse files Browse the repository at this point in the history
  • Loading branch information
lumina37 committed Nov 3, 2023
1 parent ad9f80d commit e386ad6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-* pp38-* pp39-* pp310-*"
CIBW_SKIP: "*-win32 *_i686 *_s390x *_ppc64le"

- uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion aiotieba/helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from types import FrameType
from typing import Any, Callable

import async_timeout
if sys.version_info >= (3, 11):
import asyncio as async_timeout
else:
import async_timeout

from ..exception import exc_handlers
from ..logging import get_logger
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ lint = ["ruff", "black"]
test = ["aiotieba[speedup]", "pytest", "pytest-asyncio", "pytest-rerunfailures"]
doc = ["mkdocs-material", "mkdocstrings[python]"]

[tool.cibuildwheel]
build = "cp38-* cp39-* cp310-* cp311-* cp312-* pp38-* pp39-* pp310-*"
skip = "*-win32 *_i686 *_s390x *_ppc64le"

[tool.black]
line-length = 120
skip-string-normalization = true
Expand Down

0 comments on commit e386ad6

Please sign in to comment.