apify 1.7.3b2__py3-none-any.whl → 1.7.3b4__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.

Potentially problematic release.


This version of apify might be problematic. Click here for more details.

@@ -50,7 +50,7 @@ class BaseResourceClient(ABC):
50
50
  @classmethod
51
51
  @abstractmethod
52
52
  def _get_storage_client_cache(
53
- cls, # noqa: ANN102 # type annotated cls does not work with Self as a return type
53
+ cls,
54
54
  memory_storage_client: MemoryStorageClient,
55
55
  ) -> list[Self]:
56
56
  raise NotImplementedError('You must override this method in the subclass!')
@@ -62,7 +62,7 @@ class BaseResourceClient(ABC):
62
62
  @classmethod
63
63
  @abstractmethod
64
64
  def _create_from_directory(
65
- cls, # noqa: ANN102 # type annotated cls does not work with Self as a return type
65
+ cls,
66
66
  storage_directory: str,
67
67
  memory_storage_client: MemoryStorageClient,
68
68
  id: str | None = None, # noqa: A002
@@ -72,7 +72,7 @@ class BaseResourceClient(ABC):
72
72
 
73
73
  @classmethod
74
74
  def _find_or_create_client_by_id_or_name(
75
- cls, # noqa: ANN102 # type annotated cls does not work with Self as a return type
75
+ cls,
76
76
  memory_storage_client: MemoryStorageClient,
77
77
  id: str | None = None, # noqa: A002
78
78
  name: str | None = None,
apify/_utils.py CHANGED
@@ -208,9 +208,7 @@ def get_memory_usage_bytes() -> int:
208
208
 
209
209
 
210
210
  def maybe_parse_bool(val: str | None) -> bool:
211
- if val in {'true', 'True', '1'}:
212
- return True
213
- return False
211
+ return val in {'true', 'True', '1'}
214
212
 
215
213
 
216
214
  def maybe_parse_datetime(val: str) -> datetime | str:
apify/log.py CHANGED
@@ -76,7 +76,7 @@ class ActorLogFormatter(logging.Formatter):
76
76
  extra_fields: dict[str, Any] = {}
77
77
  for key, value in record.__dict__.items():
78
78
  if key not in self.empty_record.__dict__:
79
- extra_fields[key] = value
79
+ extra_fields[key] = value # noqa: PERF403
80
80
 
81
81
  return extra_fields
82
82
 
@@ -325,7 +325,7 @@ class ProxyConfiguration:
325
325
  proxy_status_url = f'{self._actor_config.proxy_status_url}/?format=json'
326
326
 
327
327
  status = None
328
- async with httpx.AsyncClient(proxies=await self.new_url()) as client:
328
+ async with httpx.AsyncClient(proxies=await self.new_url(), timeout=10) as client:
329
329
  for _ in range(2):
330
330
  try:
331
331
  response = await client.get(proxy_status_url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify
3
- Version: 1.7.3b2
3
+ Version: 1.7.3b4
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
@@ -38,7 +38,7 @@ Requires-Dist: typing-extensions >=4.1.0
38
38
  Requires-Dist: websockets >=10.1
39
39
  Provides-Extra: dev
40
40
  Requires-Dist: build ~=1.2.0 ; extra == 'dev'
41
- Requires-Dist: filelock ~=3.15.1 ; extra == 'dev'
41
+ Requires-Dist: filelock ~=3.15.0 ; extra == 'dev'
42
42
  Requires-Dist: mypy ~=1.10.0 ; extra == 'dev'
43
43
  Requires-Dist: pre-commit ~=3.5.0 ; extra == 'dev'
44
44
  Requires-Dist: pydoc-markdown ~=4.8.0 ; extra == 'dev'
@@ -49,12 +49,12 @@ Requires-Dist: pytest-only ~=2.1.0 ; extra == 'dev'
49
49
  Requires-Dist: pytest-timeout ~=2.3.0 ; extra == 'dev'
50
50
  Requires-Dist: pytest-xdist ~=3.6.0 ; extra == 'dev'
51
51
  Requires-Dist: respx ~=0.21.0 ; extra == 'dev'
52
- Requires-Dist: ruff ~=0.4.0 ; extra == 'dev'
53
- Requires-Dist: setuptools ~=70.1.0 ; extra == 'dev'
52
+ Requires-Dist: ruff ~=0.5.0 ; extra == 'dev'
53
+ Requires-Dist: setuptools ~=70.3.0 ; extra == 'dev'
54
54
  Requires-Dist: twine ~=5.1.0 ; extra == 'dev'
55
- Requires-Dist: types-aiofiles ~=23.2.0.20240403 ; extra == 'dev'
55
+ Requires-Dist: types-aiofiles ~=24.1.0.20240626 ; extra == 'dev'
56
56
  Requires-Dist: types-colorama ~=0.4.15.20240311 ; extra == 'dev'
57
- Requires-Dist: types-psutil ~=5.9.5.20240516 ; extra == 'dev'
57
+ Requires-Dist: types-psutil ~=6.0.0.20240621 ; extra == 'dev'
58
58
  Provides-Extra: scrapy
59
59
  Requires-Dist: scrapy >=2.11.0 ; extra == 'scrapy'
60
60
 
@@ -1,18 +1,18 @@
1
1
  apify/__init__.py,sha256=aAjho-r0-XAqUjD9j55ueCo4lZJzyytOWjk0VCmkeeY,283
2
2
  apify/_crypto.py,sha256=mbqwfgVz7efAw6ko1PTtpaaRqlBvTi-oskiZmWufTrk,5822
3
- apify/_utils.py,sha256=7_iHGRw8AZA7ITStg5cN8k_ZmqMKdAQ_ev2ZRcO3X0M,16963
3
+ apify/_utils.py,sha256=vh4VKoaBe_aWz-eEPOFj6bkUvgDmaUkdw3CLpP9RyT4,16929
4
4
  apify/actor.py,sha256=lwgE9huMDVgw8ehTFNrZAk5hwSlQNGuYeBx6aKcHiBM,60423
5
5
  apify/config.py,sha256=1orNGYPiqcT_3Q8_DPRIpX1LjicqzK6e_nvMaGcU1ng,9045
6
6
  apify/consts.py,sha256=eSD23HmwLKwWG8bRp5O1c7bmtlhvYE17Yw46BKs4vQQ,2263
7
7
  apify/event_manager.py,sha256=k4_f977esIOvgGshec4yUSulU10-UsEkoVEV4sZEjwg,10612
8
- apify/log.py,sha256=PObD-34j4GFUTLHHWDfgdd39ftfERBQBTc2DyvPJT3o,5005
9
- apify/proxy_configuration.py,sha256=ZMNZHj0EQDPuXKdjcVP3eXazCRYUkmYR6hUlVyonUhk,15735
8
+ apify/log.py,sha256=iNAUOk5BscZzkppBjFJm2XpydwkXKm45UsUkxHWu43E,5022
9
+ apify/proxy_configuration.py,sha256=SuHKY8ORdQThbBtgyW2t_nHDE6GUHm1bPlohHd8JyNg,15747
10
10
  apify/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  apify/_memory_storage/__init__.py,sha256=frNb9kh6bfKtZNEMe2PA_QlT6DTUbhffcNfWhELiZNQ,90
12
12
  apify/_memory_storage/file_storage_utils.py,sha256=83gd8ruzY_vkrpHT1ZeG3r8qJJKCKLeuGrxsBQgXeAE,2266
13
13
  apify/_memory_storage/memory_storage_client.py,sha256=5v6tUjzFIW7Mpr4iK0tERysRwgTt5TeEDoyjqTXjf-o,10598
14
14
  apify/_memory_storage/resource_clients/__init__.py,sha256=afkbzv59lgBe_JCgJcTbAt-ayX0VjtO6u0ExI7JVkEk,705
15
- apify/_memory_storage/resource_clients/base_resource_client.py,sha256=YbjqNvRU34mBw3zVyGVN60k5Me4Koq1D2hFHF3oUBYA,5163
15
+ apify/_memory_storage/resource_clients/base_resource_client.py,sha256=EXLXVppYdjDG5-2xd7Kpr2ziLDm5j01E9MBUQnXD8Xc,4929
16
16
  apify/_memory_storage/resource_clients/base_resource_collection_client.py,sha256=et-ChUnuLPnk_dYXG9kyPsvY9seM-5WIjYfGC5cMDeo,3986
17
17
  apify/_memory_storage/resource_clients/dataset.py,sha256=ySPzEQXeopwKLNhlEGvYl9KvuGz5u86piHWT2xDns6w,20062
18
18
  apify/_memory_storage/resource_clients/dataset_collection.py,sha256=tk5GUb1azeHQwFuX106AhGt7I_1sHWSV2n952-p4rug,1614
@@ -34,8 +34,8 @@ apify/storages/dataset.py,sha256=gfMlJ6dSXDdjCykkStZCyp4u8xKCIZqflGS9-jLzK74,233
34
34
  apify/storages/key_value_store.py,sha256=BUGYPI4MuRlOJ_aPzZr8bq7ay_K04qAZ7yKW7C8ItV4,10760
35
35
  apify/storages/request_queue.py,sha256=68pM2nJUYjkdpBTM315NnjRYE_yzeoslVtBQRB7bm74,28829
36
36
  apify/storages/storage_client_manager.py,sha256=fvXg3PRojATNamEN29BBZyZZ5GWN_s0r29A59aiL-wQ,2465
37
- apify-1.7.3b2.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
38
- apify-1.7.3b2.dist-info/METADATA,sha256=WwymNuY2K09klyssoylsU5Vsxj4pWOwUe0umebiXTp0,6307
39
- apify-1.7.3b2.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
40
- apify-1.7.3b2.dist-info/top_level.txt,sha256=2oFNsHggn5m_rCaaP7xijQg_-Va2ByOSYuvKgACsS5w,6
41
- apify-1.7.3b2.dist-info/RECORD,,
37
+ apify-1.7.3b4.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
38
+ apify-1.7.3b4.dist-info/METADATA,sha256=vFrOFeIofDIblK4qbGkAqXPz4tw7XHw9h4AyCzJgGWw,6307
39
+ apify-1.7.3b4.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
40
+ apify-1.7.3b4.dist-info/top_level.txt,sha256=2oFNsHggn5m_rCaaP7xijQg_-Va2ByOSYuvKgACsS5w,6
41
+ apify-1.7.3b4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5