Skip to content

chore!: drop Python 3.10 support#908

Merged
vdusek merged 4 commits into
masterfrom
drop-python-3.10
May 28, 2026
Merged

chore!: drop Python 3.10 support#908
vdusek merged 4 commits into
masterfrom
drop-python-3.10

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 26, 2026

Issue

Summary

  • Bump the minimum supported Python to 3.11 in 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).
  • Apply ruff autofixes unlocked by the version bump across src/ and tests/: UP017 (datetime.timezone.utcdatetime.UTC), UP035 (typing_extensions.Selftyping.Self), UP041 (asyncio.TimeoutError → builtin TimeoutError).
  • Refresh 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-client v3 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.

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.
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels May 26, 2026
@vdusek vdusek self-assigned this May 26, 2026
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels May 26, 2026
@github-actions github-actions Bot added this to the 141st sprint - Tooling team milestone May 26, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 26, 2026
@vdusek
Copy link
Copy Markdown
Contributor Author

vdusek commented May 26, 2026

@janbuchar Starting with SDK v4, I'll split the big PRs into more, smaller reviewable ones. Let's start with this.

@vdusek vdusek requested a review from janbuchar May 26, 2026 13:46
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.02%. Comparing base (b4f5485) to head (6c7b4e2).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #908   +/-   ##
=======================================
  Coverage   87.01%   87.02%           
=======================================
  Files          48       48           
  Lines        2942     2943    +1     
=======================================
+ Hits         2560     2561    +1     
  Misses        382      382           
Flag Coverage Δ
e2e 37.75% <75.00%> (+0.02%) ⬆️
integration 59.05% <87.50%> (+0.01%) ⬆️
unit 75.77% <87.50%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
Mirrors the apify-client v3 upgrading guide structure. Further breaking-change sections for
v4 (apify-client v3 adoption, webhook API rework) will be added on top in their respective
branches.
@vdusek vdusek requested a review from szaganek as a code owner May 28, 2026 08:34
Comment thread docs/04_upgrading/upgrading_to_v4.md Outdated
@vdusek vdusek merged commit a67788e into master May 28, 2026
28 checks passed
@vdusek vdusek deleted the drop-python-3.10 branch May 28, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop support for Python 3.10

4 participants