hifi / heisenbridge

a bouncer-style Matrix IRC bridge
MIT License
244 stars 34 forks source link

TypeError in v1.15.0 with Python 3.9 #295

Closed 4nd3r closed 2 months ago

4nd3r commented 2 months ago
Aug 15 09:57:21 matrix python[1263]: Traceback (most recent call last):
Aug 15 09:57:21 matrix python[1263]:   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
Aug 15 09:57:21 matrix python[1263]:     return _run_code(code, main_globals, None,
Aug 15 09:57:21 matrix python[1263]:   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
Aug 15 09:57:21 matrix python[1263]:     exec(code, run_globals)
Aug 15 09:57:21 matrix python[1263]:   File "/opt/heisenbridge/lib/python3.9/site-packages/heisenbridge/__main__.py", line 60, in <module>
Aug 15 09:57:21 matrix python[1263]:     class BridgeAppService(AppService):
Aug 15 09:57:21 matrix python[1263]:   File "/opt/heisenbridge/lib/python3.9/site-packages/heisenbridge/__main__.py", line 343, in BridgeAppService
Aug 15 09:57:21 matrix python[1263]:     async def proxy_media(self, req: web.Request) -> web.StreamResponse | web.Response:
Aug 15 09:57:21 matrix python[1263]: TypeError: unsupported operand type(s) for |: 'ABCMeta' and 'ABCMeta'

Workaround is to monkeypatch that line to async def proxy_media(self, req: web.Request):.

Or upgrade to newer Python probably (will do it "soon" :sunglasses:).