As pkg_resources is deprecated but the official migration guides don’t offer migration paths for all of its API I’m seeking a replacement for Distribution.run_script()
.
As far as I can see its only purpose is to take a script shipped in scripts
and either read it from the disk or get it with Distribution.get_metadata()
and then execute it in the provided namespace. So my questions are:
- Is there a ready to use replacement for this (I suppose no)?
- What is the
get_metadata()
code path for, is it there for zipped eggs or for some other reason? Is there a ready to use replacement for this code path, as the other codepath is much easier to replace? Or is it never relevant anyway?