#9009 Nightly failure (rawhide) in webui_tests: yaml.load() now requires Loader
Closed: fixed by frenaud. Opened by frenaud.

The nightly tests started failing in rawhide with the new release of PyYAML-6.0. See for instance PR #1242 with the following log and report:

self = <ipatests.test_webui.test_delegation.test_delegation object at 0x7fb9cf083d90>
request = <SubRequest 'ui_driver_setup' for <Function test_crud>>
    @pytest.fixture(autouse=True, scope="class")
    def ui_driver_setup(self, request):
        cls = request.cls
        if NO_SELENIUM:
            pytest.skip('Selenium not installed')
>       cls.load_config()
test_webui/ui_driver.py:168: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'ipatests.test_webui.test_delegation.test_delegation'>
    @classmethod
    def load_config(cls):
        """
        Load configuration
        1) From ~/.ipa/ui_test.conf
        2) From environmental variables
        """
        # load config file
        path = os.path.join(os.path.expanduser("~"), ".ipa/ui_test.conf")
        if not NO_YAML and os.path.isfile(path):
            try:
                with open(path, 'r') as conf:
>                   cls.config = yaml.load(conf)
E                   TypeError: load() missing 1 required positional argument: 'Loader'
test_webui/ui_driver.py:194: TypeError

Pyyaml has been updated to 6.0 in rawhide and the method yaml.load() now requires the positional argument Loader, as explained in their announcement:

The previously-deprecated default loader selection in `yaml.load()` has
been removed; `Loader` is now a required argument.

Our tests need to be adapted.


Metadata Update from @mpolovka:
- Issue assigned to mpolovka

Fix in progress PR6050

master:

  • f11a4c3df59703a7d66a683191574669c1e0e135 ipatests: webui: Specify configuration loader

ipa-4-9:

  • 17ba2732f90a69b860f70662133e6904d7373b04 ipatests: webui: Specify configuration loader

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • ff02041350c3746d78872b361072bb1bbe0ea420 ipatests: webui: Use safe-loader for loading YAML configuration file

ipa-4-9:

  • 419d7fd6e5a9ed2d356ad05eef1043309f5646ef ipatests: webui: Use safe-loader for loading YAML configuration file
Metadata