Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e4a3173
:sparkles: Update to use python 3.14
Paillat-dev Apr 17, 2025
4e4fc1b
Merge branch 'master' into feat/python-3.14
Paillat-dev Oct 9, 2025
db16e25
:rewind: Revert .readthedocs.yml python version bump
Paillat-dev Oct 9, 2025
0013089
:memo: CHANGELOG.md
Paillat-dev Oct 9, 2025
fbcf60d
Merge branch 'master' into feat/python-3.14
Lulalaby Oct 21, 2025
f935c8a
Merge branch 'master' into feat/python-3.14
Lulalaby Oct 22, 2025
c158bb2
chore: fix changelog position
Lulalaby Oct 22, 2025
93c0fcf
Merge branch 'master' into feat/python-3.14
Lulalaby Nov 1, 2025
820e5fd
fix: missing changes
Lulalaby Nov 1, 2025
7b5aad0
fix(actions): Stick to 3.13 for docs for now until rtd support 3.14
Lulalaby Nov 1, 2025
8864a6e
Merge branch 'master' into feat/python-3.14
Paillat-dev Mar 18, 2026
4dacf6f
chore: Docs should support 3.14 by now
Paillat-dev Mar 18, 2026
c73d4ce
fix: Update event loop retrieval to support Python 3.14+
Paillat-dev Mar 27, 2026
6d494fd
Merge branch 'master' into fix/add-3.14-support
Paillat-dev Mar 27, 2026
ccdac7b
Merge branch 'master' into feat/python-3.14
Paillat-dev Mar 27, 2026
c5b25c0
Merge branch 'fix/add-3.14-support' into feat/python-3.14
Paillat-dev Mar 27, 2026
b918f97
chore: Run pyupgrade --py310-plus on codebase
Paillat-dev Mar 27, 2026
759e112
Merge branch 'master' into cleanup/39-removal-314-prepare
Paillat-dev May 22, 2026
5137ff1
chore: Re-run pyupgrade
Paillat-dev May 22, 2026
af14194
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2026
b612d4a
fix: Remove duplicate changelog
Paillat-dev May 22, 2026
6cc6c67
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2026
59df49b
Merge branch 'master' into cleanup/39-removal-314-prepare
Paillat-dev Jun 7, 2026
0407963
Merge branch 'master' into cleanup/39-removal-314-prepare
Paillat-dev Jun 8, 2026
229267f
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 8, 2026
25dce39
fix: Weird import
Paillat-dev Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions discord/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import platform
import sys
from pathlib import Path
from typing import Tuple

import aiohttp

Expand Down Expand Up @@ -352,7 +351,7 @@ def add_newcog_args(subparser: argparse._SubParsersAction) -> None:
)


def parse_args() -> Tuple[argparse.ArgumentParser, argparse.Namespace]:
def parse_args() -> tuple[argparse.ArgumentParser, argparse.Namespace]:
parser = argparse.ArgumentParser(
prog="discord", description="Tools for helping with Pycord"
)
Expand Down
4 changes: 1 addition & 3 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
import asyncio
import copy
import time
from collections.abc import Callable, Iterable, Sequence
from typing import (
TYPE_CHECKING,
Any,
Callable,
Iterable,
Protocol,
Sequence,
TypeAlias,
TypeVar,
Union,
Expand Down
3 changes: 2 additions & 1 deletion discord/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
from __future__ import annotations

import datetime
from collections.abc import Callable, Generator
from functools import cached_property
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generator, TypeVar
from typing import TYPE_CHECKING, Any, ClassVar, TypeVar

from . import enums, utils
from .asset import Asset
Expand Down
3 changes: 2 additions & 1 deletion discord/backoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

import random
import time
from typing import Callable, Generic, Literal, TypeVar, overload
from collections.abc import Callable
from typing import Generic, Literal, TypeVar, overload

T = TypeVar("T", bool, Literal[True], Literal[False])

Expand Down
5 changes: 1 addition & 4 deletions discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@
import sys
import traceback
from abc import ABC, abstractmethod
from collections.abc import Callable, Coroutine, Generator, Mapping
from typing import (
TYPE_CHECKING,
Any,
Callable,
Coroutine,
Generator,
Literal,
Mapping,
TypeVar,
)

Expand Down
5 changes: 1 addition & 4 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@
from __future__ import annotations

import datetime
from collections.abc import Callable, Iterable, Mapping, Sequence
from typing import (
TYPE_CHECKING,
Any,
Callable,
Iterable,
Mapping,
NamedTuple,
Sequence,
TypeVar,
overload,
)
Expand Down
5 changes: 1 addition & 4 deletions discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@
import signal
import sys
import traceback
from collections.abc import Callable, Coroutine, Generator, Sequence
from types import TracebackType
from typing import (
TYPE_CHECKING,
Any,
Callable,
Coroutine,
Generator,
Sequence,
TypeVar,
)

Expand Down
6 changes: 2 additions & 4 deletions discord/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@
import pathlib
import sys
import types
from collections.abc import Generator, Mapping
from collections.abc import Callable, Generator, Mapping
from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
TypeGuard,
TypeVar,
overload,
)

from typing_extensions import TypeGuard

import discord.utils

from . import errors
Expand Down
2 changes: 1 addition & 1 deletion discord/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from discord.webhook.async_ import Webhook

if TYPE_CHECKING:
from typing import Awaitable, Callable
from collections.abc import Awaitable, Callable

from typing_extensions import ParamSpec

Expand Down
20 changes: 10 additions & 10 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,24 @@
import functools
import inspect
import re
import sys
import types
from collections import OrderedDict
from collections.abc import Callable, Coroutine, Generator
from enum import Enum
from typing import (
TYPE_CHECKING,
Annotated,
Any,
Callable,
Coroutine,
Generator,
Generic,
Literal,
TypeVar,
Union,
get_args,
get_origin,
)

from typing_extensions import Self

from ..channel import PartialMessageable, _threaded_guild_channel_factory
from ..enums import Enum as DiscordEnum
from ..enums import (
Expand All @@ -69,11 +72,6 @@
from .context import ApplicationContext, AutocompleteContext
from .options import Option, OptionChoice

if sys.version_info >= (3, 11):
from typing import Annotated, Literal, Self, get_args, get_origin
else:
from typing_extensions import Annotated, Literal, Self, get_args, get_origin

__all__ = (
"_BaseCommand",
"ApplicationCommand",
Expand All @@ -90,7 +88,9 @@
)

if TYPE_CHECKING:
from typing_extensions import Concatenate, Never, ParamSpec
from typing import Concatenate

from typing_extensions import Never, ParamSpec

from .. import Permissions
from ..bot import C
Expand Down
29 changes: 14 additions & 15 deletions discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
Any,
Literal,
Optional,
Type,
TypeVar,
Union,
get_args,
Expand Down Expand Up @@ -72,22 +71,22 @@
from ..user import User

InputType = Union[
Type[str],
Type[bool],
Type[int],
Type[float],
Type[GuildChannel],
Type[Thread],
Type[Member],
Type[User],
Type[Attachment],
Type[Role],
Type[Mentionable],
type[str],
type[bool],
type[int],
type[float],
type[GuildChannel],
type[Thread],
type[Member],
type[User],
type[Attachment],
type[Role],
type[Mentionable],
SlashCommandOptionType,
Converter,
Type[Converter],
Type[Enum],
Type[DiscordEnum],
type[Converter],
type[Enum],
type[DiscordEnum],
]

AutocompleteReturnType = Union[
Expand Down
2 changes: 1 addition & 1 deletion discord/commands/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
DEALINGS IN THE SOFTWARE.
"""

from typing import Callable
from collections.abc import Callable

from ..enums import InteractionContextType
from ..permissions import Permissions
Expand Down
3 changes: 2 additions & 1 deletion discord/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, ClassVar, Iterator, TypeVar, overload
from collections.abc import Iterator
from typing import TYPE_CHECKING, Any, ClassVar, TypeVar, overload

from .asset import AssetMixin
from .colour import Colour
Expand Down
3 changes: 2 additions & 1 deletion discord/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from __future__ import annotations

import datetime
from typing import TYPE_CHECKING, Any, Mapping, TypeVar
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar

from . import utils
from .colour import Colour
Expand Down
3 changes: 2 additions & 1 deletion discord/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Iterator, Literal
from collections.abc import Iterator
from typing import TYPE_CHECKING, Any, Literal

from .asset import Asset, AssetMixin
from .partial_emoji import PartialEmoji, _EmojiTag
Expand Down
4 changes: 2 additions & 2 deletions discord/ext/bridge/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
from __future__ import annotations

import inspect
from collections.abc import Iterator
from typing import TYPE_CHECKING, Any, Callable
from collections.abc import Callable, Iterator
from typing import TYPE_CHECKING, Any

import discord.commands.options
from discord import (
Expand Down
3 changes: 2 additions & 1 deletion discord/ext/commands/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
DEALINGS IN THE SOFTWARE.
"""

from typing import TYPE_CHECKING, Any, Callable, Coroutine, TypeVar, Union
from collections.abc import Callable, Coroutine
from typing import TYPE_CHECKING, Any, TypeVar, Union

if TYPE_CHECKING:
from .cog import Cog
Expand Down
3 changes: 2 additions & 1 deletion discord/ext/commands/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
import collections.abc
import sys
import traceback
from typing import TYPE_CHECKING, Any, Callable, Coroutine, Iterable, TypeVar
from collections.abc import Callable, Coroutine, Iterable
from typing import TYPE_CHECKING, Any, TypeVar

import discord

Expand Down
3 changes: 2 additions & 1 deletion discord/ext/commands/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable, Generator, TypeVar
from collections.abc import Callable, Generator
from typing import TYPE_CHECKING, Any, TypeVar

import discord

Expand Down
7 changes: 3 additions & 4 deletions discord/ext/commands/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@

import inspect
import re
from collections.abc import Iterable
from typing import (
TYPE_CHECKING,
Any,
Generic,
Iterable,
List,
Literal,
Protocol,
TypeVar,
Expand Down Expand Up @@ -1023,7 +1022,7 @@ def repl(match: re.Match) -> str:
return discord.utils.escape_mentions(result)


class Greedy(List[T]):
class Greedy(list[T]):
r"""A special converter that greedily consumes arguments until it can't.
As a consequence of this behaviour, most input errors are silently discarded,
since it is used as an indicator of when to stop parsing.
Expand Down Expand Up @@ -1100,7 +1099,7 @@ def get_converter(param: inspect.Parameter) -> Any:
return converter


_GenericAlias = type(List[T])
_GenericAlias = type(list[T])


def is_generic_type(tp: Any, *, _GenericAlias: type = _GenericAlias) -> bool:
Expand Down
3 changes: 2 additions & 1 deletion discord/ext/commands/cooldowns.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
import asyncio
import time
from collections import deque
from typing import TYPE_CHECKING, Any, Callable, Deque, TypeVar
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Deque, TypeVar

import discord.abc
from discord.enums import Enum
Expand Down
7 changes: 4 additions & 3 deletions discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
import functools
import inspect
import types
from collections.abc import Callable, Generator
from typing import (
TYPE_CHECKING,
Any,
Callable,
Generator,
Generic,
Literal,
TypeVar,
Expand Down Expand Up @@ -67,7 +66,9 @@
from .errors import *

if TYPE_CHECKING:
from typing_extensions import Concatenate, ParamSpec, TypeGuard
from typing import Concatenate, TypeGuard

from typing_extensions import ParamSpec

from discord.message import Message

Expand Down
3 changes: 2 additions & 1 deletion discord/ext/commands/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable
from collections.abc import Callable
from typing import TYPE_CHECKING, Any

from discord.errors import ClientException, DiscordException

Expand Down
4 changes: 3 additions & 1 deletion discord/ext/commands/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import inspect
import re
import sys
from collections.abc import Iterator
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, Iterator, Literal, Pattern, TypeVar, Union
from re import Pattern
from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union

from discord.utils import (
MISSING,
Expand Down
Loading
Loading