Skip to content

Commit dd5d9b3

Browse files
authored
Merge pull request #43 from Fortnite-API/drop-3.9
Drop Python 3.9 and add support for Python 3.14
1 parent b7938ab commit dd5d9b3

34 files changed

Lines changed: 407 additions & 410 deletions

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v5
1818

19-
- name: Setup Python 3.9
19+
- name: Setup Python 3.10
2020
uses: actions/setup-python@v6
2121
with:
22-
python-version: "3.9"
22+
python-version: "3.10"
2323
cache: "pip" # Cache the pip packages to speed up the workflow
2424

2525
- name: Install Dependencies and Package

.github/workflows/pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v5
1919

20-
- name: Setup Python 3.9
20+
- name: Setup Python 3.10
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: "3.9"
23+
python-version: "3.10"
2424

2525
- name: Install Dependencies
2626
run: python -m pip install -U pip setuptools build

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v5
2020

21-
- name: Setup Python 3.9
21+
- name: Setup Python 3.10
2222
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.9"
24+
python-version: "3.10"
2525
cache: "pip" # Cache the pip packages to speed up the workflow
2626

2727
- name: Install Dependencies and Package

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The library's focus is to provide a simple and easy-to-use interface to interact
1313

1414
## Installation
1515

16-
Note that **Python 3.9 or higher is required.**
16+
Note that **Python 3.10 or higher is required.**
1717

1818
```sh
1919
# Linux/macOS

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Changelog
1010
v3.3.0
1111
-------
1212

13+
Breaking Changes
14+
~~~~~~~~~~~~~~~~
15+
- Drop support for Python 3.9. The minimum supported Python version is now 3.10.
16+
17+
1318
Bug Fixes
1419
~~~~~~~~~
1520
- Fixed an issue that caused :class:`fortnite_api.Asset.resize` to raise :class:`TypeError` instead of :class:`ValueError` when the given size isn't a power of 2.

docs/extensions/attribute_table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import inspect
2929
import re
3030
from collections.abc import Sequence
31-
from typing import TYPE_CHECKING, ClassVar, NamedTuple, Optional
31+
from typing import TYPE_CHECKING, ClassVar, NamedTuple
3232

3333
from docutils import nodes
3434
from sphinx import addnodes
@@ -207,7 +207,7 @@ def build_lookup_table(env: BuildEnvironment) -> dict[str, list[str]]:
207207
class TableElement(NamedTuple):
208208
fullname: str
209209
label: str
210-
badge: Optional[attributetablebadge]
210+
badge: attributetablebadge | None
211211

212212

213213
def process_attributetable(app: Sphinx, doctree: nodes.Node, fromdocname: str) -> None:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To install the Fortnite-API Python library, you can use pip. Run the following c
1111

1212
.. note::
1313

14-
Note that Python 3.9 and greater is required to use this library.
14+
Note that Python 3.10 and greater is required to use this library.
1515

1616
.. code-block:: bash
1717

examples/discord_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import asyncio
1717
import os
18-
from typing import Optional
1918

2019
import discord
2120
from discord.ext import commands
@@ -73,7 +72,7 @@ async def aes(self, ctx: commands.Context[MyBot]) -> None:
7372

7473
# (3.1) The main AES key is marked as optional in the documentation, so we must
7574
# handle the case where it is None.
76-
main_key: Optional[str] = aes.main_key
75+
main_key: str | None = aes.main_key
7776

7877
# (4) and send a message back to the user.
7978
if main_key is None:

fortnite_api/abc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from __future__ import annotations
2626

2727
import copy
28-
from typing import TYPE_CHECKING, Generic, TypeVar, Union
28+
from typing import TYPE_CHECKING, Generic, TypeVar
2929

3030
from typing_extensions import Self
3131

@@ -118,7 +118,7 @@ def __init__(self, *, data: DictT, http: HTTPClientT) -> None:
118118
# still keeping the correct HTTPClient type.
119119

120120
@classmethod
121-
def from_dict(cls: type[Self], data: DictT, *, client: Union[Client, SyncClient]) -> Self:
121+
def from_dict(cls: type[Self], data: DictT, *, client: Client | SyncClient) -> Self:
122122
"""Reconstructs this class from a raw dictionary object. This is useful for when you
123123
store the raw data and want to reconstruct the object later on.
124124

fortnite_api/aes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import dataclasses
2828
import re
2929
from collections.abc import Generator
30-
from typing import TYPE_CHECKING, Any, Optional, Union
30+
from typing import TYPE_CHECKING, Any
3131

3232
from .abc import ReconstructAble
3333
from .http import HTTPClientT
@@ -155,11 +155,11 @@ class Aes(ReconstructAble[dict[str, Any], HTTPClientT]):
155155
def __init__(self, *, data: dict[str, Any], http: HTTPClientT):
156156
super().__init__(data=data, http=http)
157157

158-
self.main_key: Optional[str] = data.get("mainKey")
158+
self.main_key: str | None = data.get("mainKey")
159159
self.build: str = data["build"]
160160

161161
# In the case that the API gives us an invalid version, we will set it to None
162-
self.version: Optional[Version] = None
162+
self.version: Version | None = None
163163
version_info = VERSION_REGEX.findall(self.build)
164164
if version_info and len(version_info[0]) == 2:
165165
major, minor = version_info[0]
@@ -240,7 +240,7 @@ def __init__(self, *, data: dict[str, Any], http: HTTPClientT):
240240
def __hash__(self) -> int:
241241
return hash((self.pak_filename, self.pak_guid, self.key))
242242

243-
def __eq__(self, o: Union[object, DynamicKey]) -> bool:
243+
def __eq__(self, o: object | DynamicKey) -> bool:
244244
if not isinstance(o, DynamicKey):
245245
return False
246246

0 commit comments

Comments
 (0)