#120 Stop using private function from productmd
Merged 2 years ago by lsedlar. Opened 2 years ago by lsedlar.
lsedlar/compose-utils stop-using-private-function  into  master

file modified
+1 -1
@@ -30,7 +30,7 @@ 

      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.

file modified
+1 -1
@@ -28,7 +28,7 @@ 

          'bin/compose-write-repo-file',

      ],

      install_requires=[

-         'productmd>=1.0',

+         'productmd>=1.33',

          'kobo>=0.4.2',

          'six',

      ],

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

pretty please pagure-ci rebuild

2 years ago

pretty please pagure-ci rebuild

2 years ago

The failing test is because of unsupported combination of Python 2.7 and rpm 4.16.

Pull-Request has been merged by lsedlar

2 years ago

What do you think about removing the comment now? Is it still relevant? The phrase "some better way" seems to refer to the use of a private method.

# This should probably be exposed by productmd in some better way.
# Unlike regular open(), this will handle HTTP urls transaprently.

Fair enough, the comment is indeed obsolete now.

Metadata