diff --git a/README.md b/README.md index c07d7fe..9f16bfc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +## About this fork + +This fork was made to quickly fix an incompatibility with Python 3.11 (the default Python version of Debian 12 "Bookworm") + +The following is the original README from (https://github.com/Qirky/Troop) + # Troop v0.10.3 ## Real-time collaborative live coding diff --git a/src/message.py b/src/message.py index bf82d7f..b742cf8 100644 --- a/src/message.py +++ b/src/message.py @@ -14,10 +14,10 @@ import json def escape_chars(s): - return s.replace(">", "\>").replace("<", "\<") + return s.replace(r">", r"\>").replace(r"<", r"\<") def unescape_chars(s): - return s.replace("\>", ">").replace("\<", "<") + return s.replace(r"\>", r">").replace(r"\<", r"<") class NetworkMessageReader: def __init__(self): @@ -181,7 +181,7 @@ def password(password): def header(cls): # args = inspect.getargspec(cls.__init__).args # args[0] = 'type' - args = ['type', 'msg_id'] + inspect.getargspec(cls.__init__).args[1:] + args = ['type', 'msg_id'] + inspect.getfullargspec(cls.__init__).args[1:] return args # Define types of message @@ -348,4 +348,4 @@ def __str__(self): msg = MSG_SET_MARK(42, 24) print(msg,) - print(msg.header()) \ No newline at end of file + print(msg.header())