Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "requirements/**"
- "*.toml"
- "*.py"
branches: [master]
branches: [ master ]
pull_request:
paths:
- "discord/**"
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/docs.txt"
check-latest: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-json-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-python@v6
id: setup-python
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/docs.txt"
check-latest: true
Expand All @@ -45,7 +45,7 @@ jobs:
run: |
head -n 40 docs.json || tail -n 40 docs.json
- name: Output artifact ID
run: |
run: |
echo "artifact-id=${{ steps.artifact-upload.outputs.artifact-id }}" >> $GITHUB_OUTPUT
echo "artifact-url=${{ steps.artifact-upload.outputs.artifact-url }}" >> $GITHUB_OUTPUT
echo "::notice::Artifact uploaded: ${{ steps.artifact-upload.outputs.artifact-url }}"
4 changes: 2 additions & 2 deletions .github/workflows/docs-localization-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "Install Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:

pr:
name: "PR operations"
needs: [download]
needs: [ download ]
runs-on: ubuntu-latest
environment: translations
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-localization-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
paths:
- "discord/**"
- "docs/**"
branches: [master]
branches: [ master ]
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"

permissions: write-all

jobs:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: "Install Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lib-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install dependencies"
Expand All @@ -56,7 +56,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install dependencies"
Expand All @@ -74,7 +74,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install dependencies"
Expand All @@ -98,7 +98,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install dependencies"
Expand All @@ -124,7 +124,7 @@ jobs:
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install dependencies"
Expand All @@ -141,7 +141,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
id: python-setup
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/_release.txt"
- name: "Install Release Dependencies"
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
formats: []
formats: [ ]

build:
os: ubuntu-22.04
tools:
python: "3.13"
python: "3.14"

sphinx:
configuration: docs/conf.py
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ These changes are available on the `master` branch, but have not yet been releas

### Added

- Support for **Python 3.14**.
([#2948](https://github.com/Pycord-Development/pycord/pull/2948))

### Changed

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for D
Note
----

Pycord supports Python ``3.10`` - ``3.13``
Pycord supports Python ``3.10`` - ``3.14``

Key Features
------------
Expand Down
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,
TypeVar,
Union,
overload,
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
17 changes: 10 additions & 7 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 Expand Up @@ -70,7 +67,13 @@
from .threads import Thread
from .ui.view import BaseView
from .user import ClientUser, User
from .utils import _D, _FETCHABLE, MISSING, warn_if_voice_dependencies_missing
from .utils import (
_D,
_FETCHABLE,
MISSING,
_get_event_loop,
warn_if_voice_dependencies_missing,
)
from .webhook import Webhook
from .widget import Widget

Expand Down Expand Up @@ -147,7 +150,7 @@ class Client:
loop: Optional[:class:`asyncio.AbstractEventLoop`]
The :class:`asyncio.AbstractEventLoop` to use for asynchronous operations.
Defaults to ``None``, in which case the default event loop is used via
:func:`asyncio.get_event_loop()`.
:func:`asyncio.get_event_loop()` if it exists or one is created via :func:`asyncio.new_event_loop()`.
connector: Optional[:class:`aiohttp.BaseConnector`]
The connector to use for connection pooling.
proxy: Optional[:class:`str`]
Expand Down Expand Up @@ -245,7 +248,7 @@ def __init__(
# self.ws is set in the connect method
self.ws: DiscordWebSocket = None # type: ignore
self.loop: asyncio.AbstractEventLoop = (
asyncio.get_event_loop() if loop is None else loop
_get_event_loop() if loop is None else loop
)
self._listeners: dict[str, list[tuple[asyncio.Future, Callable[..., bool]]]] = (
{}
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
10 changes: 5 additions & 5 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@
import sys
import types
from collections import OrderedDict
from collections.abc import Callable, Coroutine, Generator
from enum import Enum
from typing import (
TYPE_CHECKING,
Any,
Callable,
Coroutine,
Generator,
Generic,
TypeVar,
Union,
Expand Down Expand Up @@ -72,7 +70,7 @@
if sys.version_info >= (3, 11):
from typing import Annotated, Literal, get_args, get_origin
else:
from typing_extensions import Annotated, Literal, get_args, get_origin
from typing import Annotated, Literal, get_args, get_origin

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

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

from typing_extensions import ParamSpec

from .. import Permissions
from ..cog import Cog
Expand Down
Loading
Loading