apify 1.1.4b1__tar.gz → 1.1.4b3__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.

Files changed (38) hide show
  1. {apify-1.1.4b1/src/apify.egg-info → apify-1.1.4b3}/PKG-INFO +1 -1
  2. {apify-1.1.4b1 → apify-1.1.4b3}/pyproject.toml +1 -3
  3. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/request_queue.py +9 -9
  4. {apify-1.1.4b1 → apify-1.1.4b3/src/apify.egg-info}/PKG-INFO +1 -1
  5. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify.egg-info/requires.txt +0 -1
  6. {apify-1.1.4b1 → apify-1.1.4b3}/LICENSE +0 -0
  7. {apify-1.1.4b1 → apify-1.1.4b3}/README.md +0 -0
  8. {apify-1.1.4b1 → apify-1.1.4b3}/setup.cfg +0 -0
  9. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/__init__.py +0 -0
  10. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_crypto.py +0 -0
  11. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/__init__.py +0 -0
  12. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/file_storage_utils.py +0 -0
  13. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/memory_storage_client.py +0 -0
  14. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/__init__.py +0 -0
  15. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/base_resource_client.py +0 -0
  16. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/base_resource_collection_client.py +0 -0
  17. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/dataset.py +0 -0
  18. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/dataset_collection.py +0 -0
  19. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/key_value_store.py +0 -0
  20. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/key_value_store_collection.py +0 -0
  21. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/request_queue.py +0 -0
  22. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_memory_storage/resource_clients/request_queue_collection.py +0 -0
  23. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/_utils.py +0 -0
  24. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/actor.py +0 -0
  25. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/config.py +0 -0
  26. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/consts.py +0 -0
  27. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/event_manager.py +0 -0
  28. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/log.py +0 -0
  29. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/proxy_configuration.py +0 -0
  30. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/py.typed +0 -0
  31. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/__init__.py +0 -0
  32. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/base_storage.py +0 -0
  33. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/dataset.py +0 -0
  34. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/key_value_store.py +0 -0
  35. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify/storages/storage_client_manager.py +0 -0
  36. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify.egg-info/SOURCES.txt +0 -0
  37. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify.egg-info/dependency_links.txt +0 -0
  38. {apify-1.1.4b1 → apify-1.1.4b3}/src/apify.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify
3
- Version: 1.1.4b1
3
+ Version: 1.1.4b3
4
4
  Summary: Apify SDK for Python
5
5
  Author-email: "Apify Technologies s.r.o." <support@apify.com>
6
6
  License: Apache Software License
@@ -2,7 +2,7 @@
2
2
 
3
3
  name = "apify"
4
4
 
5
- version = "1.1.4b1"
5
+ version = "1.1.4b3"
6
6
  description = "Apify SDK for Python"
7
7
 
8
8
  readme = "README.md"
@@ -125,8 +125,6 @@ dev = [
125
125
 
126
126
  "pytest-only ~= 2.0.0",
127
127
 
128
- "pytest-randomly ~= 3.12.0",
129
-
130
128
  "pytest-timeout ~= 2.1.0",
131
129
 
132
130
  "pytest-xdist ~= 3.3.1",
@@ -1,7 +1,7 @@
1
1
  import asyncio
2
2
  from collections import OrderedDict
3
3
  from datetime import datetime, timezone
4
- from typing import Coroutine, Dict, Optional
4
+ from typing import Dict, Optional
5
5
  from typing import OrderedDict as OrderedDictType
6
6
  from typing import Set, Union
7
7
 
@@ -75,7 +75,7 @@ class RequestQueue(BaseStorage):
75
75
  _request_queue_client: Union[RequestQueueClientAsync, RequestQueueClient]
76
76
  _client_key = _crypto_random_object_id()
77
77
  _queue_head_dict: OrderedDictType[str, str]
78
- _query_queue_head_promise: Optional[Coroutine]
78
+ _query_queue_head_task: Optional[asyncio.Task]
79
79
  _in_progress: Set[str]
80
80
  _last_activity: datetime
81
81
  _internal_timeout_seconds = 5 * 60
@@ -100,7 +100,7 @@ class RequestQueue(BaseStorage):
100
100
 
101
101
  self._request_queue_client = client.request_queue(self._id, client_key=self._client_key)
102
102
  self._queue_head_dict = OrderedDict()
103
- self._query_queue_head_promise = None
103
+ self._query_queue_head_task = None
104
104
  self._in_progress = set()
105
105
  self._last_activity = datetime.now(timezone.utc)
106
106
  self._recently_handled = LRUCache[bool](max_length=RECENTLY_HANDLED_CACHE_SIZE)
@@ -369,7 +369,7 @@ class RequestQueue(BaseStorage):
369
369
 
370
370
  def _reset(self) -> None:
371
371
  self._queue_head_dict.clear()
372
- self._query_queue_head_promise = None
372
+ self._query_queue_head_task = None
373
373
  self._in_progress.clear()
374
374
  self._recently_handled.clear()
375
375
  self._assumed_total_count = 0
@@ -402,7 +402,7 @@ class RequestQueue(BaseStorage):
402
402
  })
403
403
 
404
404
  # This is needed so that the next call to _ensureHeadIsNonEmpty() will fetch the queue head again.
405
- self._query_queue_head_promise = None
405
+ self._query_queue_head_task = None
406
406
 
407
407
  return {
408
408
  'wasLimitReached': len(list_head['items']) >= limit,
@@ -420,15 +420,15 @@ class RequestQueue(BaseStorage):
420
420
  if limit is None:
421
421
  limit = max(self._in_progress_count() * QUERY_HEAD_BUFFER, QUERY_HEAD_MIN_LENGTH)
422
422
 
423
- if self._query_queue_head_promise is None:
424
- self._query_queue_head_promise = self._queue_query_head(limit)
423
+ if self._query_queue_head_task is None:
424
+ self._query_queue_head_task = asyncio.Task(self._queue_query_head(limit))
425
425
 
426
- queue_head = await self._query_queue_head_promise
426
+ queue_head = await self._query_queue_head_task
427
427
 
428
428
  # TODO: I feel this code below can be greatly simplified... (comes from TS implementation *wink*)
429
429
 
430
430
  """ If queue is still empty then one of the following holds:
431
- - the other calls waiting for this promise already consumed all the returned requests
431
+ - the other calls waiting for this task already consumed all the returned requests
432
432
  - the limit was too low and contained only requests in progress
433
433
  - the writes from other clients were not propagated yet
434
434
  - the whole queue was processed and we are done
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify
3
- Version: 1.1.4b1
3
+ Version: 1.1.4b3
4
4
  Summary: Apify SDK for Python
5
5
  Author-email: "Apify Technologies s.r.o." <support@apify.com>
6
6
  License: Apache Software License
@@ -35,7 +35,6 @@ pre-commit~=3.3.2
35
35
  pytest~=7.3.1
36
36
  pytest-asyncio~=0.21.0
37
37
  pytest-only~=2.0.0
38
- pytest-randomly~=3.12.0
39
38
  pytest-timeout~=2.1.0
40
39
  pytest-xdist~=3.3.1
41
40
  respx~=0.20.1
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