apify 4.0.2b2__tar.gz → 4.0.2b3__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.
Files changed (67) hide show
  1. {apify-4.0.2b2 → apify-4.0.2b3}/CHANGELOG.md +1 -0
  2. {apify-4.0.2b2 → apify-4.0.2b3}/PKG-INFO +1 -1
  3. {apify-4.0.2b2 → apify-4.0.2b3}/pyproject.toml +1 -1
  4. {apify-4.0.2b2 → apify-4.0.2b3}/pyproject.toml.orig +1 -1
  5. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_request_queue_single_client.py +8 -2
  6. {apify-4.0.2b2 → apify-4.0.2b3}/CONTRIBUTING.md +0 -0
  7. {apify-4.0.2b2 → apify-4.0.2b3}/LICENSE +0 -0
  8. {apify-4.0.2b2 → apify-4.0.2b3}/README.md +0 -0
  9. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/__init__.py +0 -0
  10. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_actor.py +0 -0
  11. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_charging.py +0 -0
  12. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_configuration.py +0 -0
  13. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_consts.py +0 -0
  14. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_crypto.py +0 -0
  15. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_proxy_configuration.py +0 -0
  16. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_utils.py +0 -0
  17. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/_webhook.py +0 -0
  18. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/errors.py +0 -0
  19. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/events/__init__.py +0 -0
  20. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/events/_apify_event_manager.py +0 -0
  21. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/events/_types.py +0 -0
  22. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/events/py.typed +0 -0
  23. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/log.py +0 -0
  24. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/py.typed +0 -0
  25. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/request_loaders/__init__.py +0 -0
  26. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/request_loaders/_apify_request_list.py +0 -0
  27. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/request_loaders/py.typed +0 -0
  28. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/__init__.py +0 -0
  29. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/_actor_runner.py +0 -0
  30. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/_async_thread.py +0 -0
  31. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/_detection.py +0 -0
  32. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/_logging_config.py +0 -0
  33. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/_serialization.py +0 -0
  34. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/extensions/__init__.py +0 -0
  35. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/extensions/_httpcache.py +0 -0
  36. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/middlewares/__init__.py +0 -0
  37. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/middlewares/apify_proxy.py +0 -0
  38. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/middlewares/py.typed +0 -0
  39. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/pipelines/__init__.py +0 -0
  40. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/pipelines/actor_dataset_push.py +0 -0
  41. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/pipelines/py.typed +0 -0
  42. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/py.typed +0 -0
  43. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/requests.py +0 -0
  44. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/scheduler.py +0 -0
  45. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/scrapy/utils.py +0 -0
  46. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/__init__.py +0 -0
  47. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/__init__.py +0 -0
  48. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_alias_resolving.py +0 -0
  49. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_api_client_creation.py +0 -0
  50. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_dataset_client.py +0 -0
  51. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_key_value_store_client.py +0 -0
  52. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_models.py +0 -0
  53. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_request_queue_client.py +0 -0
  54. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_request_queue_shared_client.py +0 -0
  55. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_storage_client.py +0 -0
  56. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/_utils.py +0 -0
  57. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_apify/py.typed +0 -0
  58. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_file_system/__init__.py +0 -0
  59. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_file_system/_dataset_client.py +0 -0
  60. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_file_system/_key_value_store_client.py +0 -0
  61. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_file_system/_storage_client.py +0 -0
  62. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_ppe_dataset_mixin.py +0 -0
  63. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_smart_apify/__init__.py +0 -0
  64. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/_smart_apify/_storage_client.py +0 -0
  65. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storage_clients/py.typed +0 -0
  66. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storages/__init__.py +0 -0
  67. {apify-4.0.2b2 → apify-4.0.2b3}/src/apify/storages/py.typed +0 -0
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
9
9
 
10
10
  - Prolong and track shared request queue locks to prevent duplicate processing ([#1062](https://github.com/apify/apify-sdk-python/pull/1062)) ([ccaad7b](https://github.com/apify/apify-sdk-python/commit/ccaad7b71cd6cd1ddc2c71e5e9d9780001f2688a)) by [@vdusek](https://github.com/vdusek)
11
11
  - Verify shared request queue is_finished against per-request reads ([#1087](https://github.com/apify/apify-sdk-python/pull/1087)) ([22613aa](https://github.com/apify/apify-sdk-python/commit/22613aac0ce4e6ef852d5d3daf8c1a25cb3731e3)) by [@vdusek](https://github.com/vdusek)
12
+ - Keep non-forefront reclaimed requests pending in the single request queue client ([#1060](https://github.com/apify/apify-sdk-python/pull/1060)) ([b61890c](https://github.com/apify/apify-sdk-python/commit/b61890cf286c3a83faedac69315acff74b5fba5b)) by [@vdusek](https://github.com/vdusek)
12
13
 
13
14
 
14
15
  <!-- git-cliff-unreleased-end -->
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apify
3
- Version: 4.0.2b2
3
+ Version: 4.0.2b3
4
4
  Summary: Apify SDK for Python
5
5
  Keywords: apify,sdk,automation,chrome,crawlee,crawler,headless,scraper,scraping
6
6
  Author: Apify Technologies s.r.o.
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify"
7
- version = "4.0.2b2"
7
+ version = "4.0.2b3"
8
8
  description = "Apify SDK for Python"
9
9
  license = "Apache-2.0"
10
10
  license-files = ["LICENSE"]
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify"
7
- version = "4.0.2b2"
7
+ version = "4.0.2b3"
8
8
  description = "Apify SDK for Python"
9
9
  authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
10
10
  license = "Apache-2.0"
@@ -82,7 +82,10 @@ class ApifyRequestQueueSingleClient:
82
82
  """LRU cache storing unhandled request objects, keyed by request ID."""
83
83
 
84
84
  self._head_requests: deque[str] = deque()
85
- """Ordered queue of request IDs representing the local estimate of the queue head."""
85
+ """Ordered queue of request IDs representing the local estimate of the queue head.
86
+
87
+ Served from the right end, so `append` places a request at the top of the head and `appendleft` at the bottom.
88
+ """
86
89
 
87
90
  self._requests_already_handled: set[str] = set()
88
91
  """Set of request IDs known to be already processed on the platform.
@@ -303,9 +306,12 @@ class ApifyRequestQueueSingleClient:
303
306
  # No longer handled
304
307
  self._requests_already_handled.discard(request_id)
305
308
 
309
+ # `is_empty` reads only the head estimation, so the reclaimed request has to go back into it until the
310
+ # platform head listing catches up. Placement mirrors `add_batch_of_requests`.
306
311
  if forefront:
307
- # Append to top of the local head estimation
308
312
  self._head_requests.append(request_id)
313
+ else:
314
+ self._head_requests.appendleft(request_id)
309
315
 
310
316
  processed_request = await self._update_request(request, forefront=forefront)
311
317
  processed_request.id = request_id
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