DeprecationWarning: pkg_resources is deprecated as an API. The 'ppa-dev-tools==0.5.0' distribution was not found

Bug #2055636 reported by Nathan Teodosio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ppa-dev-tools
Fix Committed
Critical
Unassigned

Bug Description

I can't get ppa commands (ppa --help gives the same error) to work anymore:

--->
% ppa wait ppa:nteodosio/ubuntu-pro; printf \\007
/usr/local/bin/ppa:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('ppa-dev-tools==0.5.0', 'ppa')
Traceback (most recent call last):
  File "/usr/local/bin/ppa", line 4, in <module>
    __import__('pkg_resources').run_script('ppa-dev-tools==0.5.0', 'ppa')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3327, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3302, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 631, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 870, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ppa-dev-tools==0.5.0' distribution was not found and is required by the application
<---

Related branches

description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for reporting this Nathan, I've reproduced the deprecation warnings on jammy:

$ sudo python3 ./setup.py install
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
...
/usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.

I've been aware of this (LP: #1989617), guess it's time to switch build systems.

summary: - The 'ppa-dev-tools==0.5.0' distribution was not found
+ DeprecationWarning: pkg_resources is deprecated as an API. The 'ppa-
+ dev-tools==0.5.0' distribution was not found
Changed in ppa-dev-tools:
status: New → Triaged
importance: Undecided → Critical
Bryce Harrington (bryce)
Changed in ppa-dev-tools:
status: Triaged → In Progress
Revision history for this message
Bryce Harrington (bryce) wrote :

This should now no longer happen with code just landed on main. If you get a chance to verify, it'd be appreciated. If there are still related problems please re-open this bug.

Thanks again for filing this!

Changed in ppa-dev-tools:
status: In Progress → Fix Committed
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

  git clone -b main https://git.launchpad.net/ppa-dev-tools
  cd ppa-dev-tools
  debuild -us -uc
  apt install ../ppa-dev-tools_0.5.0_all.deb

Now I can confirm the ppa command works, thank you!

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.