The difference between the functional-py310 and pep8 testenvs (per tox.ini) is a dep on autopep8, which pulls in 2 other packages[1]: 'toml' (unversioned) and 'pycodestyle >= 2.8.0'.
Modifying tox.ini to remove autopep8 and adding those two back in one at a time reveals that pycodestyle is at fault. Replacing it with unversioned pycodestyle lets the environment generate fine, so it's a problem with the specific version.
After letting the env generate with unversioned pycodestyle, examining it reveals that the flake8 version we're installing (3.8.4) requires[2] 'pycodestyle >= 2.6.0a1, < 2.7.0'. The <2.7.0 part was dropped in flake8 4.0.0.
We can't get flake8 4.0.0 because hacking requires flake8<3.9.0,>=3.8.0
Going back to the origin of the problem, the last version that allowed 'pycodestyle >= 2.6.0' (as opposed to 2.7.0 or 2.8.0) was 1.5.5. Pinning autopep8 to that in tox.ini allows the environment to be generated, and pep8 passes to boot.
ah ha!
The difference between the functional-py310 and pep8 testenvs (per tox.ini) is a dep on autopep8, which pulls in 2 other packages[1]: 'toml' (unversioned) and 'pycodestyle >= 2.8.0'.
Modifying tox.ini to remove autopep8 and adding those two back in one at a time reveals that pycodestyle is at fault. Replacing it with unversioned pycodestyle lets the environment generate fine, so it's a problem with the specific version.
After letting the env generate with unversioned pycodestyle, examining it reveals that the flake8 version we're installing (3.8.4) requires[2] 'pycodestyle >= 2.6.0a1, < 2.7.0'. The <2.7.0 part was dropped in flake8 4.0.0.
We can't get flake8 4.0.0 because hacking requires flake8< 3.9.0,> =3.8.0
On why hacking can't use the newer flake8, found these: /review. opendev. org/c/openstack /hacking/ +/816676 /github. com/PyCQA/ flake8/ pull/1438
https:/
https:/
Going back to the origin of the problem, the last version that allowed 'pycodestyle >= 2.6.0' (as opposed to 2.7.0 or 2.8.0) was 1.5.5. Pinning autopep8 to that in tox.ini allows the environment to be generated, and pep8 passes to boot.
[1] https:/ /github. com/hhatto/ autopep8/ blob/master/ setup.py# L12-L14 /github. com/PyCQA/ flake8/ blob/3. 8.4/setup. cfg#L45
[2] https:/