From 431b73e2299d4d6872736d8a3f5ca662ca86faba Mon Sep 17 00:00:00 2001 From: Benjamen Meyer Date: Sun, 14 Jan 2024 14:36:14 -0500 Subject: [PATCH 1/2] UPdate Version to 0.10.x --- bases/main_menu.py | 4 ++-- documentation/readme.txt | 2 +- vsinstall.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bases/main_menu.py b/bases/main_menu.py index 40229001..73fff8ce 100644 --- a/bases/main_menu.py +++ b/bases/main_menu.py @@ -48,7 +48,7 @@ def enterCredits(self,params): global plist_credits VS.musicPlayList(plist_credits) -credits_title = """\t=== Vega Strike 0.9.0 === +credits_title = """\t=== Vega Strike 0.10.0 === \t ---Credits---""" credits_text_col1 = """ @@ -154,7 +154,7 @@ def enterCredits(self,params): #CCCCff... and any we forgot to mention :) """ -intro_title = """\t=== Vega Strike 0.9.0 === +intro_title = """\t=== Vega Strike 0.10.0 === \t ---Intro Monologue--- """ diff --git a/documentation/readme.txt b/documentation/readme.txt index 49776b5e..388d6685 100644 --- a/documentation/readme.txt +++ b/documentation/readme.txt @@ -2,7 +2,7 @@ NOTICE: This readme file is very likely to be out of date. For the latest manual, please check the Vega Strike Wiki: http://vegastrike.sourceforge.net/wiki/Manual -=== VEGA STRIKE 0.9.0 - Upon the Coldest Sea === +=== VEGA STRIKE 0.10.0 - Upon the Coldest Sea === README diff --git a/vsinstall.sh b/vsinstall.sh index 34df71d2..2f15396a 100644 --- a/vsinstall.sh +++ b/vsinstall.sh @@ -30,7 +30,7 @@ fi SOURCE_PATH="$PWD" cd "$SOURCE_PATH" -echo ' ==== VEGA STRIKE 0.9.0 ====' +echo ' ==== VEGA STRIKE 0.10.0 ====' echo '' echo '' if [ "x" = "x$BINARY_APPEND" ]; then From 30844a5ffdd5345112854c5e9ff736ce431dc6bb Mon Sep 17 00:00:00 2001 From: daviddavid Date: Sun, 21 Apr 2024 08:57:00 +0200 Subject: [PATCH 2/2] Migrate from imp to importlib - the 'imp' module is deprecated from years and now Python 3.12 finally drops completely support of 'imp' module. - fix for #107 --- modules/custom.py | 4 ++-- modules/dj.py | 4 ++-- modules/server.py | 4 ++-- modules/server_lib.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/custom.py b/modules/custom.py index ee477c79..afc2f35a 100644 --- a/modules/custom.py +++ b/modules/custom.py @@ -1,7 +1,7 @@ import VS import traceback import sys -import imp +import importlib procedures = { } @@ -124,7 +124,7 @@ def processMessage(local, cmd, argstr, id): for arg in args: print(arg) if cmd=='reloadlib' and local and len(args)>=1: - imp.reload(__import__(args[0])) + importlib.reload(__import__(args[0])) VS.IOmessage(0, "game", "p"+str(cp), "Reloaded "+str(args[0])) elif cmd=='local': # simple way of bouncing back message to client.... diff --git a/modules/dj.py b/modules/dj.py index b6c2b824..c2925d20 100644 --- a/modules/dj.py +++ b/modules/dj.py @@ -1,4 +1,4 @@ import dj_lib -import imp -imp.reload(dj_lib) +import importlib +importlib.reload(dj_lib) dj_lib.PlayMusik() diff --git a/modules/server.py b/modules/server.py index ab62de37..8a5fb7ba 100644 --- a/modules/server.py +++ b/modules/server.py @@ -3,7 +3,7 @@ import unit import sys import traceback -import imp +import importlib import custom import server_lib @@ -176,7 +176,7 @@ def processMessage(cp, localhost, command, arglist=None, id=''): if authlevel<1: return mod=server_lib - imp.reload(mod) + importlib.reload(mod) VS.IOmessage(0,"game","all","The server python script has been reloaded!") print(mod.__name__+' has been reloaded!') else: diff --git a/modules/server_lib.py b/modules/server_lib.py index 0971645f..55d394ca 100644 --- a/modules/server_lib.py +++ b/modules/server_lib.py @@ -10,7 +10,7 @@ import faction_ships import custom import campaign_lib -import imp +import importlib def serverDirector(): return server.getDirector() @@ -142,7 +142,7 @@ def processMessage(player, auth, command, args, id=''): if auth<1: return vsmod=VS - imp.reload(__import__('server_lib')) + importlib.reload(__import__('server_lib')) vsmod.IOmessage(0,"game","all","The server python script has been reloaded.") elif command=='userlist': cstr = '#44cc44Users on the server:#888800'