This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/pip-origin-description in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit ef3943957332ecf73f6c831bab16676879fc0ea6 Author: Tristan van Berkom <[email protected]> AuthorDate: Sat Oct 4 00:21:38 2025 +0900 _pluginfactory/pluginoriginpip.py: Fix the description string The `Distribution` object returned by importlib.metadata.distribution() does not have a sensible `__str__()` dunder method to rely on. Instead we should be using `Distribution.name` and `Distribution.version` members to describe the pip package which was loaded in the plugin description string. --- src/buildstream/_pluginfactory/pluginoriginpip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildstream/_pluginfactory/pluginoriginpip.py b/src/buildstream/_pluginfactory/pluginoriginpip.py index a6174d080..2fe4563cd 100644 --- a/src/buildstream/_pluginfactory/pluginoriginpip.py +++ b/src/buildstream/_pluginfactory/pluginoriginpip.py @@ -101,7 +101,7 @@ class PluginOriginPip(PluginOrigin): return ( os.path.dirname(location), str(defaults), - "python package '{}' at: {}".format(dist, dist.locate_file("")), + "python package '{}' version {} at: {}".format(dist.name, dist.version, dist.locate_file("")), ) def load_config(self, origin_node):
