I run python setup.py or python3 setup.py which gives me PEP440Warning for unrelated packages that I am not going to fix:
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. PEP440Warning, /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'apturl (0.5.2ubuntu6)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. PEP440Warning, /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'ufw (0.34-rc-0ubuntu5)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. PEP440Warning,
I would like to disable this warning, and without much effort I tried several options -W :
- compliance module:
-W ignore:::pkg_resources: → warnings there, no message about invalid specification -W - match class name:
-W ignore::PEP440Warning:: → Invalid -W option ignored: unknown warning category: 'PEP440Warning' - corresponds to a fully qualified class name:
-W ignore::pkg_resources.PEP440Warning:: → Invalid -W option ignored: invalid module name: 'pkg_resources' (??) - matches message test:
-W ignore:PEP 440::: → warning there, no message about invalid specification -W - matches all warnings:
-W ignore warnings there
The last attempt leads me to believe that for some reason command line switching is not performed at all. Why?
python warnings setuptools
eudoxos
source share