PBR

setuptools deprecation warnings with tox isolated builds

Bug #1993830 reported by Peter Portante
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
New
Undecided
Unassigned

Bug Description

In the pbench project [1]

When we run our tests via tox, we see the following warnings printed:

.package recreate: /var/tmp/pportant/tox/.package
.package installdeps: setuptools >= 46.1.3., wheel >= 0.34.2
/var/tmp/pportant/tox/.package/lib/python3.10/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/var/tmp/pportant/tox/.package/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(

We run with tox's `isolated_build` parameter set to True [2].

"James" from the Boston Python Slack workspace did some further digging and found the culprit to be how pbr works with isolated builds (if you turn off isolated builds, the warnings don't occur):

23:22 [snoopjedi@denton ~/repos/pbench-src (main *)]
$ PYTHONWARNINGS="error:setup.py" tox -e py39 agent python
Error parsing
Traceback (most recent call last):
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/pbr/core.py", line 111, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/pbr/util.py", line 274, in cfg_to_args
    kwargs = setup_cfg_to_setup_kwargs(config, script_args)
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/pbr/util.py", line 407, in setup_cfg_to_setup_kwargs
    cmd = cls(dist)
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/setuptools/__init__.py", line 106, in __init__
    super().__init__(dist)
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 62, in __init__
    self.initialize_options()
  File "/var/tmp/snoopjedi/tox/.package/lib/python3.9/site-packages/setuptools/command/install.py", line 34, in initialize_options
    warnings.warn(
setuptools._deprecation_warning.SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
error in setup command: Error parsing /home/snoopjedi/repos/pbench-src/setup.cfg: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

We are using pbr 5.6.0.

[1] https://github.com/distributed-system-analysis/pbench
[2] https://github.com/distributed-system-analysis/pbench/blob/main/tox.ini#L3

Tags: setuptools
summary: - setuptools decprecation warnings with tox isolated builds
+ setuptools deprecation warnings with tox isolated builds
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.