Brett Cannon <br...@python.org> added the comment:

Much like the question about load_module(), replacing find_module() with 
find_spec() can be helped with things like 
importlib.util.spec_from_file_location() and .spec_from_loader() 
(https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_file_location
 and 
https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_loader),
 but there isn't a 1:1 swap, so it will take some thought.

And the docs in importlib for things like find_module() say to implement 
find_spec() which then mentions spec_from_loader() may be useful.

As for replicating the subprocess docs approach, that's a little different 
since those alternatives in the stdlib are not going anywhere while the stuff 
in importlib is going to be gone in 3.12 so it will only last for two years.

And BTW I took care of six for you knowing you were going to ask about it if I 
didn't. 😉

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43540>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to