Skip to content

Commit d34f7c2

Browse files
committed
Merge branch 'master' into feat/decrypt-secret-objects
2 parents 96e344e + d989ad0 commit d34f7c2

File tree

7 files changed

+1812
-1753
lines changed

7 files changed

+1812
-1753
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
All notable changes to this project will be documented in this file.
44

55
<!-- git-cliff-unreleased-start -->
6-
## 2.5.1 - **not yet released**
6+
## 2.6.1 - **not yet released**
7+
8+
### 🚀 Features
9+
10+
- Expose `logger` argument on `Actor.call` to control log redirection from started Actor run ([#487](https://github.com/apify/apify-sdk-python/pull/487)) ([aa6fa47](https://github.com/apify/apify-sdk-python/commit/aa6fa4750ea1bc7909be1191c0d276a2046930c2)) by [@Pijukatel](https://github.com/Pijukatel)
11+
12+
13+
<!-- git-cliff-unreleased-end -->
14+
## [2.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.6.0) (2025-06-09)
715

816
### 🚀 Features
917

@@ -15,7 +23,6 @@ All notable changes to this project will be documented in this file.
1523
- Prefer proxy password from env var ([#468](https://github.com/apify/apify-sdk-python/pull/468)) ([1c4ad9b](https://github.com/apify/apify-sdk-python/commit/1c4ad9bcfbf6ac404f942d7d2d249b036c2e7f54)) by [@stepskop](https://github.com/stepskop)
1624

1725

18-
<!-- git-cliff-unreleased-end -->
1926
## [2.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.5.0) (2025-03-27)
2027

2128
### 🚀 Features

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "apify"
7-
version = "2.5.1"
7+
version = "2.6.1"
88
description = "Apify SDK for Python"
99
authors = [{ name = "Apify Technologies s.r.o.", email = "[email protected]" }]
1010
license = { file = "LICENSE" }
@@ -34,7 +34,7 @@ keywords = [
3434
"scraping",
3535
]
3636
dependencies = [
37-
"apify-client>=1.9.2",
37+
"apify-client>=1.11.0",
3838
"apify-shared>=1.3.0",
3939
"crawlee~=0.6.0",
4040
"cryptography>=42.0.0",
@@ -66,9 +66,9 @@ dev = [
6666
"pre-commit~=4.2.0",
6767
"pydoc-markdown~=4.8.0",
6868
"pytest-asyncio~=1.0.0",
69-
"pytest-cov~=6.1.0",
69+
"pytest-cov~=6.2.0",
7070
"pytest-only~=2.1.0",
71-
"pytest-xdist~=3.7.0",
71+
"pytest-xdist~=3.8.0",
7272
"pytest~=8.4.0",
7373
"respx~=0.22.0",
7474
"ruff~=0.11.0",

src/apify/_actor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ async def call(
812812
timeout: timedelta | None | Literal['RemainingTime'] = None,
813813
webhooks: list[Webhook] | None = None,
814814
wait: timedelta | None = None,
815+
logger: logging.Logger | None | Literal['default'] = 'default',
815816
) -> ActorRun | None:
816817
"""Start an Actor on the Apify Platform and wait for it to finish before returning.
817818
@@ -834,6 +835,9 @@ async def call(
834835
a webhook set up for the Actor, you do not have to add it again here.
835836
wait: The maximum number of seconds the server waits for the run to finish. If not provided,
836837
waits indefinitely.
838+
logger: Logger used to redirect logs from the Actor run. Using "default" literal means that a predefined
839+
default logger will be used. Setting `None` will disable any log propagation. Passing custom logger
840+
will redirect logs to the provided logger.
837841
838842
Returns:
839843
Info about the started Actor run.
@@ -866,6 +870,7 @@ async def call(
866870
timeout_secs=int(actor_call_timeout.total_seconds()) if actor_call_timeout is not None else None,
867871
webhooks=serialized_webhooks,
868872
wait_secs=int(wait.total_seconds()) if wait is not None else None,
873+
logger=logger,
869874
)
870875

871876
return ActorRun.model_validate(api_result)

tests/unit/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def prepare_test_env(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Callabl
3838
"""
3939

4040
def _prepare_test_env() -> None:
41-
delattr(apify._actor.Actor, '__wrapped__')
41+
if hasattr(apify._actor.Actor, '__wrapped__'):
42+
delattr(apify._actor.Actor, '__wrapped__')
4243
apify._actor._ActorType._is_any_instance_initialized = False
4344

4445
# Set the environment variable for the local storage directory to the temporary path.

0 commit comments

Comments
 (0)