Skip to content

Commit 5746066

Browse files
committed
chore!: Drop support for Python 3.9
1 parent bb0a9fa commit 5746066

File tree

7 files changed

+10
-86
lines changed

7 files changed

+10
-86
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Here you'll find a contributing guide to get started with development.
44

55
## Environment
66

7-
For local development, it is required to have Python 3.9 (or a later version) installed.
7+
For local development, it is required to have Python 3.10 (or a later version) installed.
88

99
We use [uv](https://docs.astral.sh/uv/) for project management. Install it and set up your IDE accordingly.
1010

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ check out the [Apify SDK for Python](https://docs.apify.com/sdk/python) instead.
99

1010
## Installation
1111

12-
Requires Python 3.9+
12+
Requires Python 3.10+
1313

1414
You can install the package from its [PyPI listing](https://pypi.org/project/apify-shared).
1515
To do that, simply run `pip install apify-shared` in your terminal.

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version = 3.9
2+
python_version = 3.10
33
files = scripts, src, tests
44
check_untyped_defs = True
55
disallow_incomplete_defs = True

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ keywords = ["apify", "api", "shared", "scraping", "automation"]
99

1010
classifiers = [
1111
"Development Status :: 5 - Production/Stable",
12+
"Environment :: Console",
1213
"Intended Audience :: Developers",
1314
"License :: OSI Approved :: Apache Software License",
1415
"Operating System :: OS Independent",
15-
"Programming Language :: Python :: 3.9",
1616
"Programming Language :: Python :: 3.10",
1717
"Programming Language :: Python :: 3.11",
1818
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
1920
"Topic :: Software Development :: Libraries",
2021
]
2122

22-
requires-python = ">=3.9"
23+
requires-python = ">=3.10"
2324

2425
# We use inclusive ordered comparison clause for non-Apify packages intentionally in order to enhance the Apify
2526
# packages's compatibility with a wide range of external packages. This decision was discussed in detail in

src/apify_shared/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

3-
from typing import Any, Union
3+
from typing import Any
44

55
# Type for representing json-serializable values.
66
# It's close enough to the real thing supported by json.parse,
77
# and the best we can do until mypy supports recursive types.
88
# It was suggested in a discussion with (and approved by) Guido van Rossum,
99
# so I'd consider it correct enough.
10-
JSONSerializable = Union[str, int, float, bool, None, dict[str, Any], list[Any]]
10+
JSONSerializable = str | int | float | bool | None | dict[str, Any] | list[Any]

src/apify_shared/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def is_file_or_bytes(value: Any) -> bool:
7878
but then the check would be super complex, judging from how the 'requests' library does it.
7979
This way should be good enough for the vast majority of use cases, if it causes issues, we can improve it later.
8080
"""
81-
return isinstance(value, (bytes, bytearray, io.IOBase))
81+
return isinstance(value, (bytes | bytearray | io.IOBase))
8282

8383

8484
@ignore_docs

uv.lock

Lines changed: 1 addition & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)