Skip to content

feat!: migrate to apify-client 3.x and require Python 3.11+ - #45

Merged
daveomri merged 15 commits into
mainfrom
feat/24-langchain-support-apify-client-v3
Oct 19, 2026
Merged

daveomri merged 15 commits into
mainfrom
feat/24-langchain-support-apify-client-v3

Conversation

@daveomri

Copy link
Copy Markdown
Collaborator

Widens apify-client from >=2.3.0,<3.0.0 to >=3.3.0,<4.0.0 so this package can be installed alongside Apify Python SDK v4 (requires apify-client>=3.1.0). Unblocks the python-crewai template's SDK v4 bump.

Breaking

  • Python 3.11 is now the minimum (required by apify-client 3.x). CI matrix is 3.11 to 3.13.
  • Tool envelope timestamps are now ISO 8601 with an explicit offset (2025-01-01T00:00:00+00:00) instead of the API's raw Z form. Same instant, different spelling.

Tool names, signatures and envelope keys are otherwise unchanged.

Notes

  • Floor is 3.3.0, not 3.0.0: on 3.0.0, Run requires general_access and three RunStats fields that are optional by 3.3.0, and actor().get() returns Actor there vs ActorResource now. Pinning to the tested version avoids fixtures that pass locally but fail on the oldest allowed client.
  • Client API: .call() now returns a Run model (run.default_dataset_id) and takes run_timeout as a timedelta. Public timeout_secs params are unchanged; conversion happens at the call boundary.
  • Removed dead code: guards for default_dataset_id / id (required str on 3.x), the _iso timestamp helper (run timestamps are always datetimes), and the tests that could only reach them with an invalid Run.

Test plan

  • 405 unit tests, mypy, ruff check, ruff format --check pass on Python 3.13
  • 3.11 and 3.12 matrix legs (CI)
  • Integration tests against a live APIFY_TOKEN

Run fixtures are now real Run instances rather than dicts, so leftover dict-style access fails the suite instead of passing against a MagicMock.

Closes #39

co-created with Claude

@daveomri daveomri self-assigned this Oct 14, 2026
@daveomri daveomri changed the title feat: langchain support apify client v3 feat!: migrate to apify-client 3.x and require Python 3.11+ Oct 14, 2026
@daveomri
daveomri requested review from drobnikj and vdusek October 15, 2026 07:50
@daveomri
daveomri marked this pull request as ready for review October 15, 2026 07:50
Comment thread langchain_apify/_client.py Resolved
Comment thread langchain_apify/_client.py Resolved
Comment thread pyproject.toml Resolved
Comment thread tests/unit_tests/test_client.py Resolved
Comment thread langchain_apify/wrappers.py Resolved
Comment thread tests/unit_tests/conftest.py Resolved
Comment thread tests/unit_tests/test_actor_tools.py Resolved
Comment thread langchain_apify/_utils.py Resolved
Comment thread langchain_apify/_utils.py Resolved
@daveomri
daveomri requested a review from vdusek October 16, 2026 11:22

@vdusek vdusek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daveomri
daveomri merged commit 006d27a into main Oct 19, 2026
10 checks passed
@daveomri
daveomri deleted the feat/24-langchain-support-apify-client-v3 branch October 19, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Langchain - support apify-client v3

3 participants