From 88a82b6411e149904014e9a931fac292c816f33d Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Sun, 29 Sep 2024 18:31:46 +0200 Subject: [PATCH 1/7] Bump hikari to stable, match Python version support --- pyproject.toml | 4 ++-- requirements.txt | 2 +- setup.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dad8b0c..dd968cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 120 -target-version = ["py38"] +target-version = ["py39"] include = ".*py$" [tool.isort] @@ -17,7 +17,7 @@ namespace_packages = true no_implicit_optional = true implicit_reexport = true pretty = true -python_version = 3.8 +python_version = 3.9 show_column_numbers = true show_error_codes = true show_error_context = true diff --git a/requirements.txt b/requirements.txt index f709f1e..0ac6a4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -hikari>=2.0.0.dev122 +hikari>=2.0.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 3563fe1..6f1744f 100644 --- a/setup.py +++ b/setup.py @@ -55,18 +55,18 @@ def parse_requirements_file(path): ':sys_platform=="win32"': ["colorama"], "docs": parse_requirements_file("doc_requirements.txt"), }, - python_requires=">=3.8.0,<3.13", + python_requires=">=3.9.0,<3.14", classifiers=[ "Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Intended Audience :: Developers", "Natural Language :: English", "Topic :: Software Development :: Libraries :: Python Modules", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries", From 4a9e2c153352081553fba9d49a6418b74554e9fb Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Sun, 29 Sep 2024 18:32:36 +0200 Subject: [PATCH 2/7] Fix tests & pipelines --- doc_requirements.txt | 4 ++-- tests/utils.py | 1 + toolbox/commands.py | 18 ++++++------------ toolbox/strings.py | 3 ++- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/doc_requirements.txt b/doc_requirements.txt index 737c20e..bbe174e 100644 --- a/doc_requirements.txt +++ b/doc_requirements.txt @@ -1,2 +1,2 @@ -furo~=2022.1.2 -sphinx==4.4.0 \ No newline at end of file +furo==2024.04.27 +sphinx==7.4.7 \ No newline at end of file diff --git a/tests/utils.py b/tests/utils.py index 864bd63..14ba77c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -55,6 +55,7 @@ def make_member(roles: list[hikari.Role] = None): role_ids=[role.id for role in roles], user=None, guild_avatar_hash=None, + guild_flags=None, ) GLOBAL_ROLES[id(member)] = roles diff --git a/toolbox/commands.py b/toolbox/commands.py index 27bb4d5..df05c54 100644 --- a/toolbox/commands.py +++ b/toolbox/commands.py @@ -26,33 +26,27 @@ def _list_to_command_choices( @t.overload -def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... def as_command_choices(*args: t.Any, **kwargs: t.Any) -> t.Sequence[hikari.CommandChoice]: diff --git a/toolbox/strings.py b/toolbox/strings.py index 2e80ade..b417e5d 100644 --- a/toolbox/strings.py +++ b/toolbox/strings.py @@ -1,7 +1,8 @@ import datetime import re import typing as t -from enum import Enum, IntFlag +from enum import Enum +from enum import IntFlag __all__: t.Sequence[str] = ( "format_dt", From 97f736a9d3c0182aa0cacbd43352cdaaec5cd032 Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Sun, 29 Sep 2024 18:38:19 +0200 Subject: [PATCH 3/7] Add newline at end of requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0ac6a4d..f9e95f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -hikari>=2.0.0 \ No newline at end of file +hikari>=2.0.0 From f4163a071440ae444623955ca1af45c9feb2e085 Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Wed, 2 Oct 2024 22:44:23 +0200 Subject: [PATCH 4/7] revert formatting changes --- toolbox/commands.py | 18 ++++++++++++------ toolbox/strings.py | 3 +-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/toolbox/commands.py b/toolbox/commands.py index df05c54..27bb4d5 100644 --- a/toolbox/commands.py +++ b/toolbox/commands.py @@ -26,27 +26,33 @@ def _list_to_command_choices( @t.overload -def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: + ... @t.overload -def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: + ... @t.overload -def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: + ... @t.overload -def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: + ... @t.overload -def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: + ... @t.overload -def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... +def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: + ... def as_command_choices(*args: t.Any, **kwargs: t.Any) -> t.Sequence[hikari.CommandChoice]: diff --git a/toolbox/strings.py b/toolbox/strings.py index b417e5d..2e80ade 100644 --- a/toolbox/strings.py +++ b/toolbox/strings.py @@ -1,8 +1,7 @@ import datetime import re import typing as t -from enum import Enum -from enum import IntFlag +from enum import Enum, IntFlag __all__: t.Sequence[str] = ( "format_dt", From 0bca31ac680086d043a078f0ae8ad2c5275bd7b9 Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Wed, 2 Oct 2024 22:47:28 +0200 Subject: [PATCH 5/7] update pytest Python versions --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1f5ce71..1a74878 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -5,7 +5,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] os: [ ubuntu-latest ] fail-fast: false From a14000dc27054384c04537c40d19c2c06770343c Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Mon, 7 Oct 2024 20:55:26 +0200 Subject: [PATCH 6/7] bump pytest action versions --- .github/workflows/pytest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1a74878..d331850 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -11,12 +11,12 @@ jobs: name: ${{ matrix.python-version }} ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - architecture: 'x64' + architecture: x64 - name: pytest via nox run: | python -m pip install nox From f505f7fc4d944be4d04abf235a7e0321ae94f4cf Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Mon, 7 Oct 2024 21:11:24 +0200 Subject: [PATCH 7/7] re-apply the nox formatter changes --- toolbox/commands.py | 18 ++++++------------ toolbox/strings.py | 3 ++- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/toolbox/commands.py b/toolbox/commands.py index 27bb4d5..df05c54 100644 --- a/toolbox/commands.py +++ b/toolbox/commands.py @@ -26,33 +26,27 @@ def _list_to_command_choices( @t.overload -def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Sequence[t.Sequence[ChoiceTypes]]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(choices: t.Dict[str, ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(*args: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(*args: t.Sequence[ChoiceTypes]) -> t.Sequence[hikari.CommandChoice]: ... @t.overload -def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: - ... +def as_command_choices(**kwargs: ChoiceTypes) -> t.Sequence[hikari.CommandChoice]: ... def as_command_choices(*args: t.Any, **kwargs: t.Any) -> t.Sequence[hikari.CommandChoice]: diff --git a/toolbox/strings.py b/toolbox/strings.py index 2e80ade..b417e5d 100644 --- a/toolbox/strings.py +++ b/toolbox/strings.py @@ -1,7 +1,8 @@ import datetime import re import typing as t -from enum import Enum, IntFlag +from enum import Enum +from enum import IntFlag __all__: t.Sequence[str] = ( "format_dt",