We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to run on python 3.13 results in:
[...] @app.get(f'/<any({",".join(PROTOCOLS)}):protocol>/<id>') ~~~~~~~~^^^^^^^^^^^ TypeError: sequence item 12: expected str instance, method found
Where item 12 is:
<bound method LABEL of Web<...>: Web<...>
Which I think is because Protocol.LABEL is a class property and those were removed in 3.13.
Protocol.LABEL
The text was updated successfully, but these errors were encountered:
Ooh, thanks for filing! Bridgy Fed currently runs on Python 3.12, but this is useful to know.
Sorry, something went wrong.
Blew up my local setup pretty fast, ended up working around it with this:
diff --git a/protocol.py b/protocol.py index 25135da1..6e210b61 100644 --- a/protocol.py +++ b/protocol.py @@ -90,6 +90,13 @@ werkzeug.exceptions._aborter.mapping.setdefault(299, ErrorButDoNotRetryTask) def activity_id_memcache_key(id): return memcache.key(f'receive-{id}') +class classproperty: + def __init__(self, method): + self.method = method + def __get__(self, obj, cls=None): + if cls is None: + cls = type(obj) + return self.method(cls) class Protocol: """Base protocol class. Not to be instantiated; classmethods only.""" @@ -123,8 +130,7 @@ class Protocol: def __init__(self): assert False - @classmethod - @property + @classproperty def LABEL(cls): """str: human-readable lower case name of this protocol, eg ``'activitypub``""" return cls.__name__.lower()
No branches or pull requests
Trying to run on python 3.13 results in:
Where item 12 is:
Which I think is because
Protocol.LABEL
is a class property and those were removed in 3.13.The text was updated successfully, but these errors were encountered: