Skip to content

requirements: Add dependency on ruamel.yaml.clib

Chandan Singh requested to merge chandan/dependon-yaml.clib into master

On Python3.8, when ruamel.yaml.clib is not installed, BuildStream ends up throwing a stack trace on any and all operations. This manifests itself in the following form:

    $ bst show hello.bst

    Error loading user configuration:
    /venv/lib/python3.8/site-packages/buildstream/data/userconfig.yaml:
    Severely malformed YAML:

    'NoneType' object is not callable

This is also the root cause of downstream issues like bst-plugins-container#19 (closed).

The fix is simple - to add a hard dependency on ruamel.yaml.clib, since we explicitly import yaml.Cparser - https://gitlab.com/BuildStream/buildstream/blob/master/src/buildstream/_yaml.pyx#L298

  • that doesn't come from the main ruamel.yaml package.

This works fine on Python < 3.8 because ruamel.yaml itself has a hard dependency on ruamel.yaml.clib for those versions. The Python 3.8 CI pipeline also works because our requirements were frozen using a Python 3.7 interpreter and hence already have this requirement.

Merge request reports

Loading