Release 0.3.1 - dependency updates

This commit is contained in:
marvin8 2023-03-04 08:59:55 +10:00
parent a3193c637e
commit 3b3c48095d
No known key found for this signature in database
GPG key ID: C29D8D75FCE14912
6 changed files with 34 additions and 17 deletions

View file

@ -8,8 +8,7 @@ pipeline:
- python -V
- pip install pdm
- pdm --version
- pdm sync --group :all
- pdm build
- pdm sync
- pdm publish
depends_on:

View file

@ -19,6 +19,16 @@ See the fragment files in the `changelog.d directory`_.
.. scriv-insert-here
.. _changelog-0.3.1:
0.3.1 — 2023-03-04
==================
Changed
-------
- Updated dependencies, in particular minimal-activitypub. This should fix the error when uploading an image with mimte-type "image/webp"
.. _changelog-0.3.0:
0.3.0 — 2023-03-02
@ -32,7 +42,7 @@ Added
- Added "-c" / "--config-file" command line option to specify config file.
- Added configuration options to specify visibility to use when posting new statuses and to control if
bot should post feed items only if there is an accompaning media file
bot should post feed items only if there is an accompanying media file
- Now respecting rate limits when instance returns 429 error
@ -43,7 +53,7 @@ Changed
- Catching error during posting of feed items and ensuring app exits with non-zero return code when this occurs.
- Using proper temporary files for downloading and uploading of accompaning media files.
- Using proper temporary files for downloading and uploading of accompanying media files.
.. _changelog-0.2.1:

View file

