From 6c819c35625bfe8d5245f2d2ff2fa68c81b830c3 Mon Sep 17 00:00:00 2001 From: Jumbef Date: Wed, 20 Nov 2024 13:30:30 +0100 Subject: [PATCH 1/3] Update message.py Replace deprecated "inspect.getargspec" by "inspect.getfullargspec" --- src/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message.py b/src/message.py index bf82d7f..4d10ac0 100644 --- a/src/message.py +++ b/src/message.py @@ -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()) From a42676346c253b70a54011a99c1510bc24927918 Mon Sep 17 00:00:00 2001 From: Jumbef Date: Wed, 20 Nov 2024 13:42:23 +0100 Subject: [PATCH 2/3] Update message.py use raw strings as replace args in escape_chars and unescape_chars --- src/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message.py b/src/message.py index 4d10ac0..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): From 1d535f44467de95dfb60e2f6ab2647d024cd81cb Mon Sep 17 00:00:00 2001 From: Jumbef Date: Mon, 25 Nov 2024 15:45:20 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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