From e031af6e5e8324fe4cda66d9597904040b17ca80 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sun, 4 Sep 2022 14:18:02 +1000 Subject: Vendor the "simple-network" library --- network/__init__.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 network/__init__.py (limited to 'network/__init__.py') diff --git a/network/__init__.py b/network/__init__.py new file mode 100644 index 0000000..3812173 --- /dev/null +++ b/network/__init__.py @@ -0,0 +1,16 @@ +import warnings + +from gi.repository import GLib + +# GLib.threads_init() is deprecated, which is awesome, but it prints out an +# error message which will be confusing to beginners. +# I don't want to remove this either, as the library still needs to be usable on +# older systems. +# So we monkey-patch the warning away. +_warn = warnings.warn +warnings.warn = lambda *a, **k: None +GLib.threads_init() +warnings.warn = _warn + +from network.client import Client +from network.server import Server -- cgit v1.2.3