importlib.metadata.Distribution only has narrative docs that tell us
- there are subclasses such as
PathDistribution
- it has a
.version attribute that contains the version metadata
- it has
.metadata attribute whose __getitem__ accepts strings and returns metadata (unclear what is returned if 1. there are multiple values for the key 2. there aren’t multiple values but there could be, and 3. in case it always returns one value, how to get a list of multiple values)
- since 3.13, it may have an
.origin attribute of unknown type which has a .url attribute pointing to the origin of an editable package (unclear if not having the .origin attribute means the package is not editable, something else and .orgin.url is None then or something.)
the Extending the search algorithm header tells us to subclass that class, referencing some otherwise undocumented attributes and functions. Does that imply that we’re supposed to dive into the code and treat all attributes that don’t start with an underscore as public?
importlib.metadata.Distributiononly has narrative docs that tell usPathDistribution.versionattribute that contains the version metadata.metadataattribute whose__getitem__accepts strings and returns metadata (unclear what is returned if 1. there are multiple values for the key 2. there aren’t multiple values but there could be, and 3. in case it always returns one value, how to get a list of multiple values).originattribute of unknown type which has a.urlattribute pointing to the origin of an editable package (unclear if not having the.originattribute means the package is not editable, something else and.orgin.urlisNonethen or something.)the Extending the search algorithm header tells us to subclass that class, referencing some otherwise undocumented attributes and functions. Does that imply that we’re supposed to dive into the code and treat all attributes that don’t start with an underscore as public?