Package: python-tinyrpc Version: 0.6-4 Followup-For: Bug #1040854 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu mantic ubuntu-patch Control: tags -1 patch
Hi Ben, Please find attached a patch that ports the tinyrpc autopkgtest from pkg_resources to importlib. Thanks for considering, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru python-tinyrpc-0.6/debian/tests/smoke_test.py python-tinyrpc-0.6/debian/tests/smoke_test.py --- python-tinyrpc-0.6/debian/tests/smoke_test.py 2022-05-03 20:58:15.000000000 -0700 +++ python-tinyrpc-0.6/debian/tests/smoke_test.py 2023-07-14 11:44:59.000000000 -0700 @@ -21,7 +21,7 @@ import sys import argparse import importlib -import pkg_resources +from importlib.metadata import metadata def emit_implementation(): @@ -40,7 +40,7 @@ :param name: Name of the distribution to retrieve. :return: ``None``. """ - distribution = pkg_resources.get_distribution(name) + distribution = metadata(name)['Name'] sys.stdout.write( "Distribution ‘{name}’:\n\t{distribution!r}\n".format( name=name, distribution=distribution))