@ -236,7 +236,7 @@ summary = "Markdown URL utilities"
[[package]]
name = "minimal-activitypub"
version = "0.5.4"
version = "0.5.5"
requires_python = ">=3.8"
summary = "Minimal inplementation of ActivityPub Interface"
dependencies = [
@ -432,16 +432,16 @@ dependencies = [
]
[[package]]
name = "ruamel.yaml"
name = "ruamel-yaml"
version = "0.17.21"
requires_python = ">=3"
summary = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"
dependencies = [
"ruamel.yaml.clib>=0.2.6; platform_python_implementation == \"CPython\" and python_version < \"3.11\"",
"ruamel-yaml-clib>=0.2.6; platform_python_implementation == \"CPython\" and python_version < \"3.11\"",
]
[[package]]
name = "ruamel.yaml.clib"
name = "ruamel-yaml-clib"
version = "0.2.7"
requires_python = ">=3.5"
summary = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml"
@ -461,7 +461,7 @@ dependencies = [
"dparse>=0.6.2",
"packaging>=21.0",
"requests",
"ruamel.yaml>=0.17.21",
"ruamel-yaml>=0.17.21",
"setuptools>=19.3",
]
@ -539,7 +539,7 @@ dependencies = [
[metadata]
lock_version = "4.1"
content_hash = "sha256:4cf5cf90c3ef0eae00253148aed449e0f9b29be62c5a8cebbf76508a04594f2c"
content_hash = "sha256:cfc0788e314f05735625e94e133d7e8cbf838f6d36f5bf85a0e44a370c57a8ff"
[metadata.files]
"aiodns 3.0.0" = [
@ -1058,9 +1058,9 @@ content_hash = "sha256:4cf5cf90c3ef0eae00253148aed449e0f9b29be62c5a8cebbf76508a0
{url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"},
{url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"},
]
"minimal-activitypub 0.5.4" = [
{url = "https://files.pythonhosted.org/packages/c1/de/23f9e012c7d3cbf9a2da20407509c4c15c01d33c852d6c7262ce9d5994a4/minimal-activitypub-0.5.4.tar.gz", hash = "sha256:322d71bdc0dcd869c0323788455066340c045d12ce79f90f4651e5ec06d77636"},
{url = "https://files.pythonhosted.org/packages/f8/ab/3c99f4ac9f37c7c22a13006de4a7cf46b0e5998641079f0197dfa4d1e75f/minimal_activitypub-0.5.4-py3-none-any.whl", hash = "sha256:00615d5207f6c5330f7a031fa78d6d9e3bda206550c71b4d71e20a93912ec638"},
"minimal-activitypub 0.5.5" = [
{url = "https://files.pythonhosted.org/packages/05/47/c2a1c92c8d8f9cc429058a0a761cd26d697da75ebc8edcd8695b97f8d5b3/minimal_activitypub-0.5.5-py3-none-any.whl", hash = "sha256:4ad8918aaa39c4b11f5a9a6986bdec7a9ec9c11f648fbe92cccd72e6b9b8de6d"},
{url = "https://files.pythonhosted.org/packages/b8/aa/017c78b2eb916b6f8d34a8450a1e96718279cb4c27d13aa49d64d2543e20/minimal-activitypub-0.5.5.tar.gz", hash = "sha256:468a9a319e368f91708495d3b555a9a2e031fd098a3f98aa82933c2f690bda8c"},
]
"msgpack 1.0.4" = [
{url = "https://files.pythonhosted.org/packages/01/9c/26a337b8d4a7cb5b1058bec7f187936bf749e78cd519c497e845e965d2e5/msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"},
@ -1350,11 +1350,11 @@ content_hash = "sha256:4cf5cf90c3ef0eae00253148aed449e0f9b29be62c5a8cebbf76508a0
{url = "https://files.pythonhosted.org/packages/68/31/b8934896818c885001aeb7df388ba0523ea3ec88ad31805983d9b0480a50/rich-13.3.1.tar.gz", hash = "sha256:125d96d20c92b946b983d0d392b84ff945461e5a06d3867e9f9e575f8697b67f"},
{url = "https://files.pythonhosted.org/packages/a8/c6/14b77fe7a5fab66ffbeffd6706f598d00a52702846bce0e2339bcf9dd20c/rich-13.3.1-py3-none-any.whl", hash = "sha256:8aa57747f3fc3e977684f0176a88e789be314a99f99b43b75d1e9cb5dc6db9e9"},
]
"ruamel.yaml 0.17.21" = [
"ruamel-yaml 0.17.21" = [
{url = "https://files.pythonhosted.org/packages/46/a9/6ed24832095b692a8cecc323230ce2ec3480015fbfa4b79941bd41b23a3c/ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"},
{url = "https://files.pythonhosted.org/packages/9e/cb/938214ac358fbef7058343b3765c79a1b7ed0c366f7f992ce7ff38335652/ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"},
]
"ruamel.yaml.clib 0.2.7" = [
"ruamel-yaml-clib 0.2.7" = [
{url = "https://files.pythonhosted.org/packages/11/50/b4ebeac05e40ab40d85659ec8629f9af54ed09f07b3269e17cbfb0fbecd6/ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:41d0f1fa4c6830176eef5b276af04c89320ea616655d01327d5ce65e50575c94"},
{url = "https://files.pythonhosted.org/packages/21/86/c0c950bfec9a9b2cc2b20a6e9309254b482437bc37116e46c7d058294d5d/ruamel.yaml.clib-0.2.7-cp38-cp38-win32.whl", hash = "sha256:3110a99e0f94a4a3470ff67fc20d3f96c25b13d24c6980ff841e82bafe827cac"},
{url = "https://files.pythonhosted.org/packages/2e/37/8b463d153586e4c4ac7db54dc36bf7b6f5ce431b5352f9d226e93316abf5/ruamel.yaml.clib-0.2.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aa261c29a5545adfef9296b7e33941f46aa5bbd21164228e833412af4c9c75f"},

View file

@ -25,9 +25,9 @@ classifiers = [
dependencies = [
"feedparser>=6.0.10",
"minimal-activitypub>=0.5.4",
"aiosqlite>=0.18.0",
"click>=8.1.3",
"minimal-activitypub>=0.5.5",
]
[project.optional-dependencies]
dev = [

View file

@ -1,7 +1,7 @@
"""Module level constants."""
from typing import Final
__version__: Final[str] = "0.3.0"
__version__: Final[str] = "0.3.1"
DISPLAY_NAME: Final[str] = "Feed2Fedi"
WEBSITE: Final[str] = "https://codeberg.org/MarvinsMastodonTools/feed2fedi"

View file

@ -1,6 +1,7 @@
"""Classes and methods needed to publish posts on a Fediverse instance."""
import asyncio
import tempfile
import traceback
from typing import List
from typing import Optional
@ -8,6 +9,7 @@ import aiohttp
import arrow
from feedparser import FeedParserDict
from minimal_activitypub.client_2_server import ActivityPub
from minimal_activitypub.client_2_server import ClientError
from minimal_activitypub.client_2_server import RatelimitError
from .collect import FeedReader
@ -73,6 +75,12 @@ class Fediverse:
)
await asyncio.sleep(delay=seconds)
except ClientError as error:
print(f"!!! Encountered error: {error}")
traceback.print_tb(error.__traceback__)
print("\nLog article to avoid repeat of error")
await self.post_recorder.log_post(shared_url=item.link)
@staticmethod
async def _post_media(
fediverse: ActivityPub,