From 5918cd650e98fdf7b58b66d834eb24150ae2bd6b Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Sat, 5 Nov 2022 00:40:28 +0100 Subject: [PATCH 1/2] Replace py-dateutil with python-dateutil `py-dateutil` is abandoned, it hasn't been touched since 2014. With Python 3.10, I receive errors like: `module 'collections' has no attribute 'Callable'`. `python-dateutil` seems to be the maintained fork of `py-dateutil`, and a drop-in replacement. Test suite runs equally with or without the changed dependency. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4b4c0b453..810028b38 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ gevent==22.10.1 jsonfield==3.1.0 Pillow # Optional dependency for django-ckeditor progressbar33==2.4 -py-dateutil==2.2 +python-dateutil cryptography pytz requests From f0db03131fd7a6d14b40ab001ea60a1df09a8b95 Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Sat, 5 Nov 2022 00:41:44 +0100 Subject: [PATCH 2/2] Run tests with python 3.10 I also tried 3.11 but that made the tests fail with all kinds of errors. --- .github/workflows/modoboa.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/modoboa.yml b/.github/workflows/modoboa.yml index 66e2615c5..cc66585f8 100644 --- a/.github/workflows/modoboa.yml +++ b/.github/workflows/modoboa.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: database: ['postgres', 'mysql'] - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, '3.10'] fail-fast: false steps: diff --git a/tox.ini b/tox.ini index 5b7a92fbb..5113d347e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39} +envlist = py{37,38,39,310} [testenv] changedir = test_project