projects/guix·blob ruby-team · refs

41 lines · 1.3 KiB

1From 7f6f613826aef9810999c1599c8354e8a78fbdb4 Mon Sep 17 00:00:00 2001
2From: Lukas1818 <[email protected]>
3Date: Fri, 19 Feb 2021 21:08:44 +0100
4Subject: [PATCH] fixs for Phyton 3.9 (#2955)
5
6* change deprecated isAlive() to is_alive()
7
8* remove unsupported keyword "encoding"
9
10Co-authored-by: Lukas1818 <[email protected]>
11---
12 horizons/util/loaders/jsondecoder.py | 2 +-
13 horizons/util/preloader.py | 4 ++--
14 2 files changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/horizons/util/loaders/jsondecoder.py b/horizons/util/loaders/jsondecoder.py
17index ea2ddfb3308..138a948f42a 100644
18--- a/horizons/util/loaders/jsondecoder.py
19+++ b/horizons/util/loaders/jsondecoder.py
20@@ -37,4 +37,4 @@ def _decode_dict(dct):
21 return newdict
22
23 with open(path, "r") as f:
24- return json.load(f, encoding="ascii", object_hook=_decode_dict)
25+ return json.load(f, object_hook=_decode_dict)
26diff --git a/horizons/util/preloader.py b/horizons/util/preloader.py
27index 5689cc68152..2e072fcc642 100644
28--- a/horizons/util/preloader.py
29+++ b/horizons/util/preloader.py
30@@ -79,9 +79,9 @@ def wait_for_finish(self):
31 """
32 self.lock.acquire()
33 # wait until it finished its current action
34- if self.isAlive():
35+ if self.is_alive():
36 self.join()
37- assert not self.isAlive()
38+ assert not self.is_alive()
39 else:
40 try:
41 self.lock.release()