uranusjr commented on PR #76890:
URL: https://github.com/apache/airflow/pull/76890#issuecomment-6817934364

   I looked at whether `metadata.entry_points()` + `ep.dist` could replace the 
private attribute. It removes duplicates the same way and is just as fast. But 
with it, one distribution without a name makes the whole call raise, and since 
this runs on every import airflow, a warning would become an import failure.
   
   pip takes the same approach as this PR. It iterates over `distributions()`, 
reads the name from the info directory through the private `_path` attribute, 
and skips bad distributions with a warning. So I'm fine keeping the loop and 
`_normalized_name`. Please narrow the except and drop `_normalize_dist_name`.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to