You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/03/15 09:38:42 UTC
[GitHub] [buildstream] abderrahim removed a comment on pull request #1546: _yaml.pyx: port roundtripping code to the new ruamel.yaml API
abderrahim removed a comment on pull request #1546:
URL: https://github.com/apache/buildstream/pull/1546#issuecomment-1067760030
Maybe I wasn't clear enough:
- The implementation in master uses one instance per call (via the current implementation of the deprecated API in ruamel.yaml)
- My first port used a single instance for everything and failed the tests (I assume because the API is not thread safe)
- The latest version of the PR goes back to using one instance per call
- I guess the optimal solution would be to use thread local storage and use one instance per thread (but I didn't implement it).
Note that I only said this is related to #1475, not that it fixes it. It fixes #1495. The remaining deprecation notices are due to usage of ruamel.yaml from outside of `_yaml.pyx`, see https://github.com/apache/buildstream/blob/master/src/buildstream/_frontend/widget.py#L378. The problem with those is that there is no replacement for the APIs that return a string, we would need to use a StringIO or something to pass to ruamel, but if we're doing that anyway maybe it's a good idea to rewrite the code to use a single StringIO for everything.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org