Repository: mozilla/bleach (language: python)

Issue:
support python 3.11 (october 3rd, 2022)
When Python 3.11 comes out, we should add support for it.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 9fb496ea..a32358f6 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -21,8 +21,7 @@ jobs:
         with:
           path: ~/.cache/pip
           key:
-            ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')
-            }}
+            ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
           restore-keys: |
             ${{ matrix.os }}-${{ matrix.python-version }}-
 
diff --git a/setup.py b/setup.py
index 30aefb6b..befccdec 100755
--- a/setup.py
+++ b/setup.py
@@ -79,6 +79,7 @@ def get_version():
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
         "Topic :: Software Development :: Libraries :: Python Modules",
diff --git a/tox.ini b/tox.ini
index 5523e42d..8ab0e3e4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,9 +2,9 @@
 
 [tox]
 envlist =
-    py{37,38,39,310,py3}
-    py{37,38,39,310,py3}-tinycss2
-    py{37,38,39,310}-build-no-lang
+    py{37,38,39,310,311,py3}
+    py{37,38,39,310,311,py3}-tinycss2
+    py{37,38,39,310,311}-build-no-lang
     docs
     format-check
     lint
@@ -40,6 +40,12 @@ commands =
     pytest {posargs:-v}
     python setup.py build
 
+[testenv:py311-tinycss2]
+extras = dev,css
+commands =
+    pytest {posargs:-v}
+    python setup.py build
+
 [testenv:py3-tinycss2]
 extras = dev,css
 commands =
@@ -70,6 +76,12 @@ setenv =
 commands =
     python setup.py build
 
+[testenv:py311-build-no-lang]
+setenv =
+    LANG=
+commands =
+    python setup.py build
+
 [testenv:lint]
 basepython = python3.9
 changedir = scripts


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 02ab4836..1c7ef087 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,7 +9,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.8"]
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8"]
         os: [ubuntu-latest, macos-latest, windows-latest]
 
     steps:
@@ -30,8 +30,7 @@ jobs:
         with:
           path: ${{ steps.pip-cache.outputs.dir }}
           key:
-            ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')
-            }}
+            ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
           restore-keys: |
             ${{ matrix.os }}-${{ matrix.python-version }}-