Move SetupTools metadata into pyproject.toml SetupTools 61 adds experimental support for reading metadata from pyproject.toml files instead of traditional setup.py or setup.cfg. PBR still seems to require the package name in setup.cfg for now, but otherwise hollow this file out moving everything to the new solution. Because this is experimental, silence a warning from SetupTools which states that. Also work around newer SetupTools complaints about namespace packages included as data by informing it that mudpy.tests and mudpy.tests.fixtures are included modules even though they really aren't.
Update warning filters for Python 3.11.0b1 etc Python 3.11.0b1 adds new deprecation warnings for "dead batteries" in the stdlib, both for our dependencies and ourself (telnetlib is used a bit in the selftest). Also some new warnings are cropping up with pip 22 and SetupTools 62, so filter those for now until they're solved. Drop a filter for deprecated sre_constants use in the pkg_resources vendored version of pyparsing which has recently been updated.
Various tox.ini improvements and cleanup Be more explicit about when we do and don't install the project in different testenvs by setting skip_install. This is currently redundant, but a sensible safeguard in case the implicit behavior from skipsdist and no usedevelop ever changes. Use shutil.rmtree() in place of calling `rm` so that we won't need an allowlist of executables outside the venv. Switch to tox's {envpython} replacement macro rather than invoking the interpreter by its assumed name, for improved portability. Inherit {[testenv]deps} in the deps list for any testenv which needs to extend it rather than duplicating its contents, for the sake of maintainability. Don't bother listing flake8 as an explicit dep in its testenv, since the flake8-bugbear plugin will pull it in as a requirement anyway. Update the DeprecationWarning comment about pyparsing now that the fix is available in 3.0.8 (but still not updated where it's being vendored).
Force UTF-8 mode for testing Add the PYTHONWARNDFAULTENCODING and PYTHONUTF8 envvars to guard against addition of any non-UTF-8 behaviors or reliance on implicit encoding default, and to make sure things will continue to work when these switches are on by default in future versions of the interpreter.
Ignore deprecation warnings for Python 3.11.0a7 pip._vendor.pyparsing.core and pkg_resources._vendor.pyparsing raise DeprecationWarning "module 'sre_constants' is deprecated" until a new release containing https://github.com/pyparsing/pyparsing/commit/3c03942 is vendored into pip and pkg_resources.
Use PBR as a PEP 517 build backend Recent versions of PBR are now capable of being integrated as a build backend per the PEP 517 specification, so that the setup.py script no longer needs to be invoked directly by anything. Declaring setup_requires is now done via a new pyproject.toml file instead. This allows us to avoid some recent deprecations in SetupTools, though the file itself needs to be retained as a stub for now since it still gets imported by PBR's wrapper of the SetupTools build_meta hooks.
Stop relying on usedevelop in tox At the moment, tox calls into setup.py directly when usedevelop is true, which causes legacy codepaths to be traversed during those tests. Switch to just adding the project directory to deps in the testenvs where we previously relied on it to get the project installed.
Update warning filter for SetupTools and filelock SetupTools 58.3.0 deprecated use of the setup_requires parameter as well as calls to easy_install and setup.py install. The filelock library (used by virtualenv, on which tox relies) is replacing its poll_intervall parameter with poll_interval and has deprecated the former in a 3.4.0 release. Ignore these with the PYTHONWARNINGS in tox.ini so they'll be filtered out.