lacuscore 1.10.12__tar.gz → 1.11.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lacuscore
3
- Version: 1.10.12
3
+ Version: 1.11.0
4
4
  Summary: Core of Lacus, usable as a module
5
5
  Home-page: https://github.com/ail-project/LacusCore
6
6
  License: BSD-3-Clause
@@ -30,8 +30,8 @@ Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; python_version < "3.11"
30
30
  Requires-Dist: defang (>=0.5.3,<0.6.0)
31
31
  Requires-Dist: dnspython (>=2.6.1,<3.0.0)
32
32
  Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0) ; python_version < "3.10"
33
- Requires-Dist: playwrightcapture[recaptcha] (>=1.25.14,<2.0.0)
34
- Requires-Dist: pydantic (>=2.8.2,<3.0.0)
33
+ Requires-Dist: playwrightcapture[recaptcha] (>=1.26.0,<2.0.0)
34
+ Requires-Dist: pydantic (>=2.9.1,<3.0.0)
35
35
  Requires-Dist: redis[hiredis] (>=5.0.8,<6.0.0)
36
36
  Requires-Dist: requests (>=2.32.3,<3.0.0)
37
37
  Requires-Dist: ua-parser (>=0.18.0,<0.19.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Tuple, Dict, Optional, Union, Any, Set
5
+ from typing import Any
6
6
 
7
7
  from datetime import datetime, date
8
8
 
@@ -11,7 +11,7 @@ from redis import Redis
11
11
 
12
12
  class LacusCoreMonitoring():
13
13
 
14
- def __init__(self, redis_connector: Redis): # type: ignore[type-arg]
14
+ def __init__(self, redis_connector: Redis[str]):
15
15
  self.redis = redis_connector
16
16
 
17
17
  def check_redis_up(self) -> bool:
@@ -86,7 +86,7 @@ class LacusCore():
86
86
  :param max_retries: How many times should we re-try a capture if it failed.
87
87
  """
88
88
 
89
- def __init__(self, redis_connector: Redis, /, *, # type: ignore[type-arg]
89
+ def __init__(self, redis_connector: Redis[bytes], /, *,
90
90
  max_capture_time: int=3600,
91
91
  tor_proxy: str | None=None,
92
92
  only_global_lookups: bool=True,
@@ -107,10 +107,6 @@ class LacusCore():
107
107
  # Enable new chromium headless by default.
108
108
  os.environ["PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW"] = "1"
109
109
 
110
- # NOTE: Remove in 1.8.* - clear old ongoing captures queue in case of need
111
- if self.redis.type('lacus:ongoing') in ['set', b'set']: # type: ignore[no-untyped-call]
112
- self.redis.delete('lacus:ongoing')
113
-
114
110
  def check_redis_up(self) -> bool:
115
111
  """Check if redis is reachable"""
116
112
  return bool(self.redis.ping())
@@ -367,7 +363,7 @@ class LacusCore():
367
363
  raise CaptureError(f'No capture settings for {uuid}')
368
364
 
369
365
  try:
370
- to_capture = CaptureSettings(**{k.decode(): v.decode() for k, v in _to_capture.items()})
366
+ to_capture = CaptureSettings(**{k.decode(): v.decode() for k, v in _to_capture.items()}) # type: ignore[arg-type]
371
367
  except ValidationError as e:
372
368
  logger.warning(f'Settings invalid: {e}')
373
369
  raise CaptureSettingsError('Invalid settings', e)
@@ -709,7 +705,7 @@ class LacusCore():
709
705
  # the value is bytes
710
706
  to_return[key.decode()] = value # type: ignore[literal-required]
711
707
  else:
712
- logger.critical(f'Unexpected key in response: {key} - {value}')
708
+ logger.critical(f'Unexpected key in response: {key.decode()} - {value.decode()}')
713
709
  return to_return
714
710
 
715
711
  def clear_capture(self, uuid: str, reason: str) -> None:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "lacuscore"
3
- version = "1.10.12"
3
+ version = "1.11.0"
4
4
  description = "Core of Lacus, usable as a module"
5
5
  authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
6
6
  license = "BSD-3-Clause"
@@ -35,29 +35,29 @@ Sphinx = [
35
35
  {version = "^7.2", python = ">=3.9,<3.10", optional = true},
36
36
  {version = "^8", python = ">=3.10", optional = true}
37
37
  ]
38
- playwrightcapture = {extras = ["recaptcha"], version = "^1.25.14"}
38
+ playwrightcapture = {extras = ["recaptcha"], version = "^1.26.0"}
39
39
  defang = "^0.5.3"
40
40
  ua-parser = "^0.18.0"
41
41
  redis = {version = "^5.0.8", extras = ["hiredis"]}
42
42
  dnspython = "^2.6.1"
43
43
  async-timeout = {version = "^4.0.3", python = "<3.11"}
44
- pydantic = "^2.8.2"
44
+ pydantic = "^2.9.1"
45
45
  eval-type-backport = {version = "^0.2.0", python = "<3.10"}
46
46
 
47
47
  [tool.poetry.extras]
48
48
  docs = ["Sphinx"]
49
49
 
50
50
  [tool.poetry.group.dev.dependencies]
51
- types-redis = {version = "^4.6.0.20240819"}
52
51
  mypy = "^1.11.2"
53
- types-requests = "^2.32.0.20240712"
54
- types-beautifulsoup4 = "^4.12.0.20240511"
52
+ types-redis = {version = "^4.6.0.20240903"}
53
+ types-requests = "^2.32.0.20240914"
54
+ types-beautifulsoup4 = "^4.12.0.20240907"
55
55
  ipython = [
56
56
  {version = "<8.13.0", python = "<3.9"},
57
57
  {version = "^8.18.0", python = ">=3.9"},
58
58
  {version = "^8.19.0", python = ">=3.10"}
59
59
  ]
60
- pytest = "^8.3.2"
60
+ pytest = "^8.3.3"
61
61
 
62
62
  [build-system]
63
63
  requires = ["poetry_core"]
File without changes
File without changes