From c8fb9b1c4b170527e6618ef4dbdd1d15ffe88ff1 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 6 Jun 2022 13:49:19 +0100 Subject: [PATCH 01/24] develop: Bump appversion in anticipation of 5.4.0 release --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index 408d50ea..924151ef 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.5-beta0' +_static_appversion = '5.4.1-alpha0' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From 1567566524e97d57b6f668655a8ec9dd229e3498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 17:04:37 +0000 Subject: [PATCH 02/24] build(deps-dev): bump mypy from 0.960 to 0.961 Bumps [mypy](https://github.com/python/mypy) from 0.960 to 0.961. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.960...v0.961) --- updated-dependencies: - dependency-name: mypy 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 1261f113..eaaec8eb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ flake8-noqa==1.2.2 flake8-polyfill==1.0.2 flake8-use-fstring==1.3 -mypy==0.960 +mypy==0.961 pep8-naming==0.13.0 safety==1.10.3 types-requests==2.27.30 From c70cb00eadf12c9f1ce8975c0f86dd0cfe75e8af Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 8 Jun 2022 14:19:28 +0100 Subject: [PATCH 03/24] Revert "develop: Bump appversion in anticipation of 5.4.0 release" This reverts commit c8fb9b1c4b170527e6618ef4dbdd1d15ffe88ff1. --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index 924151ef..408d50ea 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.4.1-alpha0' +_static_appversion = '5.3.5-beta0' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From ec69b9c7364870ee2886d3d7c1d6d8e2c8e85b49 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 8 Jun 2022 14:20:12 +0100 Subject: [PATCH 04/24] develop: post-release version bump to 5.4.1-alpha0 --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index 6d26ce73..924151ef 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.4.0' +_static_appversion = '5.4.1-alpha0' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From 16dfd63f78e6f964126accf9c936d9addb1560e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jun 2022 17:03:09 +0000 Subject: [PATCH 05/24] build(deps): bump actions/setup-python from 3 to 4 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/pr-checks.yml | 2 +- .github/workflows/push-checks.yml | 2 +- .github/workflows/windows-build.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 166672b7..62ca8b45 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -53,7 +53,7 @@ jobs: # Get Python set up #################################################################### - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies diff --git a/.github/workflows/push-checks.yml b/.github/workflows/push-checks.yml index be4fc9da..86556e49 100644 --- a/.github/workflows/push-checks.yml +++ b/.github/workflows/push-checks.yml @@ -21,7 +21,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index c38591cd..4140d956 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -20,7 +20,7 @@ jobs: with: submodules: true - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.10.4" architecture: "x86" From d20c2737d59495858045600c174795895662df75 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 8 Jun 2022 18:15:56 +0100 Subject: [PATCH 06/24] python: Utilis setup-python's new `python-version-file` This way we only need to edit `.python-version` and all the GitHub actions will automatically use that version. --- .github/workflows/pr-checks.yml | 4 ++-- .github/workflows/push-checks.yml | 4 ++-- .github/workflows/windows-build.yml | 2 +- docs/Releasing.md | 10 ++++------ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 62ca8b45..55ee97ff 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -52,10 +52,10 @@ jobs: #################################################################### # Get Python set up #################################################################### - - name: Set up Python 3.10 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version-file: '.python-version' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/push-checks.yml b/.github/workflows/push-checks.yml index 86556e49..298bd4ff 100644 --- a/.github/workflows/push-checks.yml +++ b/.github/workflows/push-checks.yml @@ -20,10 +20,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Python 3.10 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version-file: '.python-version' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 4140d956..122ffd6d 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.10.4" + python-version-file: '.python-version' architecture: "x86" - name: Install python tools diff --git a/docs/Releasing.md b/docs/Releasing.md index 2756f2fe..f691ee69 100644 --- a/docs/Releasing.md +++ b/docs/Releasing.md @@ -433,13 +433,13 @@ If you are making a pre-release then: When changing the Python version (Major.Minor.Patch) used: -1. Change the contents of `.python-version` so that pyenv notices. +1. Change the contents of `.python-version` so that pyenv notices. All of + the GitHub workflows now reference this via the `setup-python` + `python-version-file` directive. 1. Any version change: - 1. `.github/workflows/windows-build.yml` needs updating to have the GitHub - based build use the correct version. - 2. `ChangeLog.md` - The `We now test against, and package with, Python + 1. `ChangeLog.md` - The `We now test against, and package with, Python M.m.P.` line. 1. Major or Minor level changes: @@ -449,5 +449,3 @@ When changing the Python version (Major.Minor.Patch) used: pythonXX.dll file. 3. `.pre-commit-config.yaml` will need the `default_language_version` section updated to the appropriate version. - 4. All `.github/workflows/` files will need to be citing the correct - version in any `uses: actions/setup-python` section. From fd016723fccf6c105a74519ef3bcea693104c5a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 17:04:36 +0000 Subject: [PATCH 07/24] build(deps): bump requests from 2.27.1 to 2.28.0 Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.28.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.28.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fe63dbfe..05af8719 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ certifi==2022.5.18.1 -requests==2.27.1 +requests==2.28.0 watchdog==2.1.8 # Commented out because this doesn't package well with py2exe infi.systray==0.1.12; sys_platform == 'win32' From accef57c3eacfee4c74d74ac45aaed1e666d1206 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 10 Jun 2022 10:56:57 +0100 Subject: [PATCH 08/24] Installer: Attempt to set REBOOT=ReallySuppress If for any reason EDMarketConnector.exe doesn't exit when WinSparkle asks it to then an unprompted reboot can happen. This *should* prevent that. --- wix/template.wxs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wix/template.wxs b/wix/template.wxs index a15e0fc1..82da0c4e 100644 --- a/wix/template.wxs +++ b/wix/template.wxs @@ -44,6 +44,11 @@ Name="InstallLocation" Type="raw" /> + + + + From 8cbae3ccdd26b15f7fbdce88c92a8cc90f893425 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jun 2022 17:02:36 +0000 Subject: [PATCH 09/24] build(deps): bump watchdog from 2.1.8 to 2.1.9 Bumps [watchdog](https://github.com/gorakhargosh/watchdog) from 2.1.8 to 2.1.9. - [Release notes](https://github.com/gorakhargosh/watchdog/releases) - [Changelog](https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst) - [Commits](https://github.com/gorakhargosh/watchdog/compare/v2.1.8...v2.1.9) --- updated-dependencies: - dependency-name: watchdog dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 05af8719..1ad9094f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ certifi==2022.5.18.1 requests==2.28.0 -watchdog==2.1.8 +watchdog==2.1.9 # Commented out because this doesn't package well with py2exe infi.systray==0.1.12; sys_platform == 'win32' # argh==0.26.2 watchdog dep From df9f0bfc7c383f8b1a27c7dc3957e9f89f1c4cff Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 15:26:50 -0400 Subject: [PATCH 10/24] Implement FSSSignalDiscovered sender v1 --- plugins/eddn.py | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index ff4729a1..998cdb81 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -152,6 +152,7 @@ class EDDN: self.session.headers['User-Agent'] = user_agent self.replayfile: Optional[TextIO] = None # For delayed messages self.replaylog: List[str] = [] + self.fsssignals: Optional[Mapping[str, Any]] = None if config.eddn_url is not None: self.eddn_url = config.eddn_url @@ -1307,6 +1308,94 @@ class EDDN: this.eddn.export_journal_entry(cmdr, entry, msg) return None + def batch_journal_fsssignaldiscovered( + self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] + ) -> Optional[str]: + """ + Augment and keep FSSSignalDiscovered journal events + + :param cmdr: the commander under which this upload is made + :param system_name: Name of current star system + :param system_starpos: Coordinates of current star system + :param is_beta: whether or not we are in beta mode + :param entry: the journal entry to batch + """ + #{ + # "timestamp": "2021-01-15T02:54:18Z", + # "event": "FSSSignalDiscovered", + # "SystemAddress": 1900279744859, + # "SignalName": "$USS_HighGradeEmissions;", + # "SignalName_Localised": "Unidentified signal source", + # "USSType": "$USS_Type_ValuableSalvage;", + # "USSType_Localised": "Encoded emissions", + # "SpawningState": "", + # "SpawningFaction": "Free Marlinists of Carinae", + # "ThreatLevel": 0, + # "TimeRemaining": 718.508789 + #} + ####################################################################### + #logger.trace_if("plugin.eddn", entry) + # Elisions + entry = filter_localised(entry) + if "USSType" in entry and entry["USSType"] == "$USS_Type_MissionTarget;": + logger.warning("USSType is $USS_Type_MissionTarget;, dropping") + return 'Dropping $USS_Type_MissionTarget;' + # Can check SystemAddress here, but we'll remove it from this signal list, to be added to the outer batched message + if this.systemaddress is None or this.systemaddress != entry['SystemAddress']: + logger.warning("SystemAddress isn't current location! Can't add augmentations!") + return 'Wrong System! Missed jump ?' + + # Horizons/Odyssey will be readded later + for removekey in ["TimeRemaining", "horizons", "odyssey", "SystemAddress" ]: + if removekey in entry: + entry.pop(removekey) + ####################################################################### + + if not self.fsssignals: + self.fsssignals = [] + if entry is not None and entry != "": + logger.trace_if("plugin.eddn", f"Appending FSSSignalDiscovered entry: {json.dumps(entry)}") + self.fsssignals.append(entry) + + def export_journal_fsssignaldiscovered( + self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] + ) -> Optional[str]: + logger.trace_if("plugin.eddn", f"This non-FSSS entry is {json.dumps(entry)}") + """ + Send an FSSSignalDiscovered message to EDDN on the correct schema. + + :param cmdr: the commander under which this upload is made + :param system_name: Name of current star system + :param system_starpos: Coordinates of current star system + :param is_beta: whether or not we are in beta mode + :param entry: the non-FSSSignalDiscovered journal entry that triggered this batch send + """ + msg = { + '$schemaRef': f'https://eddn.edcd.io/schemas/fsssignaldiscovered/1{"/test" if is_beta else ""}', + 'message': { + "event":"FSSSignalDiscovered", + "signals": self.fsssignals + } + } + # Readd Horizons and Odyssey to the outer message not each signal + for gamever in [ "horizons", "odyssey" ]: + if gamever in entry and gamever not in msg: + msg[gamever] = entry[gamever] + + # Another SystemAddress check, however: some events won't have it. Is it an issue? + if this.systemaddress is None or ('SystemAddress' in entry and this.systemaddress != entry['SystemAddress']): + logger.warning("SystemAddress isn't current location! Can't add augmentations!") + return 'Wrong System! Missed jump ?' + + ret = this.eddn.entry_augment_system_data(msg, system_name, system_starpos) + if isinstance(ret, str): + return ret + + logger.trace_if("plugin.eddn", f"FSSSignalDiscovered batch is {json.dumps(msg)}") + this.eddn.export_journal_entry(cmdr, self.fsssignals[-1], msg) + self.fsssignals = None + return None + def canonicalise(self, item: str) -> str: """ Canonicalise the given commodity name. @@ -1657,6 +1746,18 @@ def journal_entry( # noqa: C901, CCR001 # drop those events, or if the schema allows, send without those # augmentations. + elif event_name == 'fsssignaldiscovered': + # Drop the event if we don't know system/starpos. Do something else? + if system is None or 'StarPos' not in state or state['StarPos'] is None: + return "" + this.eddn.batch_journal_fsssignaldiscovered( + cmdr, + system, + state['StarPos'], + is_beta, + entry + ) + elif event_name == 'fssallbodiesfound': return this.eddn.export_journal_fssallbodiesfound( cmdr, @@ -1674,6 +1775,15 @@ def journal_entry( # noqa: C901, CCR001 is_beta, entry ) + # Simple queue: send batched FSSSignalDiscovereds once a non-FSSSignalDiscovered is observed + if event_name != 'fsssignaldiscovered' and this.eddn.fsssignals is not None and len(this.eddn.fsssignals) > 0: + return this.eddn.export_journal_fsssignaldiscovered( + cmdr, + system, + state['StarPos'], + is_beta, + entry + ) # Send journal schema events to EDDN, but not when on a crew if (config.get_int('output') & config.OUT_SYS_EDDN and not state['Captain'] and From 1b3799101670a307bd52188f7e446fc6e51e4ff2 Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 16:16:54 -0400 Subject: [PATCH 11/24] fix flake8 errors --- plugins/eddn.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 998cdb81..8b672cec 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -256,6 +256,8 @@ class EDDN: headers = {'Content-Encoding': 'gzip'} r = self.session.post(self.eddn_url, data=encoded, timeout=self.TIMEOUT, headers=headers) + logger.trace_if('plugin.eddn', f"EDDN response {r.status_code} to data: {json.dumps(to_send)}") + logger.trace_if('plugin.eddn', f"EDDN response {r.text}") if r.status_code != requests.codes.ok: # Check if EDDN is still objecting to an empty commodities list @@ -1310,7 +1312,7 @@ class EDDN: def batch_journal_fsssignaldiscovered( self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] - ) -> Optional[str]: + ) -> Optional[str]: """ Augment and keep FSSSignalDiscovered journal events @@ -1320,7 +1322,7 @@ class EDDN: :param is_beta: whether or not we are in beta mode :param entry: the journal entry to batch """ - #{ + # { # "timestamp": "2021-01-15T02:54:18Z", # "event": "FSSSignalDiscovered", # "SystemAddress": 1900279744859, @@ -1332,30 +1334,29 @@ class EDDN: # "SpawningFaction": "Free Marlinists of Carinae", # "ThreatLevel": 0, # "TimeRemaining": 718.508789 - #} + # } ####################################################################### - #logger.trace_if("plugin.eddn", entry) # Elisions entry = filter_localised(entry) if "USSType" in entry and entry["USSType"] == "$USS_Type_MissionTarget;": logger.warning("USSType is $USS_Type_MissionTarget;, dropping") return 'Dropping $USS_Type_MissionTarget;' - # Can check SystemAddress here, but we'll remove it from this signal list, to be added to the outer batched message + # Can check SystemAddress here, but we'll remove it from this signal list, to be added to the batch if this.systemaddress is None or this.systemaddress != entry['SystemAddress']: logger.warning("SystemAddress isn't current location! Can't add augmentations!") return 'Wrong System! Missed jump ?' # Horizons/Odyssey will be readded later - for removekey in ["TimeRemaining", "horizons", "odyssey", "SystemAddress" ]: + for removekey in ["TimeRemaining", "horizons", "odyssey", "SystemAddress"]: if removekey in entry: entry.pop(removekey) ####################################################################### if not self.fsssignals: - self.fsssignals = [] + self.fsssignals = [] if entry is not None and entry != "": - logger.trace_if("plugin.eddn", f"Appending FSSSignalDiscovered entry: {json.dumps(entry)}") - self.fsssignals.append(entry) + logger.trace_if("plugin.eddn", f"Appending FSSSignalDiscovered entry: {json.dumps(entry)}") + self.fsssignals.append(entry) def export_journal_fsssignaldiscovered( self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] @@ -1373,7 +1374,7 @@ class EDDN: msg = { '$schemaRef': f'https://eddn.edcd.io/schemas/fsssignaldiscovered/1{"/test" if is_beta else ""}', 'message': { - "event":"FSSSignalDiscovered", + "event": "FSSSignalDiscovered", "signals": self.fsssignals } } From 4dfcd91bcd2266c50525a19b752a0ef74e93f4e8 Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 16:19:25 -0400 Subject: [PATCH 12/24] fix more flake8 errors --- plugins/eddn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 8b672cec..51ae523b 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1379,9 +1379,9 @@ class EDDN: } } # Readd Horizons and Odyssey to the outer message not each signal - for gamever in [ "horizons", "odyssey" ]: - if gamever in entry and gamever not in msg: - msg[gamever] = entry[gamever] + for gamever in ["horizons", "odyssey"]: + if gamever in entry and gamever not in msg: + msg[gamever] = entry[gamever] # Another SystemAddress check, however: some events won't have it. Is it an issue? if this.systemaddress is None or ('SystemAddress' in entry and this.systemaddress != entry['SystemAddress']): From 4bf2965cc5fa439bbbb6447f22a9e3e828ef5ad2 Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 17:12:08 -0400 Subject: [PATCH 13/24] remove unnecessarily committed debug messages --- plugins/eddn.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 51ae523b..bc458494 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -256,8 +256,6 @@ class EDDN: headers = {'Content-Encoding': 'gzip'} r = self.session.post(self.eddn_url, data=encoded, timeout=self.TIMEOUT, headers=headers) - logger.trace_if('plugin.eddn', f"EDDN response {r.status_code} to data: {json.dumps(to_send)}") - logger.trace_if('plugin.eddn', f"EDDN response {r.text}") if r.status_code != requests.codes.ok: # Check if EDDN is still objecting to an empty commodities list From e8b8cf81d52842a3ca771403568e4d753c1d449b Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 17:51:38 -0400 Subject: [PATCH 14/24] Change EDSM credentials() to log API keys under a different trace #1496 --- plugins/edsm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/edsm.py b/plugins/edsm.py index 6bbf0223..8bd5fd30 100644 --- a/plugins/edsm.py +++ b/plugins/edsm.py @@ -62,6 +62,7 @@ DISCARDED_EVENTS_SLEEP = 10 # trace-if events CMDR_EVENTS = 'plugin.edsm.cmdr-events' +CMDR_CREDS = 'plugin.edsm.cmdr-credentials' class This: @@ -386,7 +387,7 @@ def credentials(cmdr: str) -> Optional[Tuple[str, str]]: :param cmdr: The commander to get credentials for :return: The credentials, or None """ - logger.trace_if(CMDR_EVENTS, f'{cmdr=}') + logger.trace_if(CMDR_CREDS, f'{cmdr=}') # Credentials for cmdr if not cmdr: @@ -405,12 +406,12 @@ def credentials(cmdr: str) -> Optional[Tuple[str, str]]: if idx >= len(edsm_usernames) or idx >= len(edsm_apikeys): return None - logger.trace_if(CMDR_EVENTS, f'{cmdr=}: returning ({edsm_usernames[idx]=}, {edsm_apikeys[idx]=})') + logger.trace_if(CMDR_CREDS, f'{cmdr=}: returning ({edsm_usernames[idx]=}, {edsm_apikeys[idx]=})') return (edsm_usernames[idx], edsm_apikeys[idx]) else: - logger.trace_if(CMDR_EVENTS, f'{cmdr=}: returning None') + logger.trace_if(CMDR_CREDS, f'{cmdr=}: returning None') return None From afda16853bf01cb16da47e1cc2be5c23210c4136 Mon Sep 17 00:00:00 2001 From: Chris Henning Date: Sun, 12 Jun 2022 17:59:18 -0400 Subject: [PATCH 15/24] Change this log to debug level --- plugins/eddn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index bc458494..79d0ac81 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1337,7 +1337,7 @@ class EDDN: # Elisions entry = filter_localised(entry) if "USSType" in entry and entry["USSType"] == "$USS_Type_MissionTarget;": - logger.warning("USSType is $USS_Type_MissionTarget;, dropping") + logger.debug("USSType is $USS_Type_MissionTarget;, dropping") return 'Dropping $USS_Type_MissionTarget;' # Can check SystemAddress here, but we'll remove it from this signal list, to be added to the batch if this.systemaddress is None or this.systemaddress != entry['SystemAddress']: From 43c5a3b88af40ac0f1d634fe08942d191c7bfa84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 17:02:47 +0000 Subject: [PATCH 16/24] build(deps-dev): bump flake8-noqa from 1.2.2 to 1.2.3 Bumps [flake8-noqa](https://github.com/plinss/flake8-noqa) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/plinss/flake8-noqa/releases) - [Commits](https://github.com/plinss/flake8-noqa/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: flake8-noqa 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 b4955270..66a45880 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,7 @@ flake8-docstrings==1.6.0 isort==5.10.1 flake8-isort==4.1.1 flake8-json==21.7.0 -flake8-noqa==1.2.2 +flake8-noqa==1.2.3 flake8-polyfill==1.0.2 flake8-use-fstring==1.3 From d5ec54dbea99ae43563afbe50a2cc9e37c5ddd12 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 15 Jun 2022 12:11:01 +0100 Subject: [PATCH 17/24] eddn/fsssignaldiscovered: Start on cleaning up chennin's work --- plugins/eddn.py | 82 +++++++++++++++---------------------------------- 1 file changed, 24 insertions(+), 58 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 79d0ac81..7d1d6075 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -152,7 +152,7 @@ class EDDN: self.session.headers['User-Agent'] = user_agent self.replayfile: Optional[TextIO] = None # For delayed messages self.replaylog: List[str] = [] - self.fsssignals: Optional[Mapping[str, Any]] = None + self.fss_signals: List[Mapping[str, Any]] = [] if config.eddn_url is not None: self.eddn_url = config.eddn_url @@ -1308,31 +1308,33 @@ class EDDN: this.eddn.export_journal_entry(cmdr, entry, msg) return None - def batch_journal_fsssignaldiscovered( + def enqueue_journal_fsssignaldiscovered(self, entry: MutableMapping[str, Any]) -> None: + """ + Queue up an FSSSignalDiscovered journal event for later sending. + + :param entry: the journal entry to batch + """ + if entry is None or entry == "": + logger.warning(f"Supplied event was empty: {entry!r}") + return + + logger.trace_if("plugin.eddn.fsssignaldiscovered", f"Appending FSSSignalDiscovered entry:\n" + f" {json.dumps(entry)}") + self.fss_signals.append(entry) + + def export_journal_fsssignaldiscovered( self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] ) -> Optional[str]: """ - Augment and keep FSSSignalDiscovered journal events + Send an FSSSignalDiscovered message to EDDN on the correct schema. :param cmdr: the commander under which this upload is made :param system_name: Name of current star system :param system_starpos: Coordinates of current star system :param is_beta: whether or not we are in beta mode - :param entry: the journal entry to batch + :param entry: the non-FSSSignalDiscovered journal entry that triggered this batch send """ - # { - # "timestamp": "2021-01-15T02:54:18Z", - # "event": "FSSSignalDiscovered", - # "SystemAddress": 1900279744859, - # "SignalName": "$USS_HighGradeEmissions;", - # "SignalName_Localised": "Unidentified signal source", - # "USSType": "$USS_Type_ValuableSalvage;", - # "USSType_Localised": "Encoded emissions", - # "SpawningState": "", - # "SpawningFaction": "Free Marlinists of Carinae", - # "ThreatLevel": 0, - # "TimeRemaining": 718.508789 - # } + logger.trace_if("plugin.eddn", f"This non-FSSS entry is {json.dumps(entry)}") ####################################################################### # Elisions entry = filter_localised(entry) @@ -1350,30 +1352,11 @@ class EDDN: entry.pop(removekey) ####################################################################### - if not self.fsssignals: - self.fsssignals = [] - if entry is not None and entry != "": - logger.trace_if("plugin.eddn", f"Appending FSSSignalDiscovered entry: {json.dumps(entry)}") - self.fsssignals.append(entry) - - def export_journal_fsssignaldiscovered( - self, cmdr: str, system_name: str, system_starpos: list, is_beta: bool, entry: MutableMapping[str, Any] - ) -> Optional[str]: - logger.trace_if("plugin.eddn", f"This non-FSSS entry is {json.dumps(entry)}") - """ - Send an FSSSignalDiscovered message to EDDN on the correct schema. - - :param cmdr: the commander under which this upload is made - :param system_name: Name of current star system - :param system_starpos: Coordinates of current star system - :param is_beta: whether or not we are in beta mode - :param entry: the non-FSSSignalDiscovered journal entry that triggered this batch send - """ msg = { '$schemaRef': f'https://eddn.edcd.io/schemas/fsssignaldiscovered/1{"/test" if is_beta else ""}', 'message': { "event": "FSSSignalDiscovered", - "signals": self.fsssignals + "signals": self.fss_signals } } # Readd Horizons and Odyssey to the outer message not each signal @@ -1391,8 +1374,8 @@ class EDDN: return ret logger.trace_if("plugin.eddn", f"FSSSignalDiscovered batch is {json.dumps(msg)}") - this.eddn.export_journal_entry(cmdr, self.fsssignals[-1], msg) - self.fsssignals = None + this.eddn.export_journal_entry(cmdr, self.fss_signals[-1], msg) + self.fss_signals = [] return None def canonicalise(self, item: str) -> str: @@ -1737,25 +1720,8 @@ 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 SystemName, 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 == 'fsssignaldiscovered': - # Drop the event if we don't know system/starpos. Do something else? - if system is None or 'StarPos' not in state or state['StarPos'] is None: - return "" - this.eddn.batch_journal_fsssignaldiscovered( - cmdr, - system, - state['StarPos'], - is_beta, - entry - ) + this.eddn.enqueue_journal_fsssignaldiscovered(entry) elif event_name == 'fssallbodiesfound': return this.eddn.export_journal_fssallbodiesfound( @@ -1775,7 +1741,7 @@ def journal_entry( # noqa: C901, CCR001 entry ) # Simple queue: send batched FSSSignalDiscovereds once a non-FSSSignalDiscovered is observed - if event_name != 'fsssignaldiscovered' and this.eddn.fsssignals is not None and len(this.eddn.fsssignals) > 0: + if event_name != 'fsssignaldiscovered' and this.eddn.fss_signals is not None and len(this.eddn.fss_signals) > 0: return this.eddn.export_journal_fsssignaldiscovered( cmdr, system, From 37c88aeefc419b8a3bea320d0ad19ababf777da7 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 15 Jun 2022 13:19:13 +0100 Subject: [PATCH 18/24] eddn/fsssignaldiscovered: Further cleanup * Move call to `export_journal_fsssignaldiscovered` to top-level of event processing. This ensures we'd still have the *previous* system tracked when running under Odyssey. Also, we can't return any result from this, as we'd still need to process things like `Location` otherwise. * Use `logger.trace_if("plugin.eddn.fsssignaldiscovered", ...)` * Perform all sanity checks, elisions and augmentations in the "not FSSSignalDiscovered event" sending code. --- plugins/eddn.py | 108 +++++++++++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 39 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 7d1d6075..2c8e8916 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1334,48 +1334,75 @@ class EDDN: :param is_beta: whether or not we are in beta mode :param entry: the non-FSSSignalDiscovered journal entry that triggered this batch send """ - logger.trace_if("plugin.eddn", f"This non-FSSS entry is {json.dumps(entry)}") + logger.trace_if("plugin.eddn.fsssignaldiscovered", f"This other event is: {json.dumps(entry)}") ####################################################################### - # Elisions - entry = filter_localised(entry) - if "USSType" in entry and entry["USSType"] == "$USS_Type_MissionTarget;": - logger.debug("USSType is $USS_Type_MissionTarget;, dropping") - return 'Dropping $USS_Type_MissionTarget;' - # Can check SystemAddress here, but we'll remove it from this signal list, to be added to the batch - if this.systemaddress is None or this.systemaddress != entry['SystemAddress']: - logger.warning("SystemAddress isn't current location! Can't add augmentations!") + # Location cross-check and augmentation setup + ####################################################################### + # Determine if this is Horizons order or Odyssey order + if entry['event'] in ('Location', 'FSDJump', 'CarrierJump'): + # Odyssey order, use this new event's data for cross-check + aug_systemaddress = entry['SystemAddress'] + aug_starsystem = entry['StarSystem'] + aug_starpos = entry['StarPos'] + + else: + # Horizons order, so use tracked data for cross-check + aug_systemaddress = this.systemaddress + aug_starsystem = system_name + aug_starpos = system_starpos + + if aug_systemaddress != self.fss_signals[0]['SystemAddress']: + logger.warning("First signal's SystemAddress doesn't match current location: " + f"{self.fss_signals[0]['SystemAddress']} != {aug_systemaddress}") + self.fss_signals = [] return 'Wrong System! Missed jump ?' - - # Horizons/Odyssey will be readded later - for removekey in ["TimeRemaining", "horizons", "odyssey", "SystemAddress"]: - if removekey in entry: - entry.pop(removekey) ####################################################################### - msg = { + # Build basis of message + msg: Dict = { '$schemaRef': f'https://eddn.edcd.io/schemas/fsssignaldiscovered/1{"/test" if is_beta else ""}', 'message': { - "event": "FSSSignalDiscovered", - "signals": self.fss_signals + "event": "FSSSignalDiscovered", + "timestamp": self.fss_signals[0]['timestamp'], + "SystemAddress": aug_systemaddress, + "StarSystem": aug_starsystem, + "StarPos": aug_starpos, + "signals": [], } } - # Readd Horizons and Odyssey to the outer message not each signal - for gamever in ["horizons", "odyssey"]: - if gamever in entry and gamever not in msg: - msg[gamever] = entry[gamever] - # Another SystemAddress check, however: some events won't have it. Is it an issue? - if this.systemaddress is None or ('SystemAddress' in entry and this.systemaddress != entry['SystemAddress']): - logger.warning("SystemAddress isn't current location! Can't add augmentations!") - return 'Wrong System! Missed jump ?' + # Now add the signals, checking each is for the correct system, dropping + # any that aren't, and applying necessary elisions. + for s in self.fss_signals: + if s['SystemAddress'] != aug_systemaddress: + logger.warning("Signal's SystemAddress not current system, dropping: " + f"{s['SystemAddress']} != {aug_systemaddress}") + continue - ret = this.eddn.entry_augment_system_data(msg, system_name, system_starpos) - if isinstance(ret, str): - return ret + # Remove any _Localised keys (would only be in a USS signal) + s = filter_localised(s) - logger.trace_if("plugin.eddn", f"FSSSignalDiscovered batch is {json.dumps(msg)}") - this.eddn.export_journal_entry(cmdr, self.fss_signals[-1], msg) + # Drop Mission USS signals. + if "USSType" in s and s["USSType"] == "$USS_Type_MissionTarget;": + logger.trace_if("plugin.eddn.fsssignaldiscovered", "USSType is $USS_Type_MissionTarget;, dropping") + continue + + # Remove any `TimeRemaining` (USS) or `SystemAddress` keys + s.pop('TimeRemaining', None) + s.pop('SystemAddress', None) + + msg['message']['signals'].append(s) + + # `horizons` and `odyssey` augmentations + msg['message']['horizons'] = entry['Horizons'] + msg['message']['odyssey'] = entry['Odyssey'] + + logger.trace_if("plugin.eddn.fsssignaldiscovered", f"FSSSignalDiscovered batch is {json.dumps(msg)}") + + # Fake an 'entry' as it's only there for some "should we send replay?" checks in the called function. + this.eddn.export_journal_entry(cmdr, {'entry': 'send_fsssignaldiscovered'}, msg) self.fss_signals = [] + return None def canonicalise(self, item: str) -> str: @@ -1628,6 +1655,18 @@ def journal_entry( # noqa: C901, CCR001 this.horizons = entry['horizons'] = state['Horizons'] this.odyssey = entry['odyssey'] = state['Odyssey'] + # Simple queue: send batched FSSSignalDiscovered once a non-FSSSignalDiscovered is observed + if event_name != 'fsssignaldiscovered' and this.eddn.fss_signals: + # We can't return here, we still might need to otherwise process this event, + # so errors will never be shown to the user. + this.eddn.export_journal_fsssignaldiscovered( + cmdr, + system, + state['StarPos'], + is_beta, + entry + ) + # Track location if event_name == 'supercruiseexit': # For any orbital station we have no way of determining the body @@ -1740,15 +1779,6 @@ def journal_entry( # noqa: C901, CCR001 is_beta, entry ) - # Simple queue: send batched FSSSignalDiscovereds once a non-FSSSignalDiscovered is observed - if event_name != 'fsssignaldiscovered' and this.eddn.fss_signals is not None and len(this.eddn.fss_signals) > 0: - return this.eddn.export_journal_fsssignaldiscovered( - cmdr, - system, - state['StarPos'], - is_beta, - entry - ) # Send journal schema events to EDDN, but not when on a crew if (config.get_int('output') & config.OUT_SYS_EDDN and not state['Captain'] and From 77203c72274a411f4ec7532dbe117d9d8d435dee Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 15 Jun 2022 14:34:06 +0100 Subject: [PATCH 19/24] eddn/fsssignaldiscovered: Misc fixups * Need to remove `event`, `horizons` and `odyssey` per signal. * It's lower case `horizons` and `odyssey` in a(n augmented) journal event. * It's `event`, not `entry` that `export_journal_entry()` will look for. --- plugins/eddn.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 2c8e8916..3b1323fb 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1387,20 +1387,23 @@ class EDDN: logger.trace_if("plugin.eddn.fsssignaldiscovered", "USSType is $USS_Type_MissionTarget;, dropping") continue - # Remove any `TimeRemaining` (USS) or `SystemAddress` keys + # Remove any key/values that shouldn't be there per signal + s.pop('event', None) + s.pop('horizons', None) + s.pop('odyssey', None) s.pop('TimeRemaining', None) s.pop('SystemAddress', None) msg['message']['signals'].append(s) # `horizons` and `odyssey` augmentations - msg['message']['horizons'] = entry['Horizons'] - msg['message']['odyssey'] = entry['Odyssey'] + msg['message']['horizons'] = entry['horizons'] + msg['message']['odyssey'] = entry['odyssey'] logger.trace_if("plugin.eddn.fsssignaldiscovered", f"FSSSignalDiscovered batch is {json.dumps(msg)}") # Fake an 'entry' as it's only there for some "should we send replay?" checks in the called function. - this.eddn.export_journal_entry(cmdr, {'entry': 'send_fsssignaldiscovered'}, msg) + this.eddn.export_journal_entry(cmdr, {'event': 'send_fsssignaldiscovered'}, msg) self.fss_signals = [] return None From 7bf2a2ef31927e80986361a1ef1407d7fd81729a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:03:56 +0000 Subject: [PATCH 20/24] build(deps-dev): bump flake8-noqa from 1.2.3 to 1.2.5 Bumps [flake8-noqa](https://github.com/plinss/flake8-noqa) from 1.2.3 to 1.2.5. - [Release notes](https://github.com/plinss/flake8-noqa/releases) - [Commits](https://github.com/plinss/flake8-noqa/compare/v1.2.3...v1.2.5) --- updated-dependencies: - dependency-name: flake8-noqa 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 66a45880..44dbaf2d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,7 @@ flake8-docstrings==1.6.0 isort==5.10.1 flake8-isort==4.1.1 flake8-json==21.7.0 -flake8-noqa==1.2.3 +flake8-noqa==1.2.5 flake8-polyfill==1.0.2 flake8-use-fstring==1.3 From 8dfd475b094b3693cc0f93e038c500dd68fce210 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 17:04:37 +0000 Subject: [PATCH 21/24] build(deps): bump certifi from 2022.5.18.1 to 2022.6.15 Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.5.18.1 to 2022.6.15. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/compare/2022.05.18.1...2022.06.15) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1ad9094f..c7e5c4fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -certifi==2022.5.18.1 +certifi==2022.6.15 requests==2.28.0 watchdog==2.1.9 # Commented out because this doesn't package well with py2exe From 57953ef3f279ea14c1d799fac03b85c789f75592 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 17 Jun 2022 12:44:11 +0100 Subject: [PATCH 22/24] EDDN: Ensure *all* _Localised key/values removed This has been missed, based on Journal examples, and has been causing issues at least for `ApproachSettlement`. So, `filter_localised()` now used in: `export_journal_navroute()` `export_journal_approachsettlement()` `export_journal_fssallbodiesfound()` --- plugins/eddn.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 3b1323fb..3c7dfeff 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1125,6 +1125,9 @@ class EDDN: del entry['horizons'] # END WORKAROUND + + # In case Frontier ever add any + entry = filter_localised(entry) ####################################################################### ####################################################################### @@ -1185,6 +1188,13 @@ class EDDN: # WORKAROUND END ####################################################################### + ####################################################################### + # Elisions + ####################################################################### + # In case Frontier ever add any + entry = filter_localised(entry) + ####################################################################### + ####################################################################### # Augmentations ####################################################################### @@ -1228,6 +1238,13 @@ class EDDN: # "event": "FSSAllBodiesFound", # "timestamp": "2022-02-09T18:15:14Z" # } + ####################################################################### + # Elisions + ####################################################################### + # In case Frontier ever add any + entry = filter_localised(entry) + ####################################################################### + ####################################################################### # Augmentations ####################################################################### From f9e8e9f21209add78bc0e394e88896c70c667af5 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 18 Jun 2022 12:20:29 +0100 Subject: [PATCH 23/24] Python: Bump version to 3.10.5 * Installer build works and .exe from it runs. --- .python-version | 2 +- ChangeLog.md | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.python-version b/.python-version index 8d7f852b..c84ccce9 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10.4 +3.10.5 diff --git a/ChangeLog.md b/ChangeLog.md index 6e39b8ec..ff6a1043 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,7 +9,7 @@ produce the Windows executables and installer. --- -* We now test against, and package with, Python 3.10.4. +* We now test against, and package with, Python 3.10.5. **As a consequence of this we no longer support Windows 7. This is due to @@ -27,6 +27,13 @@ produce the Windows executables and installer. --- +Pre-Release 5.4.1-rc1 +=== + +* We now test against, and package with, Python 3.10.5. + +--- + Release 5.4.0 === From e1354c34827369da3c60772d219f138e003c830a Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 18 Jun 2022 13:53:07 +0100 Subject: [PATCH 24/24] Release 5.4.1: appversion & changelog --- ChangeLog.md | 19 ++++++++++++++++++- config/__init__.py | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index ff6a1043..df177f24 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -27,10 +27,27 @@ produce the Windows executables and installer. --- -Pre-Release 5.4.1-rc1 +Release 5.4.1 === * We now test against, and package with, Python 3.10.5. +* If for any reason `EDMarketConnector.exe` fails to shutdown and exit when + asked to by the upgrade process this should no longer result in a spontaneous + system reboot. Closes [#1492](https://github.com/EDCD/EDMarketConnector/issues/1492). + + A manual reboot will still be required to complete the EDMarketConnector + upgrade process and we make no guarantees about the stability of the + application until this is done. +* The new EDDN `fsssignaldiscovered/1` schema has been implemented. +* EDSM trace level logging will no longer log API credentials unless explicitly + asked to, separately from other EDSM API trace logging. + +Bug Fixes +--- + +* EDDN: Ensure we always remove all `_Localised` suffix keys in data. This + was missed in some recent new schemas and turned out to be an issue for at + least `approachsettlement/1`. --- diff --git a/config/__init__.py b/config/__init__.py index 924151ef..c72fe4cb 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.4.1-alpha0' +_static_appversion = '5.4.1' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD'