mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-08 17:48:00 +00:00
update dependencies
This commit is contained in:
parent
a0d84b5ae5
commit
e44108f341
|
@ -16,19 +16,20 @@ classifiers = [
|
|||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
dependencies = [
|
||||
"activitypub-utils == 0.2.2",
|
||||
"aiohttp >= 3.9.1",
|
||||
"activitypub-utils == 0.3.0",
|
||||
"aiohttp >= 3.9.5",
|
||||
"aiohttp-swagger[performance] == 1.0.16",
|
||||
"argon2-cffi == 23.1.0",
|
||||
"barkshark-sql == 0.1.2",
|
||||
"barkshark-lib >= 0.1.3",
|
||||
"barkshark-sql == 0.1.4-1",
|
||||
"click >= 8.1.2",
|
||||
"hiredis == 2.3.2",
|
||||
"jinja2-haml == 0.3.5",
|
||||
"markdown == 3.5.2",
|
||||
"platformdirs == 4.2.0",
|
||||
"markdown == 3.6",
|
||||
"platformdirs == 4.2.2",
|
||||
"pyyaml >= 6.0",
|
||||
"redis == 5.0.1",
|
||||
"importlib_resources == 6.1.1; python_version < '3.9'"
|
||||
"redis == 5.0.5",
|
||||
"importlib-resources == 6.4.0; python_version < '3.9'"
|
||||
]
|
||||
requires-python = ">=3.8"
|
||||
dynamic = ["version"]
|
||||
|
@ -48,10 +49,10 @@ activityrelay = "relay.manage:main"
|
|||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"flake8 == 7.0.0",
|
||||
"mypy == 1.9.0",
|
||||
"pyinstaller == 6.3.0",
|
||||
"watchdog == 4.0.0",
|
||||
"typing_extensions >= 4.10.0; python_version < '3.11.0'"
|
||||
"mypy == 1.10.0",
|
||||
"pyinstaller == 6.8.0",
|
||||
"watchdog == 4.0.1",
|
||||
"typing-extensions >= 4.12.2; python_version < '3.11.0'"
|
||||
]
|
||||
|
||||
[tool.setuptools]
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '0.3.1'
|
||||
__version__ = '0.3.2'
|
||||
|
|
|
@ -7,7 +7,8 @@ import typing
|
|||
from aiohttp import ClientSession, ClientTimeout, TCPConnector
|
||||
from aiohttp.client_exceptions import ClientConnectionError, ClientSSLError
|
||||
from asyncio.exceptions import TimeoutError as AsyncTimeoutError
|
||||
from aputils import AlgorithmType, JsonBase, Nodeinfo, ObjectType, WellKnownNodeinfo
|
||||
from aputils import AlgorithmType, Nodeinfo, ObjectType, WellKnownNodeinfo
|
||||
from blib import JsonBase
|
||||
from json.decoder import JSONDecodeError
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
@ -166,7 +167,7 @@ class HttpClient:
|
|||
old_algo: bool = True) -> T | None:
|
||||
|
||||
if not issubclass(cls, JsonBase):
|
||||
raise TypeError('cls must be a sub-class of "aputils.JsonBase"')
|
||||
raise TypeError('cls must be a sub-class of "blib.JsonBase"')
|
||||
|
||||
if (data := (await self._get(url, sign_headers, force, old_algo))) is None:
|
||||
return None
|
||||
|
@ -178,12 +179,13 @@ class HttpClient:
|
|||
if not self._session:
|
||||
raise RuntimeError('Client not open')
|
||||
|
||||
# there seems to be a problem with HS2019, so defaulting to RSASHA256 for now
|
||||
# akkoma and pleroma do not support HS2019 and other software still needs to be tested
|
||||
if instance and instance['software'] in {'mastodon'}:
|
||||
algorithm = AlgorithmType.HS2019
|
||||
# if instance and instance['software'] in {'mastodon'}:
|
||||
# algorithm = AlgorithmType.HS2019
|
||||
|
||||
else:
|
||||
algorithm = AlgorithmType.RSASHA256
|
||||
# else:
|
||||
# algorithm = AlgorithmType.RSASHA256
|
||||
|
||||
body: bytes
|
||||
message: Message
|
||||
|
@ -202,7 +204,7 @@ class HttpClient:
|
|||
url,
|
||||
body,
|
||||
headers = {'Content-Type': 'application/activity+json'},
|
||||
algorithm = algorithm
|
||||
algorithm = AlgorithmType.RSASHA256
|
||||
)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue