2 ms·
As I understand it, the warning was only generated on "python setup.py test", and not on "from setuptools.command import test", which was the deleted module. I
by eesmith 2y ago
As I understand it, the warning was only generated on "python setup.py test", and not on "from setuptools.command import test", which was the deleted module.
If you never used 'setup.py test' then the warning was never generated.
Pulling up the first repo example I saw in the issue, https://github.com/IBM/python-sdk-core/commits/main/setup.py https://github.com/IBM/python-sdk-core/commits/main/setup.py back in 2019 was created using
from setuptools.command.test import test as TestCommand
...
class PyTest(TestCommand):
... code to forward to py.test ...
setup(
...
cmdclass={'test': PyTest},
...)
This was a clear adapter to use setup.py as a test runner, rather than using "pytest".
Most likely they all started using "pytest" and forgot that the adapter was there. It wasn't used and never generated warnings.
This is confirmed in the commit message from two hours ago at https://github.com/IBM/python-sdk-core/commit/bd44dd1152e01bb381f95e6295103991c0dd9ac4 https://github.com/IBM/python-sdk-core/commit/bd44dd1152e01b... :
> That means there will be no more `python setup.py test`, but it wasn't be used for a long time.
- skeledrew 2y agoThat makes sense. At least they aren't making a fuss about it too, and just did the update to resolve it. I see a setuptools maintainer also did a partial rollback to provide a minimal fix. Hopefully everyone has updated their stuff by the time the minimal fix is also to be removed. Also I fell like this says something important about testing practices. Code should be exercised enough with sufficient coverage, and anything not covered reviewed periodically to see if it can be updated or removed.