From 6f62eb00547e98f28452719a6c7caa6ead881f89 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 4 May 2021 22:00:13 -0400 Subject: [PATCH] Update dependencies --- SETUP.md | 4 +++- matrix_puppeteer_line/portal.py | 5 ++--- optional-requirements.txt | 2 +- requirements.txt | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/SETUP.md b/SETUP.md index fa884e2..d8fee3a 100644 --- a/SETUP.md +++ b/SETUP.md @@ -10,7 +10,9 @@ 5. Copy `puppet/example-config.json` to `puppet/config.json`, and update it with the UUID found in the previous step 6. Launch the Puppeteer module with `yarn start` or `node src/main.js` 7. `cd` to the main directory and create a Python virtual environment with `virtualenv -p /usr/bin/python3 .venv`, and enter it with `source .venv/bin/activate` -8. Install Python requirements with `pip install -r requirements.txt` +8. Install Python requirements: + * `pip install -r requirements.txt` for base functionality + * `pip install -r optional_requirements.txt` for [end-to-bridge](https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html) encryption and metrics 9. Copy `matrix_puppeteer_line/example-config.yaml` to `config.yaml`, and update it with the proper settings to connect to your homeserver 10. Run `python -m matrix_puppeteer_line -g` to generate an appservice registration file, and update your homeserver configuration to accept it 11. Run the bridge with `python -m matrix_puppeteer_line` diff --git a/matrix_puppeteer_line/portal.py b/matrix_puppeteer_line/portal.py index 3668b60..97f060b 100644 --- a/matrix_puppeteer_line/portal.py +++ b/matrix_puppeteer_line/portal.py @@ -31,7 +31,6 @@ from mautrix.types import (EventID, MessageEventContent, RoomID, EventType, Mess RelatesTo, RelationType) from mautrix.errors import MatrixError from mautrix.util.simple_lock import SimpleLock -from mautrix.util.network_retry import call_with_net_retry from .db import Portal as DBPortal, Message as DBMessage, ReceiptReaction as DBReceiptReaction, Media as DBMedia from .config import Config @@ -344,8 +343,8 @@ class Portal(DBPortal, BasePortal): upload_mime_type = "application/octet-stream" upload_file_name = None - mxc = await call_with_net_retry(intent.upload_media, data, mime_type=upload_mime_type, - filename=upload_file_name, _action="upload media") + mxc = await intent.upload_media(data, mime_type=upload_mime_type, + filename=upload_file_name) if decryption_info: decryption_info.url = mxc diff --git a/optional-requirements.txt b/optional-requirements.txt index 47c98d2..58d022f 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -7,4 +7,4 @@ pycryptodome>=3,<4 unpaddedbase64>=1,<2 #/metrics -prometheus_client>=0.6,<0.9 +prometheus_client>=0.6,<0.11 diff --git a/requirements.txt b/requirements.txt index 5bea549..a9eb30a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -ruamel.yaml>=0.15.35,<0.17 +ruamel.yaml>=0.15.35,<0.18 python-magic>=0.4,<0.5 commonmark>=0.8,<0.10 aiohttp>=3,<4 yarl>=1,<2 attrs>=19.1 -mautrix>=0.8.2,<0.9 -asyncpg>=0.20,<0.22 -pillow>=4,<8 +mautrix>=0.9.2,<0.10 +asyncpg>=0.20,<0.23 +pillow>=4,<9 qrcode>=6,<7