Skip to content

Ubuntu 24.04 noble errors at loading yaml #32

@NeroBurner

Description

@NeroBurner

On Ubuntu 24.04 noble the command errors with the following message (both current master and 0.12.12):

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/gc/repos/aptly/python-aptly/aptly/publisher/__main__.py", line 352, in <module>
    main()
  File "/home/gc/repos/aptly/python-aptly/aptly/publisher/__main__.py", line 87, in main
    action_publish(client, publishmgr, config_file=args.config,
  File "/home/gc/repos/aptly/python-aptly/aptly/publisher/__main__.py", line 313, in action_publish
    config = load_config(config_file)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gc/repos/aptly/python-aptly/aptly/publisher/__main__.py", line 23, in load_config
    return yaml.load(fh)
           ^^^^^^^^^^^^^
TypeError: load() missing 1 required positional argument: 'Loader'

Should be related to the deprecation warning issued in Ubuntu 22.04 run:

/home/gc/repos/aptly/python-aptly/aptly/publisher/__main__.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  return yaml.load(fh)

The python3-aptly and aptly-publisher version 0.12.12-1 from the Ubuntu Repo seems to work. Maybe the Debin/Ubuntu maintainers added a patch we could use here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions