Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here you'll find a contributing guide to get started with development.

## Environment

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

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ check out the [Apify SDK for Python](https://docs.apify.com/sdk/python) instead.

## Installation

Requires Python 3.9+
Requires Python 3.10+

You can install the package from its [PyPI listing](https://pypi.org/project/apify-shared).
To do that, simply run `pip install apify-shared` in your terminal.
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.9
python_version = 3.10
files = scripts, src, tests
check_untyped_defs = True
disallow_incomplete_defs = True
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ keywords = ["apify", "api", "shared", "scraping", "automation"]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
]

requires-python = ">=3.9"
requires-python = ">=3.10"

# We use inclusive ordered comparison clause for non-Apify packages intentionally in order to enhance the Apify
# packages's compatibility with a wide range of external packages. This decision was discussed in detail in
Expand Down
4 changes: 2 additions & 2 deletions src/apify_shared/types.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

from typing import Any, Union
from typing import Any

# Type for representing json-serializable values.
# It's close enough to the real thing supported by json.parse,
# and the best we can do until mypy supports recursive types.
# It was suggested in a discussion with (and approved by) Guido van Rossum,
# so I'd consider it correct enough.
JSONSerializable = Union[str, int, float, bool, None, dict[str, Any], list[Any]]
JSONSerializable = str | int | float | bool | None | dict[str, Any] | list[Any]
2 changes: 1 addition & 1 deletion src/apify_shared/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def is_file_or_bytes(value: Any) -> bool:
but then the check would be super complex, judging from how the 'requests' library does it.
This way should be good enough for the vast majority of use cases, if it causes issues, we can improve it later.
"""
return isinstance(value, (bytes, bytearray, io.IOBase))
return isinstance(value, (bytes | bytearray | io.IOBase))


@ignore_docs
Expand Down
79 changes: 1 addition & 78 deletions uv.lock

Large diffs are not rendered by default.

Loading