Repository: collective/collective.recipe.backup (language: python)

Issue:
Drop code-analysis, add other QA checks
I mostly care that `isort` and `black` are in order. `plone.recipe.codeanalysis` can be tricky to configure right for this, and not much seems to happen in that repo anymore.
There is https://github.com/plone/code-analysis-action now, using https://github.com/plone/code-quality


Discussion / hints:

Fix patch:
diff --git a/buildout.cfg b/buildout.cfg
index 7f4fb65..0d8f907 100644
--- a/buildout.cfg
+++ b/buildout.cfg
@@ -3,8 +3,6 @@ index = https://pypi.org/simple/
 develop = .
 parts =
     test
-    coverage-test
-    z3c.coverage
     backup
     code-analysis
 show-picked-versions = true
@@ -24,21 +22,6 @@ eggs = collective.recipe.backup[tests]
 defaults = ['--auto-color', '--auto-progress', '--ndiff']
 
 
-[coverage-test]
-# Note: our test coverage is terrible, but also terribly inaccurate.
-# No line of our Recipe.__init__ is run, even though we definitely call it.
-# I guess coverage has trouble with our many doctests.
-recipe = zc.recipe.testrunner
-eggs = ${test:eggs}
-defaults = ['--coverage', '../../coverage', '-v', '--auto-progress']
-
-
-[z3c.coverage]
-# Create a coverage report by calling bin/coveragereport.
-# It will end up in coverage/reports/all.html
-recipe = zc.recipe.egg:scripts
-
-
 [code-analysis]
 recipe = plone.recipe.codeanalysis
 directory = ${buildout:directory}/src/collective/recipe/backup
@@ -72,47 +55,43 @@ flake8-extensions =
     pep8-naming
 
 [versions]
-backports.functools-lru-cache = 1.5
-check-manifest = 0.37
-configparser = 3.7.4
-coverage = 4.5.3
-entrypoints = 0.3
-enum34 = 1.1.6
-flake8 = 3.7.7
-flake8-blind-except = 0.1.1
-flake8-coding = 1.3.1
-flake8-debugger = 3.1.0
+# unpin these, so we use whatever is available without restarting buildout:
+setuptools =
+zc.buildout =
+
+# other:
+build = 0.8.0
+check-manifest = 0.48
+flake8 = 5.0.4
+flake8-blind-except = 0.2.1
+flake8-coding = 1.3.2
+flake8-debugger = 4.1.2
 flake8-deprecated = 1.3
-flake8-isort = 2.7.0
-flake8-pep3101 = 1.2.1
-flake8-string-format = 0.2.3
+flake8-isort = 4.2.0
+flake8-pep3101 = 1.3.0
+flake8-string-format = 0.3.0
 flake8-todo = 0.7
-functools32 = 3.2.3.post2
-futures = 3.2.0
-isort = 4.3.16
-lxml = 4.3.3
-manuel = 1.10.1
-mccabe = 0.6.1
+isort = 5.10.1
+lxml = 4.9.1
+manuel = 1.12.4
+mccabe = 0.7.0
+packaging = 21.3
+pep517 = 0.13.0
+pep8-naming = 0.13.2
 plone.recipe.codeanalysis = 3.0.1
-pycodestyle = 2.5.0
-pyflakes = 2.1.1
-setuptools = 42.0.2
-six = 1.12.0
-testfixtures = 6.6.2
-typing = 3.6.6
-WebOb = 1.8.5
-z3c.coverage = 2.1.0
-zc.buildout = 2.13.3
+pycodestyle = 2.9.1
+pyflakes = 2.5.0
+pyparsing = 3.0.9
+six = 1.16.0
+tomli = 2.0.1
+WebOb = 1.8.7
 zc.recipe.deployment = 1.3.0
 zc.recipe.egg = 2.0.7
-zc.recipe.testrunner = 2.0.0
+zc.recipe.testrunner = 2.2
 zc.zdaemonrecipe = 1.0.0
-ZConfig = 3.4.0
+ZConfig = 3.6.0
 zdaemon = 4.3
