From 2126bb1e1db642811bebe8d114ef666457ca7ec7 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 12 May 2024 23:42:04 +0200 Subject: [PATCH 1/7] Core, CI: add py3.12 compat --- .github/workflows/unittests.yml | 5 +++-- WebHostLib/requirements.txt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index b2530bd06c7d..fd71a2024a8a 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -37,12 +37,13 @@ jobs: - {version: '3.9'} - {version: '3.10'} - {version: '3.11'} + - {version: '3.12'} include: - python: {version: '3.8'} # win7 compat os: windows-latest - - python: {version: '3.11'} # current + - python: {version: '3.12'} # current os: windows-latest - - python: {version: '3.11'} # current + - python: {version: '3.12'} # current os: macos-latest steps: diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index 62707d78cf1f..1d4fed4f7946 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -1,5 +1,6 @@ flask>=3.0.0 -pony>=0.7.17 +pony>=0.7.17; python_version < '3.12' +pony @ git+https://github.com/black-sliver/pony@5a37f6d59b6433d17d6d56b54f3726190e98c98f#0.7.17; python_version >= '3.12' waitress>=2.1.2 Flask-Caching>=2.1.0 Flask-Compress>=1.14 From bfedfb19ee7b942f44a9baa45b5fed35d6a36ff8 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 13 May 2024 00:16:44 +0200 Subject: [PATCH 2/7] Stardew Valley: Fix tests for Py3.12 --- worlds/stardew_valley/test/TestItems.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worlds/stardew_valley/test/TestItems.py b/worlds/stardew_valley/test/TestItems.py index 48bc1b152138..797218e8f3e7 100644 --- a/worlds/stardew_valley/test/TestItems.py +++ b/worlds/stardew_valley/test/TestItems.py @@ -93,42 +93,42 @@ def test_minsanity_1_metal_detector(self): options = get_minsanity_options() multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 1) + self.assertEqual(len(items), 1) def test_museumsanity_2_metal_detector(self): options = get_minsanity_options().copy() options[Museumsanity.internal_name] = Museumsanity.option_all multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 2) + self.assertEqual(len(items), 2) def test_shipsanity_full_shipment_1_metal_detector(self): options = get_minsanity_options().copy() options[Shipsanity.internal_name] = Shipsanity.option_full_shipment multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 1) + self.assertEqual(len(items), 1) def test_shipsanity_everything_2_metal_detector(self): options = get_minsanity_options().copy() options[Shipsanity.internal_name] = Shipsanity.option_everything multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 2) + self.assertEqual(len(items), 2) def test_complete_collection_2_metal_detector(self): options = get_minsanity_options().copy() options[Goal.internal_name] = Goal.option_complete_collection multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 2) + self.assertEqual(len(items), 2) def test_perfection_2_metal_detector(self): options = get_minsanity_options().copy() options[Goal.internal_name] = Goal.option_perfection multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 2) + self.assertEqual(len(items), 2) def test_maxsanity_4_metal_detector(self): options = get_minsanity_options().copy() @@ -137,4 +137,4 @@ def test_maxsanity_4_metal_detector(self): options[Goal.internal_name] = Goal.option_perfection multiworld = setup_solo_multiworld(options) items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector] - self.assertEquals(len(items), 4) + self.assertEqual(len(items), 4) From f67d497467773cc4f9a745605287b36f85d6312b Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 13 May 2024 00:47:57 +0200 Subject: [PATCH 3/7] ModuleUpdate: always install pkg_resources --- ModuleUpdate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ModuleUpdate.py b/ModuleUpdate.py index ed041bef4604..f49182bb7863 100644 --- a/ModuleUpdate.py +++ b/ModuleUpdate.py @@ -75,13 +75,13 @@ def update(yes: bool = False, force: bool = False) -> None: if not update_ran: update_ran = True + install_pkg_resources(yes=yes) + import pkg_resources + if force: update_command() return - install_pkg_resources(yes=yes) - import pkg_resources - prev = "" # if a line ends in \ we store here and merge later for req_file in requirements_files: path = os.path.join(os.path.dirname(sys.argv[0]), req_file) From 3aeada89468bda850ec0b516407a656f9fe6181e Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Thu, 16 May 2024 00:17:22 +0200 Subject: [PATCH 4/7] Docs: update supported python versions --- docs/running from source.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/running from source.md b/docs/running from source.md index 34083a603d1b..0b4ee2cc0d46 100644 --- a/docs/running from source.md +++ b/docs/running from source.md @@ -8,7 +8,7 @@ use that version. These steps are for developers or platforms without compiled r What you'll need: * [Python 3.8.7 or newer](https://www.python.org/downloads/), not the Windows Store version - * **Python 3.12 is currently unsupported** + * Python 3.12 is currently the newest supported version * pip: included in downloads from python.org, separate in many Linux distributions * Matching C compiler * possibly optional, read operating system specific sections @@ -31,7 +31,7 @@ After this, you should be able to run the programs. Recommended steps * Download and install a "Windows installer (64-bit)" from the [Python download page](https://www.python.org/downloads) - * **Python 3.12 is currently unsupported** + * [read above](#General) which versions are supported * **Optional**: Download and install Visual Studio Build Tools from [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). From 85dabe58ac6ab76d5a310683f8652f391946d6d3 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:06:36 +0200 Subject: [PATCH 5/7] WebHost: update pony to upstream 0.7.18 --- WebHostLib/requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index a18d7c458af8..c61a153d24e0 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -1,7 +1,6 @@ flask>=3.0.3 werkzeug>=3.0.3 -pony>=0.7.17; python_version < '3.12' -pony @ git+https://github.com/black-sliver/pony@5a37f6d59b6433d17d6d56b54f3726190e98c98f#0.7.17; python_version >= '3.12' +pony>=0.7.18 waitress>=3.0.0 Flask-Caching>=2.3.0 Flask-Compress>=1.15 From d8ce261fd61c26900dd5edb21e02ae954b9d6cd5 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:26:01 +0200 Subject: [PATCH 6/7] CI: test hosting update to py3.12 --- .github/workflows/unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 4f73bbd3b74d..9a3a6d11217f 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -71,7 +71,7 @@ jobs: os: - ubuntu-latest python: - - {version: '3.11'} # current + - {version: '3.12'} # current steps: - uses: actions/checkout@v4 From 68d0841066ab6d46629fdaebf4b62932acdfb871 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:01:34 +0200 Subject: [PATCH 7/7] Update docs/running from source.md --- docs/running from source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/running from source.md b/docs/running from source.md index 0b4ee2cc0d46..4bd335648d66 100644 --- a/docs/running from source.md +++ b/docs/running from source.md @@ -8,7 +8,7 @@ use that version. These steps are for developers or platforms without compiled r What you'll need: * [Python 3.8.7 or newer](https://www.python.org/downloads/), not the Windows Store version - * Python 3.12 is currently the newest supported version + * Python 3.12.x is currently the newest supported version * pip: included in downloads from python.org, separate in many Linux distributions * Matching C compiler * possibly optional, read operating system specific sections