Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider dropping pbr in favor of poetry #3051

Open
portante opened this issue Oct 21, 2022 · 1 comment
Open

Consider dropping pbr in favor of poetry #3051

portante opened this issue Oct 21, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@portante
Copy link
Member

We see a number of deprecation warnings whenever we run our tox builds (see the copy of the pbr bug filed below). I did a fair amount of digging into this problem and would like to propose we consider moving away from pbr in favor of poetry.

The Arcalot organization is using it with a fair amount of success.

Some various references found while digging:

Below is a copy of the pbr LaunchPad bug #1993830 filed:


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.

"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.
@portante portante added bug Agent Server Code Infrastructure packaging Issues related to software packaging labels Oct 21, 2022
@portante portante added this to the v0.72 milestone Oct 21, 2022
@portante portante self-assigned this Oct 21, 2022
@SnoopJ
Copy link

SnoopJ commented Oct 21, 2022

I would recommend thinking about splitting this issue in half, into a "remove pbr" half and an "adopt poetry" half. I did not dig deep into pbench during our conversation, but I didn't see anything that made me think setuptools is incapable of building the project. You may still want to switch to poetry for other reasons, though

@ndokos ndokos changed the title Consider dropping pbr in favor of use poetry Consider dropping pbr in favor of poetry Oct 25, 2022
@portante portante modified the milestones: v0.72, v0.73 Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To Do
Development

No branches or pull requests

2 participants