apify 2.7.1b13__tar.gz → 2.7.1b15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apify might be problematic. Click here for more details.
- {apify-2.7.1b13 → apify-2.7.1b15}/CHANGELOG.md +25 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/PKG-INFO +1 -1
- {apify-2.7.1b13 → apify-2.7.1b15}/pyproject.toml +4 -4
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_file_system/_key_value_store_client.py +22 -1
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_helpers.py +0 -5
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_log.py +4 -3
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/conftest.py +25 -1
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/events/test_apify_event_manager.py +1 -2
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/extensions/test_httpcache.py +1 -1
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/storage_clients/test_file_system.py +30 -3
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/test_crypto.py +2 -2
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/test_proxy_configuration.py +5 -12
- {apify-2.7.1b13 → apify-2.7.1b15}/uv.lock +113 -113
- {apify-2.7.1b13 → apify-2.7.1b15}/website/package-lock.json +3 -3
- {apify-2.7.1b13 → apify-2.7.1b15}/.editorconfig +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/CODEOWNERS +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/build_and_deploy_docs.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/check_pr_title.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/pre_release.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/release.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/run_code_checks.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.github/workflows/update_new_issue.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.gitignore +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.markdownlint.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/.pre-commit-config.yaml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/CONTRIBUTING.md +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/LICENSE +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/Makefile +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/README.md +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/01_introduction.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/02_running_actors_locally.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/03_actor_structure.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/code/01_introduction.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/code/actor_structure/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/code/actor_structure/__main__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/code/actor_structure/main.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/01_overview/code/actor_structure/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/01_actor_lifecycle.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/02_actor_input.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/03_storages.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/04_actor_events.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/05_proxy_management.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/06_interacting_with_other_actors.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/07_webhooks.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/08_access_apify_api.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/09_running_webserver.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/10_logging.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/11_configuration.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/12_pay_per_event.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/01_context_manager.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/01_init_exit.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/01_reboot.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/01_status_message.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/02_input.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_dataset_exports.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_dataset_read_write.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_deleting_storages.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_kvs_iterating.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_kvs_public_url.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_kvs_read_write.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_opening_storages.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/03_rq.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/04_actor_events.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_apify_proxy.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_apify_proxy_config.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_custom_proxy.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_custom_proxy_function.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_proxy_actor_input.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_proxy_httpx.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/05_proxy_rotation.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/06_interacting_call.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/06_interacting_call_task.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/06_interacting_metamorph.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/06_interacting_start.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/07_webhook.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/07_webhook_preventing.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/08_actor_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/08_actor_new_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/09_webserver.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/10_log_config.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/10_logger_usage.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/10_redirect_log.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/10_redirect_log_existing_run.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/11_config.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/actor_charge.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/02_concepts/code/conditional_actor_charge.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/01_beautifulsoup_httpx.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/02_parsel_impit.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/03_playwright.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/04_selenium.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/05_crawlee.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/06_scrapy.mdx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/01_beautifulsoup_httpx.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/02_parsel_impit.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/03_playwright.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/04_selenium.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/05_crawlee_beautifulsoup.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/05_crawlee_parsel.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/05_crawlee_playwright.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/__main__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/items.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/main.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/settings.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/spiders/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/spiders/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/03_guides/code/scrapy_project/src/spiders/title.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/04_upgrading/upgrading_to_v2.md +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/04_upgrading/upgrading_to_v3.md +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/docs/pyproject.toml +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/renovate.json +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_actor.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_charging.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_configuration.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_consts.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_crypto.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_models.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_proxy_configuration.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/_utils.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/events/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/events/_apify_event_manager.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/events/_types.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/events/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/log.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/request_loaders/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/request_loaders/_apify_request_list.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/request_loaders/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/_actor_runner.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/_async_thread.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/_logging_config.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/extensions/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/extensions/_httpcache.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/middlewares/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/middlewares/apify_proxy.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/middlewares/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/pipelines/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/pipelines/actor_dataset_push.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/pipelines/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/requests.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/scheduler.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/scrapy/utils.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/_dataset_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/_key_value_store_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/_models.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/_request_queue_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/_storage_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_apify/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_file_system/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_file_system/_storage_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storages/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storages/py.typed +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/README.md +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/_utils.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/Dockerfile +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/requirements.txt +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/server.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/src/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/src/__main__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/actor_source_base/src/main.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/conftest.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_api_helpers.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_call_timeouts.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_charge.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_create_proxy_configuration.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_dataset.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_events.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_key_value_store.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_lifecycle.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_log.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_request_queue.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_actor_scrapy.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_crawlers_with_storages.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_fixtures.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/integration/test_request_queue.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_create_proxy_configuration.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_dataset.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_env_helpers.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_key_value_store.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_lifecycle.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_non_default_instance.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_actor_request_queue.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_configuration.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/actor/test_request_list.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/events/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/extensions/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/middlewares/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/middlewares/test_apify_proxy.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/pipelines/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/pipelines/test_actor_dataset_push.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/requests/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/requests/test_to_apify_request.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/requests/test_to_scrapy_request.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/utils/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/utils/test_apply_apify_settings.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/scrapy/utils/test_get_basic_auth_header.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/storage_clients/__init__.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/tests/unit/storage_clients/test_apify_request_queue_client.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/.eslintrc.json +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/babel.config.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/build_api_reference.sh +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/docusaurus.config.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/generate_module_shortcuts.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/package.json +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/sidebars.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/ApiLink.jsx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/Gradients.jsx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/Highlights.jsx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/Highlights.module.css +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/RunnableCodeBlock.jsx +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/components/RunnableCodeBlock.module.css +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/css/custom.css +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/pages/home_page_example.py +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/pages/index.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/pages/index.module.css +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/src/theme/DocItem/Content/index.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/static/.nojekyll +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/static/img/docs-og.png +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/static/img/guides/redirected_logs_example.webp +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/tools/docs-prettier.config.js +0 -0
- {apify-2.7.1b13 → apify-2.7.1b15}/website/tools/utils/externalLink.js +0 -0
|
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
|
|
|
16
16
|
- Expose `APIFY_USER_IS_PAYING` env var to the configuration ([#507](https://github.com/apify/apify-sdk-python/pull/507)) ([0801e54](https://github.com/apify/apify-sdk-python/commit/0801e54887317c1280cc6828ecd3f2cc53287e76)) by [@stepskop](https://github.com/stepskop)
|
|
17
17
|
- Resolve DeprecationWarning in ApifyEventManager ([#555](https://github.com/apify/apify-sdk-python/pull/555)) ([0c5111d](https://github.com/apify/apify-sdk-python/commit/0c5111dafe19796ec1fb9652a44c031bed9758df)) by [@vdusek](https://github.com/vdusek), closes [#343](https://github.com/apify/apify-sdk-python/issues/343)
|
|
18
18
|
- Use same `client_key` for `Actor` created `request_queue` and improve its metadata estimation ([#552](https://github.com/apify/apify-sdk-python/pull/552)) ([7e4e5da](https://github.com/apify/apify-sdk-python/commit/7e4e5da81dd87e84ebeef2bd336c6c1d422cb9a7)) by [@Pijukatel](https://github.com/Pijukatel), closes [#536](https://github.com/apify/apify-sdk-python/issues/536)
|
|
19
|
+
- Properly process pre-existing Actor input file ([#591](https://github.com/apify/apify-sdk-python/pull/591)) ([cc5075f](https://github.com/apify/apify-sdk-python/commit/cc5075fab8c72ca5711cfd97932037b34e6997cd)) by [@Pijukatel](https://github.com/Pijukatel), closes [#590](https://github.com/apify/apify-sdk-python/issues/590)
|
|
19
20
|
|
|
20
21
|
### Chore
|
|
21
22
|
|
|
@@ -89,6 +90,30 @@ All notable changes to this project will be documented in this file.
|
|
|
89
90
|
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
90
91
|
|
|
91
92
|
|
|
93
|
+
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
94
|
+
|
|
95
|
+
### 🚀 Features
|
|
96
|
+
|
|
97
|
+
- **crypto:** Decrypt secret objects ([#482](https://github.com/apify/apify-sdk-python/pull/482)) ([ce9daf7](https://github.com/apify/apify-sdk-python/commit/ce9daf7381212b8dc194e8a643e5ca0dedbc0078)) by [@MFori](https://github.com/MFori)
|
|
98
|
+
|
|
99
|
+
### 🐛 Bug Fixes
|
|
100
|
+
|
|
101
|
+
- Sync `@docusaurus` theme version [internal] ([#500](https://github.com/apify/apify-sdk-python/pull/500)) ([a7485e7](https://github.com/apify/apify-sdk-python/commit/a7485e7d2276fde464ce862573d5b95e7d4d836a)) by [@katzino](https://github.com/katzino)
|
|
102
|
+
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
106
|
+
|
|
107
|
+
### 🚀 Features
|
|
108
|
+
|
|
109
|
+
- **crypto:** Decrypt secret objects ([#482](https://github.com/apify/apify-sdk-python/pull/482)) ([ce9daf7](https://github.com/apify/apify-sdk-python/commit/ce9daf7381212b8dc194e8a643e5ca0dedbc0078)) by [@MFori](https://github.com/MFori)
|
|
110
|
+
|
|
111
|
+
### 🐛 Bug Fixes
|
|
112
|
+
|
|
113
|
+
- Sync `@docusaurus` theme version [internal] ([#500](https://github.com/apify/apify-sdk-python/pull/500)) ([a7485e7](https://github.com/apify/apify-sdk-python/commit/a7485e7d2276fde464ce862573d5b95e7d4d836a)) by [@katzino](https://github.com/katzino)
|
|
114
|
+
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
115
|
+
|
|
116
|
+
|
|
92
117
|
|
|
93
118
|
## [2.7.3](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.3) (2025-08-11)
|
|
94
119
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "apify"
|
|
7
|
-
version = "2.7.
|
|
7
|
+
version = "2.7.1b15"
|
|
8
8
|
description = "Apify SDK for Python"
|
|
9
9
|
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -65,17 +65,17 @@ dev = [
|
|
|
65
65
|
"build~=1.3.0",
|
|
66
66
|
"crawlee[parsel]",
|
|
67
67
|
"dycw-pytest-only~=2.1.0",
|
|
68
|
-
"griffe
|
|
68
|
+
"griffe",
|
|
69
69
|
"mypy~=1.17.0",
|
|
70
70
|
"pre-commit~=4.3.0",
|
|
71
71
|
"pydoc-markdown~=4.8.0",
|
|
72
72
|
"pytest-asyncio~=1.1.0",
|
|
73
|
-
"pytest-cov~=
|
|
73
|
+
"pytest-cov~=7.0.0",
|
|
74
74
|
"pytest-httpserver~=1.1.0",
|
|
75
75
|
"pytest-timeout~=2.4.0",
|
|
76
76
|
"pytest-xdist~=3.8.0",
|
|
77
77
|
"pytest~=8.4.0",
|
|
78
|
-
"ruff~=0.
|
|
78
|
+
"ruff~=0.13.0",
|
|
79
79
|
"setuptools", # setuptools are used by pytest but not explicitly required
|
|
80
80
|
"types-cachetools~=6.2.0.20250827",
|
|
81
81
|
"uvicorn[standard]",
|
{apify-2.7.1b13 → apify-2.7.1b15}/src/apify/storage_clients/_file_system/_key_value_store_client.py
RENAMED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import json
|
|
3
|
+
from pathlib import Path
|
|
2
4
|
|
|
3
5
|
from typing_extensions import override
|
|
4
6
|
|
|
@@ -23,9 +25,15 @@ class ApifyFileSystemKeyValueStoreClient(FileSystemKeyValueStoreClient):
|
|
|
23
25
|
the `INPUT.json` file. It also updates the metadata to reflect that the store has been purged.
|
|
24
26
|
"""
|
|
25
27
|
kvs_input_key = Configuration.get_global_configuration().input_key
|
|
28
|
+
|
|
29
|
+
# First try to find the alternative format of the input file and process it if it exists.
|
|
30
|
+
for file_path in self.path_to_kvs.glob('*'):
|
|
31
|
+
if file_path.name == f'{kvs_input_key}.json':
|
|
32
|
+
await self._process_input_json(file_path)
|
|
33
|
+
|
|
26
34
|
async with self._lock:
|
|
27
35
|
for file_path in self.path_to_kvs.glob('*'):
|
|
28
|
-
if file_path.name in {METADATA_FILENAME, f'{kvs_input_key}.
|
|
36
|
+
if file_path.name in {METADATA_FILENAME, kvs_input_key, f'{kvs_input_key}.{METADATA_FILENAME}'}:
|
|
29
37
|
continue
|
|
30
38
|
if file_path.is_file():
|
|
31
39
|
await asyncio.to_thread(file_path.unlink, missing_ok=True)
|
|
@@ -34,3 +42,16 @@ class ApifyFileSystemKeyValueStoreClient(FileSystemKeyValueStoreClient):
|
|
|
34
42
|
update_accessed_at=True,
|
|
35
43
|
update_modified_at=True,
|
|
36
44
|
)
|
|
45
|
+
|
|
46
|
+
async def _process_input_json(self, path: Path) -> None:
|
|
47
|
+
"""Process simple input json file to format expected by the FileSystemKeyValueStoreClient.
|
|
48
|
+
|
|
49
|
+
For example: INPUT.json -> INPUT, INPUT.json.metadata
|
|
50
|
+
"""
|
|
51
|
+
try:
|
|
52
|
+
f = await asyncio.to_thread(path.open)
|
|
53
|
+
input_data = json.load(f)
|
|
54
|
+
finally:
|
|
55
|
+
f.close()
|
|
56
|
+
await asyncio.to_thread(path.unlink, missing_ok=True)
|
|
57
|
+
await self.set_value(key=path.stem, value=input_data)
|
|
@@ -122,7 +122,6 @@ async def test_abort_actor_run(apify_client_async_patcher: ApifyClientAsyncPatch
|
|
|
122
122
|
# NOTE: The following methods are properly tested using integrations tests.
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
126
125
|
async def test_metamorph_fails_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
127
126
|
caplog.set_level('WARNING')
|
|
128
127
|
async with Actor:
|
|
@@ -133,7 +132,6 @@ async def test_metamorph_fails_locally(caplog: pytest.LogCaptureFixture) -> None
|
|
|
133
132
|
assert 'Actor.metamorph() is only supported when running on the Apify platform.' in caplog.records[0].message
|
|
134
133
|
|
|
135
134
|
|
|
136
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
137
135
|
async def test_reboot_fails_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
138
136
|
caplog.set_level('WARNING')
|
|
139
137
|
async with Actor:
|
|
@@ -144,7 +142,6 @@ async def test_reboot_fails_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
|
144
142
|
assert 'Actor.reboot() is only supported when running on the Apify platform.' in caplog.records[0].message
|
|
145
143
|
|
|
146
144
|
|
|
147
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
148
145
|
async def test_add_webhook_fails_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
149
146
|
caplog.set_level('WARNING')
|
|
150
147
|
async with Actor:
|
|
@@ -157,7 +154,6 @@ async def test_add_webhook_fails_locally(caplog: pytest.LogCaptureFixture) -> No
|
|
|
157
154
|
assert 'Actor.add_webhook() is only supported when running on the Apify platform.' in caplog.records[0].message
|
|
158
155
|
|
|
159
156
|
|
|
160
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
161
157
|
async def test_set_status_message_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
162
158
|
caplog.set_level('INFO')
|
|
163
159
|
async with Actor:
|
|
@@ -169,7 +165,6 @@ async def test_set_status_message_locally(caplog: pytest.LogCaptureFixture) -> N
|
|
|
169
165
|
assert '[Status message]: test-status-message' in matching_records[0].message
|
|
170
166
|
|
|
171
167
|
|
|
172
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
173
168
|
async def test_set_terminal_status_message_locally(caplog: pytest.LogCaptureFixture) -> None:
|
|
174
169
|
caplog.set_level('INFO')
|
|
175
170
|
async with Actor:
|
|
@@ -2,14 +2,15 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import contextlib
|
|
4
4
|
import logging
|
|
5
|
-
|
|
6
|
-
import pytest
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
7
6
|
|
|
8
7
|
from apify import Actor
|
|
9
8
|
from apify.log import logger
|
|
10
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
import pytest
|
|
12
|
+
|
|
11
13
|
|
|
12
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
13
14
|
async def test_actor_logs_messages_correctly(caplog: pytest.LogCaptureFixture) -> None:
|
|
14
15
|
caplog.set_level(logging.DEBUG, logger='apify')
|
|
15
16
|
|
|
@@ -16,12 +16,33 @@ from apify_shared.consts import ApifyEnvVars
|
|
|
16
16
|
from crawlee import service_locator
|
|
17
17
|
|
|
18
18
|
import apify._actor
|
|
19
|
+
import apify.log
|
|
19
20
|
|
|
20
21
|
if TYPE_CHECKING:
|
|
21
22
|
from collections.abc import Callable, Iterator
|
|
23
|
+
from logging import Logger
|
|
22
24
|
from pathlib import Path
|
|
23
25
|
|
|
24
26
|
|
|
27
|
+
@pytest.fixture
|
|
28
|
+
def _patch_propagate_logger(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]:
|
|
29
|
+
"""Patch enabling `propagate` for the crawlee logger.
|
|
30
|
+
|
|
31
|
+
This is necessary for tests requiring log interception using `caplog`.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
original_configure_logger = apify.log.configure_logger
|
|
35
|
+
|
|
36
|
+
def propagate_logger(logger: Logger, **kwargs: Any) -> None:
|
|
37
|
+
original_configure_logger(logger, **kwargs)
|
|
38
|
+
logger.propagate = True
|
|
39
|
+
|
|
40
|
+
monkeypatch.setattr('crawlee._log_config.configure_logger', propagate_logger)
|
|
41
|
+
monkeypatch.setattr(apify.log, 'configure_logger', propagate_logger)
|
|
42
|
+
yield
|
|
43
|
+
monkeypatch.undo()
|
|
44
|
+
|
|
45
|
+
|
|
25
46
|
@pytest.fixture
|
|
26
47
|
def prepare_test_env(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Callable[[], None]:
|
|
27
48
|
"""Prepare the testing environment by resetting the global state before each test.
|
|
@@ -66,7 +87,10 @@ def prepare_test_env(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Callabl
|
|
|
66
87
|
|
|
67
88
|
|
|
68
89
|
@pytest.fixture(autouse=True)
|
|
69
|
-
def _isolate_test_environment(
|
|
90
|
+
def _isolate_test_environment(
|
|
91
|
+
prepare_test_env: Callable[[], None],
|
|
92
|
+
_patch_propagate_logger: None,
|
|
93
|
+
) -> None:
|
|
70
94
|
"""Isolate the testing environment by resetting global state before and after each test.
|
|
71
95
|
|
|
72
96
|
This fixture ensures that each test starts with a clean slate and that any modifications during the test
|
|
@@ -22,7 +22,6 @@ if TYPE_CHECKING:
|
|
|
22
22
|
from collections.abc import Callable
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
26
25
|
async def test_lifecycle_local(caplog: pytest.LogCaptureFixture) -> None:
|
|
27
26
|
caplog.set_level(logging.DEBUG, logger='apify')
|
|
28
27
|
config = Configuration.get_global_configuration()
|
|
@@ -132,7 +131,7 @@ async def test_lifecycle_on_platform_without_websocket(monkeypatch: pytest.Monke
|
|
|
132
131
|
monkeypatch.setenv(ActorEnvVars.EVENTS_WEBSOCKET_URL, 'ws://localhost:56565')
|
|
133
132
|
event_manager = ApifyEventManager(Configuration.get_global_configuration())
|
|
134
133
|
|
|
135
|
-
with pytest.raises(RuntimeError, match='Error connecting to platform events websocket!'):
|
|
134
|
+
with pytest.raises(RuntimeError, match=r'Error connecting to platform events websocket!'):
|
|
136
135
|
async with event_manager:
|
|
137
136
|
pass
|
|
138
137
|
|
|
@@ -67,5 +67,5 @@ def test_get_kvs_name(spider_name: str, expected: str) -> None:
|
|
|
67
67
|
],
|
|
68
68
|
)
|
|
69
69
|
def test_get_kvs_name_raises(spider_name: str) -> None:
|
|
70
|
-
with pytest.raises(ValueError, match='Unsupported spider name'):
|
|
70
|
+
with pytest.raises(ValueError, match=r'Unsupported spider name'):
|
|
71
71
|
assert get_kvs_name(spider_name)
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
import json
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
4
6
|
|
|
7
|
+
from crawlee import service_locator
|
|
5
8
|
from crawlee._consts import METADATA_FILENAME
|
|
6
9
|
|
|
7
|
-
from apify import Configuration
|
|
8
|
-
from apify.storage_clients._file_system import ApifyFileSystemKeyValueStoreClient
|
|
10
|
+
from apify import Actor, Configuration
|
|
11
|
+
from apify.storage_clients._file_system import ApifyFileSystemKeyValueStoreClient, ApifyFileSystemStorageClient
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from pathlib import Path
|
|
9
15
|
|
|
10
16
|
|
|
11
17
|
async def test_purge_preserves_input_file_and_metadata() -> None:
|
|
@@ -23,18 +29,21 @@ async def test_purge_preserves_input_file_and_metadata() -> None:
|
|
|
23
29
|
kvs_path = kvs_storage_client.path_to_kvs
|
|
24
30
|
|
|
25
31
|
# Create various files
|
|
26
|
-
input_file = kvs_path / f'{configuration.input_key}
|
|
32
|
+
input_file = kvs_path / f'{configuration.input_key}'
|
|
33
|
+
input_metadata_file = kvs_path / f'{configuration.input_key}.{METADATA_FILENAME}.json'
|
|
27
34
|
metadata_file = kvs_path / METADATA_FILENAME
|
|
28
35
|
regular_file1 = kvs_path / 'regular_file1.json'
|
|
29
36
|
regular_file2 = kvs_path / 'another_file.txt'
|
|
30
37
|
|
|
31
38
|
# Write content to files
|
|
32
39
|
await asyncio.to_thread(input_file.write_text, '{"test": "input"}')
|
|
40
|
+
await asyncio.to_thread(input_metadata_file.write_text, 'some text content')
|
|
33
41
|
await asyncio.to_thread(regular_file1.write_text, '{"test": "data1"}')
|
|
34
42
|
await asyncio.to_thread(regular_file2.write_text, 'some text content')
|
|
35
43
|
|
|
36
44
|
# Verify all files exist before purge
|
|
37
45
|
assert input_file.exists()
|
|
46
|
+
assert input_metadata_file.exists()
|
|
38
47
|
assert metadata_file.exists() # Should exist from client creation
|
|
39
48
|
assert regular_file1.exists()
|
|
40
49
|
assert regular_file2.exists()
|
|
@@ -53,3 +62,21 @@ async def test_purge_preserves_input_file_and_metadata() -> None:
|
|
|
53
62
|
# Verify INPUT.json content is unchanged
|
|
54
63
|
input_content = await asyncio.to_thread(input_file.read_text)
|
|
55
64
|
assert input_content == '{"test": "input"}'
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
async def test_pre_existing_input_used_by_actor(tmp_path: Path) -> None:
|
|
68
|
+
pre_existing_input = {
|
|
69
|
+
'foo': 'bar',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
configuration = Configuration.get_global_configuration()
|
|
73
|
+
# Create pre-existing INPUT.json file
|
|
74
|
+
path_to_input = tmp_path / 'key_value_stores' / 'default'
|
|
75
|
+
path_to_input.mkdir(parents=True)
|
|
76
|
+
(path_to_input / f'{configuration.input_key}.json').write_text(json.dumps(pre_existing_input))
|
|
77
|
+
|
|
78
|
+
# Remove this line after https://github.com/apify/apify-sdk-python/pull/576
|
|
79
|
+
service_locator.set_storage_client(ApifyFileSystemStorageClient())
|
|
80
|
+
|
|
81
|
+
async with Actor():
|
|
82
|
+
assert pre_existing_input == await Actor.get_input()
|
|
@@ -68,7 +68,7 @@ def test_decryption_fails_with_invalid_password() -> None:
|
|
|
68
68
|
encrypted = public_encrypt(test_value, public_key=PUBLIC_KEY)
|
|
69
69
|
encrypted['encrypted_password'] = base64.b64encode(b'invalid_password').decode('utf-8')
|
|
70
70
|
|
|
71
|
-
with pytest.raises(ValueError, match='Ciphertext length must be equal to key size.'):
|
|
71
|
+
with pytest.raises(ValueError, match=r'Ciphertext length must be equal to key size.'):
|
|
72
72
|
private_decrypt(**encrypted, private_key=PRIVATE_KEY)
|
|
73
73
|
|
|
74
74
|
|
|
@@ -79,7 +79,7 @@ def test_decryption_fails_with_manipulated_cipher() -> None:
|
|
|
79
79
|
b'invalid_cipher' + base64.b64decode(encrypted['encrypted_value'].encode('utf-8')),
|
|
80
80
|
).decode('utf-8')
|
|
81
81
|
|
|
82
|
-
with pytest.raises(ValueError, match='Decryption failed, malformed encrypted value or password.'):
|
|
82
|
+
with pytest.raises(ValueError, match=r'Decryption failed, malformed encrypted value or password.'):
|
|
83
83
|
private_decrypt(**encrypted, private_key=PRIVATE_KEY)
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,19 +88,19 @@ def test_invalid_arguments() -> None:
|
|
|
88
88
|
with pytest.raises(ValueError, match=match_pattern):
|
|
89
89
|
ProxyConfiguration(country_code=invalid_country_code) # type: ignore[arg-type]
|
|
90
90
|
|
|
91
|
-
with pytest.raises(ValueError, match='Exactly one of .* must be specified'):
|
|
91
|
+
with pytest.raises(ValueError, match=r'Exactly one of .* must be specified'):
|
|
92
92
|
ProxyConfiguration(
|
|
93
93
|
proxy_urls=['http://proxy.com:1111'],
|
|
94
94
|
new_url_function=lambda session_id=None, request=None: 'http://proxy.com:2222',
|
|
95
95
|
)
|
|
96
96
|
|
|
97
|
-
with pytest.raises(ValueError, match='Cannot combine custom proxies with Apify Proxy'):
|
|
97
|
+
with pytest.raises(ValueError, match=r'Cannot combine custom proxies with Apify Proxy'):
|
|
98
98
|
ProxyConfiguration(proxy_urls=['http://proxy.com:1111'], groups=['GROUP1'])
|
|
99
99
|
|
|
100
100
|
with pytest.raises(ValueError, match=re.escape('bad-url')):
|
|
101
101
|
ProxyConfiguration(proxy_urls=['bad-url'])
|
|
102
102
|
|
|
103
|
-
with pytest.raises(ValueError, match='Cannot combine custom proxies with Apify Proxy'):
|
|
103
|
+
with pytest.raises(ValueError, match=r'Cannot combine custom proxies with Apify Proxy'):
|
|
104
104
|
ProxyConfiguration(
|
|
105
105
|
new_url_function=lambda session_id=None, request=None: 'http://proxy.com:2222', groups=['GROUP1']
|
|
106
106
|
)
|
|
@@ -241,7 +241,7 @@ async def test_invalid_custom_new_url_function() -> None:
|
|
|
241
241
|
|
|
242
242
|
proxy_configuration = ProxyConfiguration(new_url_function=custom_new_url_function)
|
|
243
243
|
|
|
244
|
-
with pytest.raises(ValueError, match='The provided "new_url_function" did not return a valid URL'):
|
|
244
|
+
with pytest.raises(ValueError, match=r'The provided "new_url_function" did not return a valid URL'):
|
|
245
245
|
await proxy_configuration.new_url()
|
|
246
246
|
|
|
247
247
|
|
|
@@ -416,7 +416,7 @@ async def test_initialize_with_valid_configuration(
|
|
|
416
416
|
async def test_initialize_without_password_or_token() -> None:
|
|
417
417
|
proxy_configuration = ProxyConfiguration()
|
|
418
418
|
|
|
419
|
-
with pytest.raises(ValueError, match='Apify Proxy password must be provided'):
|
|
419
|
+
with pytest.raises(ValueError, match=r'Apify Proxy password must be provided'):
|
|
420
420
|
await proxy_configuration.initialize()
|
|
421
421
|
|
|
422
422
|
|
|
@@ -472,10 +472,8 @@ async def test_initialize_prefering_password_from_env_over_calling_api(
|
|
|
472
472
|
|
|
473
473
|
|
|
474
474
|
@pytest.mark.usefixtures('patched_impit_client')
|
|
475
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
476
475
|
async def test_initialize_with_manual_password_different_than_user_one(
|
|
477
476
|
monkeypatch: pytest.MonkeyPatch,
|
|
478
|
-
caplog: pytest.LogCaptureFixture,
|
|
479
477
|
httpserver: HTTPServer,
|
|
480
478
|
patched_apify_client: ApifyClientAsync,
|
|
481
479
|
) -> None:
|
|
@@ -501,10 +499,6 @@ async def test_initialize_with_manual_password_different_than_user_one(
|
|
|
501
499
|
assert proxy_configuration._password == different_dummy_password
|
|
502
500
|
assert proxy_configuration.is_man_in_the_middle is True
|
|
503
501
|
|
|
504
|
-
assert len(caplog.records) == 1
|
|
505
|
-
assert caplog.records[0].levelname == 'WARNING'
|
|
506
|
-
assert 'The Apify Proxy password you provided belongs to a different user' in caplog.records[0].message
|
|
507
|
-
|
|
508
502
|
|
|
509
503
|
@pytest.mark.usefixtures('patched_impit_client')
|
|
510
504
|
async def test_initialize_when_not_connected(monkeypatch: pytest.MonkeyPatch, httpserver: HTTPServer) -> None:
|
|
@@ -526,7 +520,6 @@ async def test_initialize_when_not_connected(monkeypatch: pytest.MonkeyPatch, ht
|
|
|
526
520
|
await proxy_configuration.initialize()
|
|
527
521
|
|
|
528
522
|
|
|
529
|
-
@pytest.mark.skip(reason='There are issues with log propagation to caplog, see issue #462.')
|
|
530
523
|
async def test_initialize_when_status_page_unavailable(
|
|
531
524
|
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture, httpserver: HTTPServer
|
|
532
525
|
) -> None:
|