scrapely-python 0.1.35__py3-none-any.whl → 0.1.36__py3-none-any.whl

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/__init__.py CHANGED
@@ -227,7 +227,7 @@ if TYPE_CHECKING: # Static analysers and IDEs see the lazy names as plain impor
227
227
  set_api_storage,
228
228
  )
229
229
 
230
- __version__ = '0.1.35'
230
+ __version__ = '0.1.36'
231
231
  __all__ = [
232
232
  # Core
233
233
  'Actor',
@@ -40,11 +40,13 @@ def is_retryable_response(
40
40
 
41
41
  429 always: the run API limiter and dataset backpressure refuse it before
42
42
  anything is written. Idempotent methods: also 500/502/503/504. Others
43
- (dataset push, KV PUT) only on a 503 that certainly was not processed: the
44
- rate limiter refused it ("rate-limit-unavailable", before the handler), or
45
- HAProxy had no backend (its own page, nothing forwarded). Any other 503 may
46
- mean "outcome unknown" (a direct dataset write whose commit was not
47
- confirmed), and re-sending could store the items twice.
43
+ (dataset push, KV PUT, named storage create) only on a 503 that certainly
44
+ was not processed: the rate limiter refused it ("rate-limit-unavailable",
45
+ before the handler), another request held the storage name
46
+ ("storage-name-busy", nothing changed), or HAProxy had no backend (its own
47
+ page, nothing forwarded). Any other 503 may mean "outcome unknown" (a
48
+ direct dataset write whose commit was not confirmed), and re-sending could
49
+ store the items twice.
48
50
  """
49
51
  if status == 429:
50
52
  return True
@@ -52,7 +54,7 @@ def is_retryable_response(
52
54
  return status in (500, 502, 503, 504)
53
55
  if status != 503:
54
56
  return False
55
- return error_type == 'rate-limit-unavailable' or NO_BACKEND_MARKER in (body_text or '')
57
+ return error_type in ('rate-limit-unavailable', 'storage-name-busy') or NO_BACKEND_MARKER in (body_text or '')
56
58
 
57
59
 
58
60
  def unwrap_data(value: Any) -> Any:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrapely-python
3
- Version: 0.1.35
3
+ Version: 0.1.36
4
4
  Summary: Scrapely Python SDK - A toolkit for building Actors on the Scrapely platform
5
5
  Author-email: Scrapely <support@scrape.ly>
6
6
  License-Expression: MIT AND Apache-2.0
@@ -1,4 +1,4 @@
1
- scrapely/__init__.py,sha256=SmvxiukorN0XL3Y1vuRgnzxUfSfHd9waw2EHX_-06XU,9668
1
+ scrapely/__init__.py,sha256=s4_DjlvPueo-iDtrIFitFy8bj83rpZf88PCzadrBLQs,9668
2
2
  scrapely/_browser_locations.py,sha256=8QVVnkms2bDn3_LDYgYDR59MvFx8757l_JYnZ7xb3oI,145269
3
3
  scrapely/actor.py,sha256=z-kL24Y6m98v6lKLOxGYCnFmhVhaHJ6c0uOdYZW_4ak,93514
4
4
  scrapely/browser_configuration.py,sha256=jAZapNSHLFW05B96df4wNBtcyiiU9DA3ml0yTL1FwfA,5770
@@ -40,7 +40,7 @@ scrapely/scrapy/pipelines/__init__.py,sha256=gGUSWQtVC-7SvhvXbkQs0JlxpfezRMsBRVr
40
40
  scrapely/scrapy/pipelines/actor_dataset_push.py,sha256=6dL5Ulesqkjq3wOL2wnnGY0sC9gCoSUR9ouvBi5s5UA,924
41
41
  scrapely/storage/__init__.py,sha256=yN2gqhmPf3EVIekJpvJvKmEAYaE5zUA9oyUr8a2HQRo,3840
42
42
  scrapely/storage/_metadata.py,sha256=WWawBnVN0b1iK2K-SlxZXUc6czb5wXWf8iC_0tzkgAQ,4764
43
- scrapely/storage/api_client.py,sha256=IM0ZRvtNO2l_Y5qMt4shFLaIz2G9-10qtX9oBTBwM4Q,22866
43
+ scrapely/storage/api_client.py,sha256=61G2MIYlTnWzEuA4RRmBapBF0eGLNmdhrMzefciQuuo,22997
44
44
  scrapely/storage/client.py,sha256=VKieti-7RbEPGS9JlQS_vCUM8yD7GcFdjs8oSbKG7K0,23394
45
45
  scrapely/storage/patch_storage.py,sha256=6vOW5yjnZ8eiqb4XeF9dwa7rBQoa6XayyftVCrZcJ1w,8743
46
46
  scrapely/storage/scrapely_dataset_client.py,sha256=u5dnXxe1BAsq7rh-haR5W1ChE7UZ_k7B9ShR8YtwFkg,10695
@@ -55,10 +55,10 @@ scrapely/storage/_file_system/_key_value_store_client.py,sha256=1C22qY-RWlARzMyW
55
55
  scrapely/storage/_file_system/_storage_client.py,sha256=QHa3IULEb6AmgRFwpBqHD2OUTmtA_gl3lId-j6QdSFo,2027
56
56
  scrapely/storage_clients/__init__.py,sha256=q2pC-Rwe-BfHl018OyN_P0EDSx4-hNdxbk3pOCLLd4U,618
57
57
  scrapely/storages/__init__.py,sha256=kDNtd9VodjdHd4u7GzruJo0aB2HeiBN2_-HrkeqjmFg,139
58
- scrapely_python-0.1.35.dist-info/licenses/LICENSE,sha256=pQGY0XwjIYh-a2HfawxHq1en53bXkFkDj2Q70jKWHr4,1088
59
- scrapely_python-0.1.35.dist-info/licenses/LICENSE-APACHE,sha256=N8m0FzMq8i4UbTgXZvKEZJSD-27OF8pWZYS_atz4kTU,11355
60
- scrapely_python-0.1.35.dist-info/licenses/NOTICE,sha256=1ltrzKk2ez7x2BPNpXeyvOlTty5AfABYDBlwNilpORk,788
61
- scrapely_python-0.1.35.dist-info/METADATA,sha256=TxvBCz5CkTKVznM0IpAU7LGEpOYNyptkKi1DzSNeKWQ,3582
62
- scrapely_python-0.1.35.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
63
- scrapely_python-0.1.35.dist-info/top_level.txt,sha256=T4B9UMrs4q99QSAFyD1zdXhl40KnLhBKqrDkPhOTsmY,9
64
- scrapely_python-0.1.35.dist-info/RECORD,,
58
+ scrapely_python-0.1.36.dist-info/licenses/LICENSE,sha256=pQGY0XwjIYh-a2HfawxHq1en53bXkFkDj2Q70jKWHr4,1088
59
+ scrapely_python-0.1.36.dist-info/licenses/LICENSE-APACHE,sha256=N8m0FzMq8i4UbTgXZvKEZJSD-27OF8pWZYS_atz4kTU,11355
60
+ scrapely_python-0.1.36.dist-info/licenses/NOTICE,sha256=1ltrzKk2ez7x2BPNpXeyvOlTty5AfABYDBlwNilpORk,788
61
+ scrapely_python-0.1.36.dist-info/METADATA,sha256=DldPbnqjh5ENMWUJihZcilnLHBXXcNl6jVJQk-dDy9E,3582
62
+ scrapely_python-0.1.36.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
63
+ scrapely_python-0.1.36.dist-info/top_level.txt,sha256=T4B9UMrs4q99QSAFyD1zdXhl40KnLhBKqrDkPhOTsmY,9
64
+ scrapely_python-0.1.36.dist-info/RECORD,,