-zope.exceptions = 4.3
-zope.interface = 4.6.0
-zope.testing = 4.7
-zope.testrunner = 5.0
-
-flake8-polyfill = 1.0.2
-pep8-naming = 0.8.2
+zope.exceptions = 4.5
+zope.interface = 5.4.0
+zope.testing = 4.10
+zope.testrunner = 5.5.1
diff --git a/news/62.breaking b/news/62.breaking
new file mode 100644
index 0000000..a76c587
--- /dev/null
+++ b/news/62.breaking
@@ -0,0 +1,2 @@
+Drop support for Python 2.7-3.7, add support for 3.10.
+[maurits]
diff --git a/requirements.txt b/requirements.txt
index 0101081..768c901 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,11 +1,10 @@
-setuptools==42.0.2
-zc.buildout==2.13.3
-wheel
-
-# Windows specific down here (has to be installed here, fails in buildout)
-# Dependency of zope.sendmail:
-pywin32 ; platform_system == 'Windows'
-# SSL Certs on Windows, because Python is missing them otherwise:
-certifi ; platform_system == 'Windows'
-# Dependency of collective.recipe.omelette:
-ntfsutils ; platform_system == 'Windows' and python_version < '3.0'
+# Note: pip 22.2+ leads to extra warnings in the output, which leads to failures in doctests.
+# Requires-Python support missing.
+# Traceback (most recent call last):
+#   File ".../python3.10/site-packages/zc/buildout/patches.py", line 52, in patch_PackageIndex
+#     from pip._internal.index.collector import HTMLPage
+# ImportError: cannot import name 'HTMLPage' from 'pip._internal.index.collector' (/Users/maurits/community/collective.recipe.backup/lib/python3.10/site-packages/pip/_internal/index/collector.py)
+pip==22.1.2
+setuptools==65.3.0
+wheel==0.37.1
+zc.buildout==3.0.0rc3
diff --git a/setup.py b/setup.py
index f315450..b7499a5 100644
--- a/setup.py
+++ b/setup.py
@@ -47,13 +47,10 @@ def read(*rnames):
         'Intended Audience :: Developers',
         'Intended Audience :: System Administrators',
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.6',
-        'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3.9',
+        'Programming Language :: Python :: 3.10',
         'Topic :: Software Development :: Build Tools',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'License :: OSI Approved :: GNU General Public License (GPL)',
diff --git a/tox.ini b/tox.ini
index 9005e67..68ca8b4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
 [tox]
 envlist =
     lint
-    py{27,36,37,38,39}
+    py{38,39,310}
 
 [testenv]
 usedevelop = false
@@ -18,7 +18,6 @@ basepython = python3.8
 deps =
     -r requirements.txt
 commands_pre =
-    {envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install code-analysis
+    {envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} code-analysis:directory={toxinidir}/src/collective/recipe/backup install code-analysis
 commands =
     {envbindir}/code-analysis
-


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index c1b1b72..760990c 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -16,11 +16,9 @@ jobs:
       matrix:
         config:
         # [Python version, tox env]
-        - ["2.7",   "py27"]
-        - ["3.6",   "py36"]
-        - ["3.7",   "py37"]
         - ["3.8",   "py38"]
         - ["3.9",   "py39"]
+        - ["3.10",   "py310"]
         - ["3.8",   "lint"]
     name: ${{ matrix.config[1] }}
     steps:
diff --git a/src/collective/recipe/backup/tests/test_docs.py b/src/collective/recipe/backup/tests/test_docs.py
index ae3eda7..5552773 100644
--- a/src/collective/recipe/backup/tests/test_docs.py
+++ b/src/collective/recipe/backup/tests/test_docs.py
@@ -31,6 +31,8 @@
         # (re.compile('my-[rR]eg[eE]ps'), 'my-regexps')
         (re.compile(r"DEBUG:.*"), ""),  # Remove DEBUG lines.
         (re.compile(r"Not SVN Repository\n"), ""),  # svn warning
+        # newer pip can complain:
+        (re.compile(r"WARNING: Requires-Python support missing.\n"), ""),
         zc.buildout.testing.normalize_path,
     ]
 )