RPM 4.19 removed rpm.fi class. rpmconf tool needs to move to rpm.files class https://github.com/xsuchy/rpmconf/pull/53. That in turn breaks tests/test_rpmconf.py which mocks rpmconf internals:
tests/test_rpmconf.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_rpmconf.py:58: in __enter__
patch.__enter__()
/usr/lib64/python3.12/unittest/mock.py:1455: in __enter__
original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <unittest.mock._patch object at 0x7fa240b50b00>
def get_original(self):
target = self.getter()
name = self.attribute
original = DEFAULT
local = False
try:
original = target.__dict__[name]
except (AttributeError, KeyError):
original = getattr(target, name, DEFAULT)
else:
local = True
if name in _builtins and isinstance(target, ModuleType):
self.create = True
if not self.create and original is DEFAULT:
> raise AttributeError(
"%s does not have the attribute %r" % (target, name)
)
E AttributeError: <module 'rpm' from '/usr/lib64/python3.12/site-packages/rpm/__init__.py'> does not have the attribute 'fi'
RPM 4.19 removed rpm.fi class. rpmconf tool needs to move to rpm.files class https://github.com/xsuchy/rpmconf/pull/53. That in turn breaks tests/test_rpmconf.py which mocks rpmconf internals:
This patch adapts to the changes in rpmconf.
https://bugzilla.redhat.com/show_bug.cgi?id=2219977