From f78506161de1ae6e44c14f0d1c8487889ab06e9c Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 29 Jun 2022 13:58:46 +0100 Subject: [PATCH] [CI] Fix failing Windows Python 3.10 tests A recent dependency change caused the tests running on GitHub Actions under Python 3.10.5 on Windows to fail when starting pytest run: ... INTERNALERROR> File "", line 123, in acquire INTERNALERROR> KeyError: xxxx The cause seems to have been a newer version of chardet package released recently. * Fixed by pinning chardet to v4 * Also pin Windows version to 2019 to match packaging workflow See-also: https://github.com/deluge-torrent/deluge/actions/runs/2578427588 Issue: https://github.com/chardet/chardet/issues/265 --- .github/workflows/ci.yml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdfebc4c3..82a9fd99a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: path: /cores test-windows: - runs-on: windows-latest + runs-on: windows-2019 strategy: matrix: python-version: ["3.7", "3.10"] diff --git a/requirements.txt b/requirements.txt index 30073fc88..d5498836a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ pyxdg pillow mako setuptools -chardet +chardet==4.0.0 setproctitle pywin32; sys_platform == 'win32' certifi; sys_platform == 'win32'