From a40b0e33caee5f95409c7712af832ed0b24cd5ff Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 18 Jun 2020 19:40:46 +0100 Subject: [PATCH] Detect plugins without Python 3.x support and warn user. To allow users to sort out their plugins before EDMC itself moves to Python 3.x warn them if any of their enabled, non-stock, plugins do not have a plugin_start3() method. * If any are found without support there's a popup triggered at the end of AppWindow initialisation. * Then the user can check Settings > Plugins to see a list of the plugins without Python 3.x support. --- EDMarketConnector.py | 2 +- prefs.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index c70bd9d5..5e81ec9b 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -304,7 +304,7 @@ class AppWindow(object): if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3): import tkMessageBox tkMessageBox.showinfo('Plugins Without Python 3.x Support', - "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the 'Plugins' tab of 'File' > 'Settings'. You should check if there is an updated version available, else alert the developer that they will need to update the code when EDMC moves to Python 3.x" + "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the 'Plugins' tab of 'File' > 'Settings'. You should check if there is an updated version available, else alert the developer that they need to update the code for Python 3.x" ) config.set('plugins_not_py3_last', int(time())) diff --git a/prefs.py b/prefs.py index d8e0f700..329869c6 100644 --- a/prefs.py +++ b/prefs.py @@ -289,8 +289,6 @@ class PreferencesDialog(tk.Toplevel): if plugin.folder: # 'system' ones have this set to None to suppress listing in Plugins prefs tab nb.Label(plugsframe, text=plugin.name).grid(columnspan=2, padx=PADX*2, sticky=tk.W) HyperlinkLabel(plugsframe, text=_('Information on migrating plugins'), background=nb.Label().cget('background'), url='https://github.com/EDCD/EDMarketConnector/blob/master/PLUGINS.md#migration-to-python-37', underline=True).grid(columnspan=2, padx=PADX, sticky=tk.W) - - ############################################################ disabled_plugins = [x for x in plug.PLUGINS if x.folder and not x.module]