You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, when trying to check if a distribution is editable, I noticed doing so using the current API is very un-ergonomic. This information is available via the direct_url.json file of PEP 610, which is exposed in Distribution.origin.
When url refers to a local directory, the dir_info key MUST be present as a dictionary with the following key:
editable (type: boolean): true if the distribution was installed in editable mode, false otherwise. If absent, default to false.
So, to check if the distribution is editable, we can check Distribution.origin.dir_info.editable, however, Distribution.origin might be None (no direct_url.json), and Distribution.origin.dir_info might not be set (url in direct_url.json in not a local directory), which.
Recently, when trying to check if a distribution is editable, I noticed doing so using the current API is very un-ergonomic. This information is available via the
direct_url.json
file of PEP 610, which is exposed inDistribution.origin
.So, to check if the distribution is editable, we can check
Distribution.origin.dir_info.editable
, however,Distribution.origin
might beNone
(nodirect_url.json
), andDistribution.origin.dir_info
might not be set (url
indirect_url.json
in not a local directory), which.It would be helpful to have this information available via a more ergonomic API.
The text was updated successfully, but these errors were encountered: