From 0d18d02a22b402971dd299a01755b09089e481fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 17:04:54 +0000 Subject: [PATCH 01/14] build(deps-dev): bump types-requests from 2.27.11 to 2.27.12 Bumps [types-requests](https://github.com/python/typeshed) from 2.27.11 to 2.27.12. - [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 154c5e0f..76f445d5 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.11 +types-requests==2.27.12 # Code formatting tools autopep8==1.6.0 From aaa9bc7ebf3e441ee2e4bdac0681183ede53840c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 17:05:00 +0000 Subject: [PATCH 02/14] build(deps-dev): bump pytest from 7.0.1 to 7.1.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.0. - [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.1...7.1.0) --- updated-dependencies: - dependency-name: pytest 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 154c5e0f..cb0a1e0f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -40,7 +40,7 @@ lxml==4.8.0 py2exe==0.11.1.0; sys_platform == 'win32' # Testing -pytest==7.0.1 +pytest==7.1.0 pytest-cov==3.0.0 # Pytest code coverage support coverage[toml]==6.3.2 # 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 ea716f406259f229a585740a7bd46e5d5218c2b5 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 15 Mar 2022 16:47:41 +0000 Subject: [PATCH 03/14] develop: post-release version bump to 5.3.4-beta0 --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index dacb7ce6..24299124 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.3' +_static_appversion = '5.3.4-beta0' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From 1c197a34b95b1116fa71351cd8ed156c27951cb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 17:05:23 +0000 Subject: [PATCH 04/14] build(deps-dev): bump mypy from 0.931 to 0.941 Bumps [mypy](https://github.com/python/mypy) from 0.931 to 0.941. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.931...v0.941) --- 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 154c5e0f..28c134d2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ flake8-noqa==1.2.1 flake8-polyfill==1.0.2 flake8-use-fstring==1.3 -mypy==0.931 +mypy==0.941 pep8-naming==0.12.1 safety==1.10.3 types-requests==2.27.11 From 66f09bdad2d36193f7e577dd43faea00e5b97fb2 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 16 Mar 2022 16:56:55 +0000 Subject: [PATCH 05/14] python: Bump up to v3.10.3 --- .github/workflows/windows-build.yml | 2 +- .python-version | 2 +- ChangeLog.md | 4 +++- docs/Releasing.md | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 6f8aa2a4..dd0dd026 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-python@v3 with: - python-version: "3.10.2" + python-version: "3.10.3" architecture: "x86" - name: Install python tools diff --git a/.python-version b/.python-version index 7b59a5ca..7d4ef04f 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10.2 +3.10.3 diff --git a/ChangeLog.md b/ChangeLog.md index 36d42dab..b3c09975 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.2. +* We now test against, and package with, Python 3.10.3. **As a consequence of this we no longer support Windows 7. This is due to @@ -27,6 +27,8 @@ produce the Windows executables and installer. --- +* We now test against, and package with, Python 3.10.3. + Release 5.3.3 === diff --git a/docs/Releasing.md b/docs/Releasing.md index d311c85a..2756f2fe 100644 --- a/docs/Releasing.md +++ b/docs/Releasing.md @@ -40,8 +40,8 @@ You will need several pieces of software installed, or the files from their auto-select some others). NB: If you have need to uninstall this it's "Windows Software Development Kit - Windows 10.0.19041.1" in "Apps & Features", *not* "Windows SDK AddOn". -1. [Python](https://python.org): 32-bit version of Python 3.9 for Windows. - [v3.9.5](https://www.python.org/downloads/release/python-395/) is the most +1. [Python](https://python.org): 32-bit version of Python 3.10 for Windows. + [v3.10.3](https://www.python.org/downloads/release/python-3103/) is the most recently tested version. You need the `Windows x86 executable installer` file, for the 32-bit version. Double-check the version against the `.python.version` file, as it should always contain the intended version. From f81ddddeedb265beb43c21a207a101b92af00d52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 17:07:42 +0000 Subject: [PATCH 06/14] build(deps-dev): bump types-requests from 2.27.12 to 2.27.13 Bumps [types-requests](https://github.com/python/typeshed) from 2.27.12 to 2.27.13. - [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 d49bb1f7..de7cc10d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -23,7 +23,7 @@ flake8-use-fstring==1.3 mypy==0.941 pep8-naming==0.12.1 safety==1.10.3 -types-requests==2.27.12 +types-requests==2.27.13 # Code formatting tools autopep8==1.6.0 From 221d15e54f4992717da17d235ff651ab10761e57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 17:07:55 +0000 Subject: [PATCH 07/14] build(deps-dev): bump setuptools from 60.9.3 to 60.10.0 Bumps [setuptools](https://github.com/pypa/setuptools) from 60.9.3 to 60.10.0. - [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.3...v60.10.0) --- 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 d49bb1f7..f57ca129 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.3 +setuptools==60.10.0 # Static analysis tools flake8==4.0.1 From 43bae134182d615f0a424beb66917ecbe5b838d8 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:42:04 +0000 Subject: [PATCH 08/14] EDMC.py: Use monitor.journal_newest_filename() --- EDMC.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/EDMC.py b/EDMC.py index 6c7163d7..ed36dfba 100755 --- a/EDMC.py +++ b/EDMC.py @@ -7,9 +7,8 @@ import json import locale import os import queue -import re import sys -from os.path import getmtime, join +from os.path import getmtime from time import sleep, time from typing import TYPE_CHECKING, Any, List, Optional @@ -65,8 +64,6 @@ l10n.Translations.install_dummy() SERVER_RETRY = 5 # retry pause for Companion servers [s] EXIT_SUCCESS, EXIT_SERVER, EXIT_CREDENTIALS, EXIT_VERIFICATION, EXIT_LAGGING, EXIT_SYS_ERR, EXIT_ARGS = range(7) -JOURNAL_RE = re.compile(r'^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$') - def versioncmp(versionstring) -> List: """Quick and dirty version comparison assuming "strict" numeric only version numbers.""" @@ -225,10 +222,7 @@ sys.path: {sys.path}''' monitor.currentdir = config.default_journal_dir logger.debug(f'logdir = "{monitor.currentdir}"') - logfiles = sorted((x for x in os.listdir(monitor.currentdir) if JOURNAL_RE.search(x)), - key=lambda x: x.split('.')[1:]) - - logfile = join(monitor.currentdir, logfiles[-1]) + logfile = monitor.journal_newest_filename(monitor.currentdir) logger.debug(f'Using logfile "{logfile}"') with open(logfile, 'r', encoding='utf-8') as loghandle: From 4b12a6c48469c1120a484a20a279d2291752dd32 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:46:35 +0000 Subject: [PATCH 09/14] monitor: Properly type new_journal_file Python was guessing and not allowing 'None', which it will be at shutdown if this code triggers. --- monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 2eee38e2..4451a5b4 100644 --- a/monitor.py +++ b/monitor.py @@ -430,7 +430,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below # Check whether new log file started, e.g. client (re)started. if emitter and emitter.is_alive(): - new_journal_file = self.logfile # updated by on_created watchdog callback + new_journal_file: Optional[str] = self.logfile # updated by on_created watchdog callback + else: # Poll try: From c89548c2ba41e5a591fe906baa341f0837923f66 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:49:02 +0000 Subject: [PATCH 10/14] monitor: journal_newest_filename(): Check for None directory os.listdir(None) operates on '.', which is wrong in this context, so be sure to avoid that. --- monitor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monitor.py b/monitor.py index 4451a5b4..ea54d33f 100644 --- a/monitor.py +++ b/monitor.py @@ -268,6 +268,10 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below :param journals_dir: The directory to check :return: The `str` form of the full path to the newest Journal file """ + # os.listdir(None) returns CWD's contents + if journals_dir is None: + return None + journal_files = (x for x in listdir(journals_dir) if self._RE_LOGFILE.search(x)) if journal_files: # Odyssey Update 11 has, e.g. Journal.2022-03-15T152503.01.log From 9f08b003c51c57ec16f23b1ea9860aeb1c681090 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:51:35 +0000 Subject: [PATCH 11/14] monitor: __navroute_retry(): be less noisy No need to log at INFO for the retry counts, as this appears to be working, make it DEBUG instead. This was making the EDMC.py output needlessly noisy. --- monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index ea54d33f..dd388875 100644 --- a/monitor.py +++ b/monitor.py @@ -2236,7 +2236,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below if self._navroute_retries_remaining == 0: return False - logger.info(f'Navroute read retry [{self._navroute_retries_remaining}]') + logger.debug(f'Navroute read retry [{self._navroute_retries_remaining}]') self._navroute_retries_remaining -= 1 if self._last_navroute_journal_timestamp is None: From 3a78daf66cfc68963c0be8d63581b542bce4b0bb Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:55:03 +0000 Subject: [PATCH 12/14] Use `daemon` flag for threads, not setDaemon() --- EDMarketConnector.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 6aa27ca3..b3eb10ba 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -1672,15 +1672,19 @@ class AppWindow(object): def exit_tray(self, systray: 'SysTrayIcon') -> None: """Tray icon is shutting down.""" - exit_thread = threading.Thread(target=self.onexit) - exit_thread.setDaemon(True) + exit_thread = threading.Thread( + target=self.onexit, + daemon=True, + ) exit_thread.start() def onexit(self, event=None) -> None: """Application shutdown procedure.""" if sys.platform == 'win32': - shutdown_thread = threading.Thread(target=self.systray.shutdown) - shutdown_thread.setDaemon(True) + shutdown_thread = threading.Thread( + target=self.systray.shutdown, + daemon=True, + ) shutdown_thread.start() config.set_shutdown() # Signal we're in shutdown now. From c18c1810de09f0db5340f3a4e52c5f9100926808 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 10:08:53 +0000 Subject: [PATCH 13/14] Pre-Release 5.3.4-beta1: appversion & changelog --- ChangeLog.md | 11 +++++++++++ config/__init__.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index b3c09975..8d7a111c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -29,6 +29,17 @@ produce the Windows executables and installer. * We now test against, and package with, Python 3.10.3. +Release 5.3.4 +=== + +Whilst EDMarketConnector.exe was fixed for the Odyssey Update 11 difference in +Journal file names, EDMC.exe was not. + +* Use the new common function for finding latest journal file in EDMC.py. +* Quietens some NavRoute related logging for the benefit of EDMC.py. This is + now at DEBUG level, rather than INFO. + + Release 5.3.3 === diff --git a/config/__init__.py b/config/__init__.py index 24299124..e9a18438 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.4-beta0' +_static_appversion = '5.3.4-beta1' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD' From 693463d3a0dbe58a1f72b83fc09a44a4398af3fd Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 22 Mar 2022 07:28:20 +0000 Subject: [PATCH 14/14] Release 5.3.4: appversion (changelog identical to -beta1) --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index e9a18438..fa485ba6 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.4-beta1' +_static_appversion = '5.3.4' _cached_version: Optional[semantic_version.Version] = None copyright = '© 2015-2019 Jonathan Harris, 2020-2022 EDCD'