From e4dfef606ec67c9688d0688ad10a300ac003ff2e Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: May 31 2021 10:06:34 +0000 Subject: Stop using private function from productmd In 1.33 the function was renamed and now is not prefixed by underscore. Let's update to new name. The version requirement in setup.py is updated to version of productmd that contains the change. Resolves: rhbz#1965933 --- diff --git a/compose_utils/essentials.py b/compose_utils/essentials.py index 73d1e91..5b2a82a 100644 --- a/compose_utils/essentials.py +++ b/compose_utils/essentials.py @@ -30,7 +30,7 @@ def get_containers(compose): try: # This should probably be exposed by productmd in some better way. # Unlike regular open(), this will handle HTTP urls transaprently. - with productmd.common._open_file_obj(metadata_uri) as f: + with productmd.common.open_file_obj(metadata_uri) as f: metadata = json.load(f) except IOError: # Failed to open metadata, there are no containers. diff --git a/setup.py b/setup.py index 66006be..aa203df 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ setup( 'bin/compose-write-repo-file', ], install_requires=[ - 'productmd>=1.0', + 'productmd>=1.33', 'kobo>=0.4.2', 'six', ],