From 59e8a3c64822b148e5703e475b79a0812cf0b85d Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Mon, 30 Dec 2019 15:48:21 +0000 Subject: requirements: Add dependency on ruamel.yaml.clib 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 https://gitlab.com/BuildStream/bst-plugins-container/issues/19. 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. --- requirements/requirements.in | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/requirements.in b/requirements/requirements.in index ce721da33..50bb523da 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -5,6 +5,7 @@ pluginbase protobuf >= 3.6 psutil ruamel.yaml >= 0.16 +ruamel.yaml.clib >= 0.1.2 setuptools pyroaring ujson -- cgit v1.2.1