From e6c940e0ca10cd3b948cc49f81e0ab9e6fbfa4cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 17:05:21 +0000 Subject: [PATCH 01/17] build(deps-dev): bump pytest from 7.0.0 to 7.0.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.0.0...7.0.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 88f68a80..8ce77998 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -40,7 +40,7 @@ lxml==4.7.1 py2exe==0.11.1.0; sys_platform == 'win32' # Testing -pytest==7.0.0 +pytest==7.0.1 pytest-cov==3.0.0 # Pytest code coverage support coverage[toml]==6.3.1 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs # For manipulating folder permissions and the like. From 53835dd36872a6ef3127476ca5ee86462d43c74d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 17:03:58 +0000 Subject: [PATCH 02/17] build(deps-dev): bump setuptools from 60.8.2 to 60.9.1 Bumps [setuptools](https://github.com/pypa/setuptools) from 60.8.2 to 60.9.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v60.8.2...v60.9.1) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 88f68a80..7ae38247 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ wheel # We can't rely on just picking this up from either the base (not venv), # or venv-init-time version. Specify here so that dependabot will prod us # about new versions. -setuptools==60.8.2 +setuptools==60.9.1 # Static analysis tools flake8==4.0.1 From dc413cdf1a49bf78724e9c3340a2f9aa311f3141 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 15 Feb 2022 17:47:54 +0000 Subject: [PATCH 03/17] develop: Bump appversion to 5.3.1-beta1 --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index 63505dac..1cbfb422 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -52,7 +52,7 @@ appcmdname = 'EDMC' # # Major.Minor.Patch(-prerelease)(+buildmetadata) # NB: Do *not* import this, use the functions appversion() and appversion_nobuild() -_static_appversion = '5.3.0' +_static_appversion = '5.3.1-beta1' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From 485ad394e60eb5e98e87811a59863c2c6719622a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:03:17 +0000 Subject: [PATCH 04/17] build(deps-dev): bump types-requests from 2.27.9 to 2.27.10 Bumps [types-requests](https://github.com/python/typeshed) from 2.27.9 to 2.27.10. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a9c63292..e21f15bf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -23,7 +23,7 @@ flake8-use-fstring==1.3 mypy==0.931 pep8-naming==0.12.1 safety==1.10.3 -types-requests==2.27.9 +types-requests==2.27.10 # Code formatting tools autopep8==1.6.0 From e95c96bac2c44aab75c0879e418cb0a838e67a9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:03:23 +0000 Subject: [PATCH 05/17] build(deps-dev): bump setuptools from 60.9.1 to 60.9.2 Bumps [setuptools](https://github.com/pypa/setuptools) from 60.9.1 to 60.9.2. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v60.9.1...v60.9.2) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a9c63292..3ce17d1e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ wheel # We can't rely on just picking this up from either the base (not venv), # or venv-init-time version. Specify here so that dependabot will prod us # about new versions. -setuptools==60.9.1 +setuptools==60.9.2 # Static analysis tools flake8==4.0.1 From 46a807deb1de88508b8a3793a84f9459af6f474b Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 17 Feb 2022 12:17:20 +0000 Subject: [PATCH 06/17] PLUGINS: Call out keeping an eye on Discussions --- PLUGINS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PLUGINS.md b/PLUGINS.md index 00072e18..b26ee58b 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -38,6 +38,8 @@ Please be sure to read the [Avoiding potential pitfalls](#avoiding-potential-pit section, else you might inadvertently cause issues for the core EDMarketConnector code including whole application crashes. +## Being aware of core application changes + It is highly advisable to ensure you are aware of all EDMarketConnector releases, including the pre-releases. The -beta and -rc changelogs will contain valuable information about any forthcoming changes that affect plugins. @@ -55,6 +57,11 @@ The easiest way is: And, of course, either ensure you check your GitHub messages regularly, or have it set up to email you such notifications. +You should also keep an eye on [our GitHub Discussions](https://github.com/EDCD/EDMarketConnector/discussions) +in case there are any proposed changes to EDMC plugin functionality. You can +do this by ensuring 'Discussions' is also ticked when following the steps +above to set up a 'Custom' watch on this repository. + --- ## Examples From 7116964dba805f39ef28ec0a73b30202524f803e Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 17 Feb 2022 12:17:20 +0000 Subject: [PATCH 07/17] PLUGINS: Call out keeping an eye on Discussions --- PLUGINS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PLUGINS.md b/PLUGINS.md index 00072e18..b26ee58b 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -38,6 +38,8 @@ Please be sure to read the [Avoiding potential pitfalls](#avoiding-potential-pit section, else you might inadvertently cause issues for the core EDMarketConnector code including whole application crashes. +## Being aware of core application changes + It is highly advisable to ensure you are aware of all EDMarketConnector releases, including the pre-releases. The -beta and -rc changelogs will contain valuable information about any forthcoming changes that affect plugins. @@ -55,6 +57,11 @@ The easiest way is: And, of course, either ensure you check your GitHub messages regularly, or have it set up to email you such notifications. +You should also keep an eye on [our GitHub Discussions](https://github.com/EDCD/EDMarketConnector/discussions) +in case there are any proposed changes to EDMC plugin functionality. You can +do this by ensuring 'Discussions' is also ticked when following the steps +above to set up a 'Custom' watch on this repository. + --- ## Examples From 7e4ffcf1efc2f49ad48638ff86f915759ffd9803 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:05:42 +0000 Subject: [PATCH 08/17] build(deps-dev): bump lxml from 4.7.1 to 4.8.0 Bumps [lxml](https://github.com/lxml/lxml) from 4.7.1 to 4.8.0. - [Release notes](https://github.com/lxml/lxml/releases) - [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt) - [Commits](https://github.com/lxml/lxml/compare/lxml-4.7.1...lxml-4.8.0) --- updated-dependencies: - dependency-name: lxml dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 4d7b97e0..3b9fd462 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -33,7 +33,7 @@ grip==4.6.0 # Packaging # Used to put together a WiX configuration from template/auto-gen -lxml==4.7.1 +lxml==4.8.0 # We only need py2exe on windows. # Pre-release version addressing semantic_version 2.9.0+ issues: # From e51aba1cc366aa212610349c82518f8095fe88b2 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Feb 2022 15:23:27 +0000 Subject: [PATCH 09/17] EDDN: Handle ApproachSettlement missing planetary coords --- plugins/eddn.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 1c3fdc43..d5db6e8d 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1126,6 +1126,27 @@ class EDDN: # "event": "ApproachSettlement", # "timestamp": "2021-10-14T12:37:54Z" # } + + ####################################################################### + # Bugs + ####################################################################### + # WORKAROUND 3.8.0.404 | 2022-02-18: ApproachSettlement missing coords + # As of Horizons ("gameversion":"3.8.0.404", "build":"r280105/r0 ") + # if you log back in (certainly a game client restart) at a + # Planetary Port, then the ApproachSettlement event written will be + # missing the Latitude and Longitude. + # Ref: https://github.com/EDCD/EDMarketConnector/issues/1476 + if any( + k not in entry for k in ('Latitude', 'Longitude') + ): + logger.debug( + f'ApproachSettlement without at least one of Latitude or Longitude:\n{entry}\n' + ) + # No need to alert the user, it will only annoy them + return "" + # WORKAROUND END + ####################################################################### + ####################################################################### # Augmentations ####################################################################### From 0844b3f8e6bee56340b415896f340de834f2e52a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 17:04:14 +0000 Subject: [PATCH 10/17] build(deps-dev): bump setuptools from 60.9.2 to 60.9.3 Bumps [setuptools](https://github.com/pypa/setuptools) from 60.9.2 to 60.9.3. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v60.9.2...v60.9.3) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3b9fd462..abeab851 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ wheel # We can't rely on just picking this up from either the base (not venv), # or venv-init-time version. Specify here so that dependabot will prod us # about new versions. -setuptools==60.9.2 +setuptools==60.9.3 # Static analysis tools flake8==4.0.1 From 10977ccb07e9dac2e839eaa6cce3f1c3c56b7361 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 19 Feb 2022 11:15:06 +0000 Subject: [PATCH 11/17] Prevent plugin widget code issues from breaking theme changes This adds a try/except around a bunch of .configure() calls on widgets. Yes, sure, this could then leave the widget in question in a broken state, but at least our entire UI won't fall flat on its face. --- theme.py | 105 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 44 deletions(-) diff --git a/theme.py b/theme.py index 8515bfbb..eea1072a 100644 --- a/theme.py +++ b/theme.py @@ -14,6 +14,9 @@ from tkinter import ttk from config import config from ttkHyperlinkLabel import HyperlinkLabel +from EDMCLogging import get_main_logger + +logger = get_main_logger() if __debug__: from traceback import print_exc @@ -266,50 +269,64 @@ class _Theme(object): widget.winfo_class(), widget, 'text' in widget.keys() and widget['text']) attribs = self.widgets.get(widget, []) - if isinstance(widget, tk.BitmapImage): - # not a widget - if 'fg' not in attribs: - widget.configure(foreground=self.current['foreground']), - if 'bg' not in attribs: - widget.configure(background=self.current['background']) - elif 'cursor' in widget.keys() and str(widget['cursor']) not in ['', 'arrow']: - # Hack - highlight widgets like HyperlinkLabel with a non-default cursor - if 'fg' not in attribs: - widget.configure(foreground=self.current['highlight']), - if 'insertbackground' in widget.keys(): # tk.Entry - widget.configure(insertbackground=self.current['foreground']), - if 'bg' not in attribs: - widget.configure(background=self.current['background']) - if 'highlightbackground' in widget.keys(): # tk.Entry - widget.configure(highlightbackground=self.current['background']) - if 'font' not in attribs: - widget.configure(font=self.current['font']) - elif 'activeforeground' in widget.keys(): - # e.g. tk.Button, tk.Label, tk.Menu - if 'fg' not in attribs: - widget.configure(foreground=self.current['foreground'], - activeforeground=self.current['activeforeground'], - disabledforeground=self.current['disabledforeground']) - if 'bg' not in attribs: - widget.configure(background=self.current['background'], - activebackground=self.current['activebackground']) - if sys.platform == 'darwin' and isinstance(widget, tk.Button): - widget.configure(highlightbackground=self.current['background']) - if 'font' not in attribs: - widget.configure(font=self.current['font']) - elif 'foreground' in widget.keys(): - # e.g. ttk.Label - if 'fg' not in attribs: - widget.configure(foreground=self.current['foreground']), - if 'bg' not in attribs: - widget.configure(background=self.current['background']) - if 'font' not in attribs: - widget.configure(font=self.current['font']) - elif 'background' in widget.keys() or isinstance(widget, tk.Canvas): - # e.g. Frame, Canvas - if 'bg' not in attribs: - widget.configure(background=self.current['background'], - highlightbackground=self.current['disabledforeground']) + try: + if isinstance(widget, tk.BitmapImage): + # not a widget + if 'fg' not in attribs: + widget.configure(foreground=self.current['foreground']), + + if 'bg' not in attribs: + widget.configure(background=self.current['background']) + + elif 'cursor' in widget.keys() and str(widget['cursor']) not in ['', 'arrow']: + # Hack - highlight widgets like HyperlinkLabel with a non-default cursor + if 'fg' not in attribs: + widget.configure(foreground=self.current['highlight']), + if 'insertbackground' in widget.keys(): # tk.Entry + widget.configure(insertbackground=self.current['foreground']), + + if 'bg' not in attribs: + widget.configure(background=self.current['background']) + if 'highlightbackground' in widget.keys(): # tk.Entry + widget.configure(highlightbackground=self.current['background']) + + if 'font' not in attribs: + widget.configure(font=self.current['font']) + + elif 'activeforeground' in widget.keys(): + # e.g. tk.Button, tk.Label, tk.Menu + if 'fg' not in attribs: + widget.configure(foreground=self.current['foreground'], + activeforeground=self.current['activeforeground'], + disabledforeground=self.current['disabledforeground']) + + if 'bg' not in attribs: + widget.configure(background=self.current['background'], + activebackground=self.current['activebackground']) + if sys.platform == 'darwin' and isinstance(widget, tk.Button): + widget.configure(highlightbackground=self.current['background']) + + if 'font' not in attribs: + widget.configure(font=self.current['font']) + elif 'foreground' in widget.keys(): + # e.g. ttk.Label + if 'fg' not in attribs: + widget.configure(foreground=self.current['foreground']), + + if 'bg' not in attribs: + widget.configure(background=self.current['background']) + + if 'font' not in attribs: + widget.configure(font=self.current['font']) + + elif 'background' in widget.keys() or isinstance(widget, tk.Canvas): + # e.g. Frame, Canvas + if 'bg' not in attribs: + widget.configure(background=self.current['background'], + highlightbackground=self.current['disabledforeground']) + + except Exception: + logger.exception('Plugin widget issue ?') # Apply configured theme From 17530c2d2b56e13939f0a710d72d45dbb32b7d26 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 19 Feb 2022 11:48:27 +0000 Subject: [PATCH 12/17] theme.py: Log widget if exception is thrown --- theme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.py b/theme.py index eea1072a..ce9318bd 100644 --- a/theme.py +++ b/theme.py @@ -326,7 +326,7 @@ class _Theme(object): highlightbackground=self.current['disabledforeground']) except Exception: - logger.exception('Plugin widget issue ?') + logger.exception(f'Plugin widget issue ? {widget=}') # Apply configured theme From 520ff5868fddd339c10a80800c242f6ef8ff3cc4 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 20 Feb 2022 19:05:41 +0000 Subject: [PATCH 13/17] theme.py: Apply .configure() paranoia on button enter/leave --- theme.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/theme.py b/theme.py index ce9318bd..4f60f976 100644 --- a/theme.py +++ b/theme.py @@ -195,17 +195,35 @@ class _Theme(object): def _enter(self, event, image): widget = event.widget if widget and widget['state'] != tk.DISABLED: - widget.configure(state=tk.ACTIVE) + try: + widget.configure(state=tk.ACTIVE) + + except Exception: + logger.exception(f'Failure setting widget active: {widget=}') + if image: - image.configure(foreground=self.current['activeforeground'], - background=self.current['activebackground']) + try: + image.configure(foreground=self.current['activeforeground'], + background=self.current['activebackground']) + + except Exception: + logger.exception(f'Failure configuring image: {image=}') def _leave(self, event, image): widget = event.widget if widget and widget['state'] != tk.DISABLED: - widget.configure(state=tk.NORMAL) + try: + widget.configure(state=tk.NORMAL) + + except Exception: + logger.exception(f'Failure setting widget normal: {widget=}') + if image: - image.configure(foreground=self.current['foreground'], background=self.current['background']) + try: + image.configure(foreground=self.current['foreground'], background=self.current['background']) + + except Exception: + logger.exception(f'Failure configuring image: {image=}') # Set up colors def _colors(self, root, theme): From de69b95b8a90505a2a99fda716ae7e3f530d0c75 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 20 Feb 2022 19:18:34 +0000 Subject: [PATCH 14/17] EDDN: codexentry/1: Tighten up 'empty string' checks It turns out some of the other strings, that do not have minLength=1 in the schema, can be empty and that's OK. i.e. NearestDestination. So, let's only check for the actual minLength=1 things. Which is a few top-level key:values, and then the contents of the Traits array. --- plugins/eddn.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index d5db6e8d..d82abc13 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -970,7 +970,9 @@ class EDDN: logger.warning(f'this.body_id was not set properly: "{this.body_id}" ({type(this.body_id)})') ####################################################################### - for k, v in entry.items(): + # Check just the top-level strings with minLength=1 in the schema + for k in ('System', 'Name', 'Region', 'Category', 'SubCategory'): + v = entry[k] if v is None or isinstance(v, str) and v == '': logger.warning(f'post-processing entry contains entry["{k}"] = {v} {(type(v))}') # We should drop this message and VERY LOUDLY inform the @@ -978,6 +980,13 @@ class EDDN: # raw Journal event that caused this. return 'CodexEntry had empty string, PLEASE ALERT THE EDMC DEVELOPERS' + # Also check traits + if 'Traits' in entry: + for v in entry['Traits']: + if v is None or isinstance(v, str) and v == '': + logger.warning(f'post-processing entry[\'Traits\'] contains {v} {(type(v))}\n{entry["Traits"]}\n') + return 'CodexEntry Trait had empty string, PLEASE ALERT THE EDMC DEVELOPERS' + msg = { '$schemaRef': f'https://eddn.edcd.io/schemas/codexentry/1{"/test" if is_beta else ""}', 'message': entry From 6f8847e3e10c186e5f75b5240fa2f29ee3e3b835 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 20 Feb 2022 19:30:45 +0000 Subject: [PATCH 15/17] EDDN: approachsettlement/1: Don't claim `entry_augment_system_data()` as only for us --- plugins/eddn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index d5db6e8d..8ee20acd 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -829,7 +829,7 @@ class EDDN: else: logger.warning("Neither this_coordinates or this.coordinates set, can't add StarPos") - return 'No source for adding StarPos to approachsettlement/1 !' + return 'No source for adding StarPos to EDDN message !' return entry From 562a224857c887b170a5d817f4bee64ec1db0583 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 20 Feb 2022 19:44:53 +0000 Subject: [PATCH 16/17] EDDN: approachsettlement/1: Bail if no System (name) yet * A login-time `ApproachSettlement` happens before `Location`, if appropriate. * Also add a future comment about FSSSignalDiscovered, for if EDDN ever adds the schema. --- plugins/eddn.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 8ee20acd..b381a761 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1520,6 +1520,12 @@ def journal_entry( # noqa: C901, CCR001 return this.eddn.export_journal_navroute(cmdr, is_beta, entry) elif event_name == 'approachsettlement': + # An `ApproachSettlement` can appear *before* `Location` if you + # logged at one. We won't have necessary augmentation data + # at this point, so bail. + if system is None: + return "" + return this.eddn.export_journal_approachsettlement( cmdr, system, @@ -1528,6 +1534,14 @@ def journal_entry( # noqa: C901, CCR001 entry ) + # NB: If adding FSSSignalDiscovered these absolutely come in at login + # time **BEFORE** the `Location` event, so we won't yet know things + # like SystemNane, or StarPos. + # We can either have the "now send the batch" code add such (but + # that has corner cases around changing systems in the meantime), + # drop those events, or if the schema allows, send without those + # augmentations. + elif event_name == 'fssallbodiesfound': return this.eddn.export_journal_fssallbodiesfound( cmdr, From 24e8912756f64e08e77efc29a83bd797f3063729 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 21 Feb 2022 12:26:42 +0000 Subject: [PATCH 17/17] Release 5.3.1: appversion and ChangeLog --- ChangeLog.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ config/__init__.py | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index ca5ad793..d8f721e3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -27,6 +27,51 @@ produce the Windows executables and installer. --- +Release 5.3.1 +=== + +This release addresses some issues with newer EDDN code which could cause +erroneous alerts to the player, or sending of bad messages. + +* EDDN: Cope with `ApproachSettlement` on login occurring before `Location`, + such that we don't yet know the name of the star system the player is in. + + Closes [#1484](https://github.com/EDCD/EDMarketConnector/pull/1484) + +* EDDN: Cope with `ApproachSettlement` missing planetary coordinates on login + at/near a settlement in Horizons. + + Closes [#1476](https://github.com/EDCD/EDMarketConnector/pull/1476) + +* EDDN: Change the `CodexEntry` "empty string" checks to only apply to those + values where the schema enforces "must be at least one character". + + This prevents the big 'CodexEntry had empty string, PLEASE ALERT THE EDMC + DEVELOPERS' message from triggering on, e.g. `NearestDestination` being + empty, which the schema allows. + + Closes [#1481](https://github.com/EDCD/EDMarketConnector/issues/1481) + +Plugin Developers +--- + +* If you use a sub-class for a widget the core code will no longer break if + your code raises an exception. e.g. a plugin was failing due to Python + 3.10 using `collections.abc` instead of `collections`, and the plugin's + custom widget had a `configure()` method which was called by the core + theme code on startup or theme change. This then caused the whole + application UI to never show up on startup. + + This also applies if you set up a button such that enter/leave on it, i.e. + mouse in/out, causes the `theme.py` code for that to trigger. + + So, now in such cases the main UI should actually show up, although your + plugin's UI might look weird due to theming not being properly applied. + + The plugin exception **WILL** be logged, at ERROR level. + +--- + Release 5.3.0 === diff --git a/config/__init__.py b/config/__init__.py index 1cbfb422..0307386e 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -52,7 +52,7 @@ appcmdname = 'EDMC' # # Major.Minor.Patch(-prerelease)(+buildmetadata) # NB: Do *not* import this, use the functions appversion() and appversion_nobuild() -_static_appversion = '5.3.1-beta1' +_static_appversion = '5.3.1' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD'