chore!: drop Python 3.10 support#908
Open
vdusek wants to merge 2 commits into
Open
Conversation
Python 3.10 reaches end-of-life soon and apify-client v3 (next major) will require Python >= 3.11. Bumping the minimum now lets the SDK use 3.11+ stdlib idioms (`datetime.UTC`, `typing.Self`, `TimeoutError` alias) and unblocks the apify-client v3 adoption series. - `pyproject.toml`: `requires-python = ">=3.11"`, drop the 3.10 classifier, set `[tool.ty.environment]` to 3.11. - `.github/workflows/_checks.yaml`: drop 3.10 from lint, type-check, unit-test, integration-test, and e2e-test matrices. - Refresh `uv.lock` (removes 3.10-only backport packages). - Apply ruff autofixes unlocked by the version bump (UP017, UP035, UP041) across `src/` and `tests/`. BREAKING CHANGE: Python 3.10 is no longer supported.
Contributor
Author
|
@janbuchar Starting with SDK v4, I'll split the big PRs into more, smaller reviewable ones. Let's start with this. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #908 +/- ##
==========================================
+ Coverage 87.01% 87.05% +0.03%
==========================================
Files 48 48
Lines 2942 2943 +1
==========================================
+ Hits 2560 2562 +2
+ Misses 382 381 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The previous ruff autofix (UP017) hoisted `from datetime import UTC` to module scope, but `main()` functions passed to `make_actor` are serialized and run on the Apify platform without access to enclosing-module imports, so they raised `NameError: name 'UTC' is not defined` at runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Summary
pyproject.toml(requires-python, classifiers,[tool.ty.environment]) and drop 3.10 from every CI matrix in.github/workflows/_checks.yaml(lint, type-check, unit tests, integration tests, e2e tests).src/andtests/:UP017(datetime.timezone.utc→datetime.UTC),UP035(typing_extensions.Self→typing.Self),UP041(asyncio.TimeoutError→ builtinTimeoutError).uv.lock— the resolver drops the 3.10-only backport packages (backports-asyncio-runner,exceptiongroup,importlib-metadata,zipp).Why
3.10 reaches end-of-life soon, and the upcoming
apify-clientv3 already requires>=3.11. Landing the version drop on its own first keeps the v3 client-upgrade series small and reviewable.BREAKING CHANGE
Python 3.10 is no longer supported. Users on 3.10 must upgrade to 3.11+ before pulling the next SDK release.