diff options
author | 2024-03-04 16:27:02 +0000 | |
---|---|---|
committer | 2024-03-18 10:32:20 +0000 | |
commit | 070255c39c908c961d47c3b72aa63061a1626913 (patch) | |
tree | d304e7f8131fc4fe25646f147e85134ba0ec06c8 | |
parent | Add support for Python 3.12 (diff) |
Drop support for Python 3.10
-rw-r--r-- | .github/workflows/lint-test.yaml | 2 | ||||
-rw-r--r-- | docs/changelog.rst | 1 | ||||
-rw-r--r-- | poetry.lock | 23 | ||||
-rw-r--r-- | pydis_core/utils/cooldown.py | 4 | ||||
-rw-r--r-- | pyproject.toml | 4 |
5 files changed, 7 insertions, 27 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 4aab48d5..414bfb03 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: ["3.10", "3.11", "3.12"] + python_version: ["3.11", "3.12"] name: Run Linting & Test Suites runs-on: ubuntu-latest diff --git a/docs/changelog.rst b/docs/changelog.rst index 673824d8..505d6251 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,7 @@ Changelog - :breaking:`208` Split ``fakeredis`` optional dependency from the ``async-rediscache`` extra. You can now install with ``[fakeredis]`` to just install fakeredis (with lua support), ``[async-rediscache]`` to install just ``async-rediscache``, or use either ``[all]`` or ``[async-rediscache,fakeredis]`` to install both. This allows users who do no rely on fakeredis to install in 3.12 environments. - :support:`208` Add support for Python 3.12. Be aware, at time of writing, our usage of fakeredis does not currently support 3.12. This is due to :literal-url:`this lupa issue<https://github.com/scoder/lupa/issues/245>`. Lupa is required by async-rediscache for lua script support within fakeredis. As such, fakeredis can not be installed in a Python 3.12 environment. +- :breaking:`208` Drop support for Python 3.10 - :breaking:`208` Drop support for Pydantic 1.X - :breaking:`207` Enable more ruff linting rules. See :literal-url:`GitHub release notes <https://github.com/python-discord/bot-core/releases/tag/v11.0.0>` for breaking changes. - :support:`206` Bump ruff from 0.1.15 to 0.2.2, using the new lint config namespace, and linting with the new rules. diff --git a/poetry.lock b/poetry.lock index e48a37ba..b5263c6b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -101,7 +101,6 @@ files = [ [package.dependencies] aiosignal = ">=1.1.2" -async-timeout = {version = ">=4.0,<5.0", markers = "python_version < \"3.11\""} attrs = ">=17.3.0" frozenlist = ">=1.1.1" multidict = ">=4.5,<7.0" @@ -167,7 +166,7 @@ fakeredis = ["fakeredis[lua] (>=1.7.1)"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -optional = false +optional = true python-versions = ">=3.7" files = [ {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, @@ -545,20 +544,6 @@ files = [ ] [[package]] -name = "exceptiongroup" -version = "1.2.0" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, -] - -[package.extras] -test = ["pytest (>=6)"] - -[[package]] name = "execnet" version = "2.0.2" description = "execnet: rapid multi-Python deployment" @@ -1394,11 +1379,9 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.4,<2.0" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -2051,5 +2034,5 @@ fakeredis = ["fakeredis"] [metadata] lock-version = "2.0" -python-versions = "3.10.* || 3.11.*" -content-hash = "088f8fb148adf7b38413f7888329059ad8f8f6a99d973d22506b86328678c54d" +python-versions = "3.11.* || 3.12.*" +content-hash = "928dd7398412401c9cda11bd485ed0e54583e2c021b5a69895aa5a15be334b41" diff --git a/pydis_core/utils/cooldown.py b/pydis_core/utils/cooldown.py index 90711c93..91b9c5f3 100644 --- a/pydis_core/utils/cooldown.py +++ b/pydis_core/utils/cooldown.py @@ -25,8 +25,6 @@ _ArgsList = list[object] _HashableArgsTuple = tuple[Hashable, ...] if typing.TYPE_CHECKING: - import typing_extensions - from pydis_core import BotBase P = typing.ParamSpec("P") @@ -75,7 +73,7 @@ class _SeparatedArguments: non_hashable: _ArgsList @classmethod - def from_full_arguments(cls, call_arguments: Iterable[object]) -> typing_extensions.Self: + def from_full_arguments(cls, call_arguments: Iterable[object]) -> typing.Self: """Create a new instance from full call arguments.""" hashable = list[Hashable]() non_hashable = list[object]() diff --git a/pyproject.toml b/pyproject.toml index 4e08fe62..23f70e2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ repository = "https://github.com/python-discord/bot-core" keywords = ["bot", "discord", "discord.py"] [tool.poetry.dependencies] -python = "3.10.* || 3.11.* || 3.12.*" +python = "3.11.* || 3.12.*" "discord.py" = "~=2.3.2" async-rediscache = { version = "1.0.0rc2", optional = true } @@ -49,7 +49,6 @@ pytest-xdist = "3.5.0" [tool.poetry.group.lint.dependencies] ruff = "0.3.0" pre-commit = "3.6.2" -typing-extensions = "4.10.0" [tool.poetry.group.doc.dependencies] Sphinx = "7.2.6" @@ -60,7 +59,6 @@ six = "1.16.0" releases = "2.1.1" sphinx-multiversion = "0.2.4" docstring-parser = "0.15" -typing-extensions = "4.10.0" tomli = "2.0.1" [tool.taskipy.tasks] |