update dependencies

This commit is contained in:
Izalia Mae 2024-06-12 16:02:59 -04:00
parent a0d84b5ae5
commit e44108f341
3 changed files with 22 additions and 19 deletions

View file

@ -16,19 +16,20 @@ classifiers = [
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
] ]
dependencies = [ dependencies = [
"activitypub-utils == 0.2.2", "activitypub-utils == 0.3.0",
"aiohttp >= 3.9.1", "aiohttp >= 3.9.5",
"aiohttp-swagger[performance] == 1.0.16", "aiohttp-swagger[performance] == 1.0.16",
"argon2-cffi == 23.1.0", "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", "click >= 8.1.2",
"hiredis == 2.3.2", "hiredis == 2.3.2",
"jinja2-haml == 0.3.5", "jinja2-haml == 0.3.5",
"markdown == 3.5.2", "markdown == 3.6",
"platformdirs == 4.2.0", "platformdirs == 4.2.2",
"pyyaml >= 6.0", "pyyaml >= 6.0",
"redis == 5.0.1", "redis == 5.0.5",
"importlib_resources == 6.1.1; python_version < '3.9'" "importlib-resources == 6.4.0; python_version < '3.9'"
] ]
requires-python = ">=3.8" requires-python = ">=3.8"
dynamic = ["version"] dynamic = ["version"]
@ -48,10 +49,10 @@ activityrelay = "relay.manage:main"
[project.optional-dependencies] [project.optional-dependencies]
dev = [ dev = [
"flake8 == 7.0.0", "flake8 == 7.0.0",
"mypy == 1.9.0", "mypy == 1.10.0",
"pyinstaller == 6.3.0", "pyinstaller == 6.8.0",
"watchdog == 4.0.0", "watchdog == 4.0.1",
"typing_extensions >= 4.10.0; python_version < '3.11.0'" "typing-extensions >= 4.12.2; python_version < '3.11.0'"
] ]
[tool.setuptools] [tool.setuptools]

View file

@ -1 +1 @@
__version__ = '0.3.1' __version__ = '0.3.2'

View file

@ -7,7 +7,8 @@ import typing
from aiohttp import ClientSession, ClientTimeout, TCPConnector from aiohttp import ClientSession, ClientTimeout, TCPConnector
from aiohttp.client_exceptions import ClientConnectionError, ClientSSLError from aiohttp.client_exceptions import ClientConnectionError, ClientSSLError
from asyncio.exceptions import TimeoutError as AsyncTimeoutError 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 json.decoder import JSONDecodeError
from urllib.parse import urlparse from urllib.parse import urlparse
@ -166,7 +167,7 @@ class HttpClient:
old_algo: bool = True) -> T | None: old_algo: bool = True) -> T | None:
if not issubclass(cls, JsonBase): 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: if (data := (await self._get(url, sign_headers, force, old_algo))) is None:
return None return None
@ -178,12 +179,13 @@ class HttpClient:
if not self._session: if not self._session:
raise RuntimeError('Client not open') 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 # akkoma and pleroma do not support HS2019 and other software still needs to be tested
if instance and instance['software'] in {'mastodon'}: # if instance and instance['software'] in {'mastodon'}:
algorithm = AlgorithmType.HS2019 # algorithm = AlgorithmType.HS2019
else: # else:
algorithm = AlgorithmType.RSASHA256 # algorithm = AlgorithmType.RSASHA256
body: bytes body: bytes
message: Message message: Message
@ -202,7 +204,7 @@ class HttpClient:
url, url,
body, body,
headers = {'Content-Type': 'application/activity+json'}, headers = {'Content-Type': 'application/activity+json'},
algorithm = algorithm algorithm = AlgorithmType.RSASHA256
) )
try: try: