summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Pillard <diox@users.noreply.github.com>2023-01-06 21:41:51 +0100
committerGitHub <noreply@github.com>2023-01-06 21:41:51 +0100
commitdc430c3be2b0b67cf28209b4a636e593ecda4819 (patch)
tree432420c782a39d93806d1f347037e6fe953570e4
parent7baae36e20e4e8eaf50b2eeb7f17ce971b64344e (diff)
downloaddjango-compressor-dc430c3be2b0b67cf28209b4a636e593ecda4819.tar.gz
Officially support Python 3.11 (#1168)
* Officially support Python 3.11 * Implement __hash__ in LazyScriptNamePrefixedUrl to fix Python 3.11 tests
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--compressor/tests/test_offline.py3
-rw-r--r--setup.py1
-rw-r--r--tox.ini3
4 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 124760f..49a4223 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,6 +33,8 @@ jobs:
toxenv: py39-4.1.X
- python: "3.10"
toxenv: py310-4.1.X
+ - python: "3.11"
+ toxenv: py311-4.1.X
runs-on: ubuntu-latest
steps:
diff --git a/compressor/tests/test_offline.py b/compressor/tests/test_offline.py
index 1af5cb2..c208048 100644
--- a/compressor/tests/test_offline.py
+++ b/compressor/tests/test_offline.py
@@ -55,6 +55,9 @@ class LazyScriptNamePrefixedUrl(str):
def __unicode__(self):
return str(self)
+ def __hash__(self):
+ return str.__hash__(str(self))
+
def split(self, *args, **kwargs):
"""
Override ``.split()`` method to make it work with ``{% static %}``.
diff --git a/setup.py b/setup.py
index 35e301b..4be7467 100644
--- a/setup.py
+++ b/setup.py
@@ -156,6 +156,7 @@ setup(
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
],
zip_safe=False,
diff --git a/tox.ini b/tox.ini
index 9e871cc..da0a67e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,12 +2,13 @@
envlist =
{py38,py39,py310}-3.2.X
{py38,py39,py310}-4.0.X
- {py38,py39,py310}-4.1.X
+ {py38,py39,py310,py311}-4.1.X
[testenv]
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
+ py311: python3.11
usedevelop = true
setenv =
CPPFLAGS=-O0