In pypa/setuptools#2865 (comment), I learned that pytest-virtualenv is importing distutils, which raises Warnings (treated as errors) in the Setuptools test suite when Setuptools is attempting to supply the distutils module. Distutils is deprecated in Python 3.10 and slated for removal in Python 3.12, so should be removed from this package.