scrapely-python 0.1.13__tar.gz → 0.1.14__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.
- {scrapely_python-0.1.13/src/scrapely_python.egg-info → scrapely_python-0.1.14}/PKG-INFO +1 -1
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/pyproject.toml +1 -1
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/__init__.py +1 -1
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/actor.py +17 -2
- {scrapely_python-0.1.13 → scrapely_python-0.1.14/src/scrapely_python.egg-info}/PKG-INFO +1 -1
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/LICENSE +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/LICENSE-APACHE +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/NOTICE +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/README.md +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/setup.cfg +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/_browser_locations.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/browser_configuration.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/cdp_retry.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/charging.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/charging_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/configuration.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/crypto/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/crypto/_secrets.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/errors.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/events/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/events/_types.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/events/event_manager.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/log.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/patch_browser_pool.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/pricing_types.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/proxy_configuration.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/py.typed +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/request_loaders/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/request_loaders/_scrapely_request_list.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/_file_system/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/_file_system/_key_value_store_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/_file_system/_storage_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/_metadata.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/api_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/patch_storage.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_dataset_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_kvs_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_rq_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_storage_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/smart_scrapely_storage_client.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/types.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/utils.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage_clients/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storages/__init__.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/types.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/webhook.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/SOURCES.txt +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/dependency_links.txt +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/requires.txt +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/top_level.txt +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_api_client_retries.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_apify_parity.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_browser_configuration.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_cdp_retry.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_charge_limit_guard.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_charge_retries.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_charging_parity.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_charging_pending.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_input_proxy_aliases.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_parity.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_patch_browser_pool.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_proxy_configuration.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_run_control.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_secrets.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_storage.py +0 -0
- {scrapely_python-0.1.13 → scrapely_python-0.1.14}/tests/test_terminal_status_message.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scrapely-python"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.14"
|
|
8
8
|
description = "Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT AND Apache-2.0"
|
|
@@ -213,6 +213,14 @@ class _ClassProperty:
|
|
|
213
213
|
return self.func(owner)
|
|
214
214
|
|
|
215
215
|
|
|
216
|
+
def _system_exit_code(exc: Any) -> int:
|
|
217
|
+
"""Process exit code carried by a SystemExit (sys.exit semantics)."""
|
|
218
|
+
code = getattr(exc, 'code', None)
|
|
219
|
+
if code is None:
|
|
220
|
+
return 0
|
|
221
|
+
return code if isinstance(code, int) else 1
|
|
222
|
+
|
|
223
|
+
|
|
216
224
|
class _ActorMeta(type):
|
|
217
225
|
"""Metaclass enabling async with Actor: by delegating to classmethods."""
|
|
218
226
|
|
|
@@ -226,7 +234,11 @@ class _ActorMeta(type):
|
|
|
226
234
|
return cls
|
|
227
235
|
|
|
228
236
|
async def __aexit__(cls, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
|
|
229
|
-
if exc_type is not None:
|
|
237
|
+
if exc_type is not None and issubclass(exc_type, SystemExit):
|
|
238
|
+
# Actor.exit()/fail()/sys.exit() inside `async with Actor:` is a deliberate
|
|
239
|
+
# exit, not a failure (Apify parity): keep its exit code, log nothing.
|
|
240
|
+
cls._exit_code = _system_exit_code(exc_val)
|
|
241
|
+
elif exc_type is not None:
|
|
230
242
|
cls._exit_code = 1
|
|
231
243
|
logger.error(f'Actor failed: {exc_val}')
|
|
232
244
|
await cls._shutdown()
|
|
@@ -286,7 +298,10 @@ class Actor(metaclass=_ActorMeta):
|
|
|
286
298
|
|
|
287
299
|
async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
|
|
288
300
|
cls = type(self)
|
|
289
|
-
if exc_type is not None:
|
|
301
|
+
if exc_type is not None and issubclass(exc_type, SystemExit):
|
|
302
|
+
# Deliberate exit via Actor.exit()/fail()/sys.exit(), not a failure.
|
|
303
|
+
cls._exit_code = _system_exit_code(exc_val)
|
|
304
|
+
elif exc_type is not None:
|
|
290
305
|
cls._exit_code = 1
|
|
291
306
|
logger.error(f'Actor failed: {exc_val}')
|
|
292
307
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/_file_system/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_dataset_client.py
RENAMED
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_kvs_client.py
RENAMED
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_rq_client.py
RENAMED
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely/storage/scrapely_storage_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scrapely_python-0.1.13 → scrapely_python-0.1.14}/src/scrapely_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|