From f2ec3ba62eeb40f6ebdbae1b40df7bbb493f435c Mon Sep 17 00:00:00 2001 From: circuitsacul Date: Thu, 10 Oct 2024 21:15:49 -0400 Subject: [PATCH] fix: support for hikari v2 (#72) --- .github/workflows/ci.yml | 26 +++++++++++++------------- .github/workflows/pypi.yml | 2 +- hikari_clusters/task_manager.py | 4 ++-- pyproject.toml | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2433385..ef95bcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,19 +8,19 @@ jobs: runs-on: ${{ matrix.os }}-latest strategy: matrix: - python-version: [ '3.8', '3.9', '3.10' ] - os: [ ubuntu, windows ] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + os: [ubuntu, windows] name: ${{ matrix.python-version }} ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install Nox - run: pip install nox - - name: Run Nox - run: nox - - name: Upload to CodeCov - uses: codecov/codecov-action@v2 + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Nox + run: pip install nox + - name: Run Nox + run: nox + - name: Upload to CodeCov + uses: codecov/codecov-action@v2 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d025ed6..eea4323 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: "3.9" - name: Install Dependencies run: pip install poetry - name: Build & Upload diff --git a/hikari_clusters/task_manager.py b/hikari_clusters/task_manager.py index 27bf3eb..d994cf3 100644 --- a/hikari_clusters/task_manager.py +++ b/hikari_clusters/task_manager.py @@ -3,7 +3,7 @@ import asyncio import logging import traceback -from typing import Any, Coroutine, Generator, Iterable, Type, TypeVar +from typing import Any, Iterable, Type, TypeVar __all__ = ("TaskManager",) @@ -39,7 +39,7 @@ def next_tid(self) -> int: def create_task( self, - coro: Generator[Any, None, _T] | Coroutine[Any, None, _T], + coro: asyncio._CoroutineLike[_T], *, name: str | None = None, ignored_exceptions: Iterable[Type[Exception]] = tuple(), diff --git a/pyproject.toml b/pyproject.toml index fa4ca27..c8025aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] -line-length=79 -skip-magic-trailing-comma=true +line-length = 79 +skip-magic-trailing-comma = true [tool.poetry] name = "hikari-clusters" @@ -15,8 +15,8 @@ documentation = "https://github.com/TrigonDev/hikari-clusters/wiki" keywords = ["hikari", "discord", "clustering", "bot", "ipc"] [tool.poetry.dependencies] -python = ">=3.8.0,<3.12" -hikari = "^2.0.0.dev105" +python = ">=3.9,<3.14" +hikari = "^2.0.0" websockets = "^11.0" pytest-cov = ">=3,<5"