Message202660
Although, a boolean query method would bring back the problem of the loader
not reporting any details on *why* it can't load into a particular target
module. So it may be better to have an optional loader
"check_existing_target" API that throws a suitable exception if the target
is unacceptable. Loaders that don't support reloading at all would just
always raise an exception, while those that don't care would just not
implement the method.
That would address my concern about the lack of useful error information in
Eric's original boolean check idea, without bothering finders with loader
related details as the accepted PEP does (I still like the idea of passing
a target to importlib.find_spec - I just no longer think we should be
passing that down to the finders themselves).
Another thing we need to check we have a test for: ensuring reloading a
namespace module picks up new directories added since it was first loaded.
This would all be so much easier if reloading wasn't supported in the first
place :) |
|
Date |
User |
Action |
Args |
2013-11-11 23:41:06 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, larry, Arfrever, eric.snow, berker.peksag |
2013-11-11 23:41:06 | ncoghlan | link | issue18864 messages |
2013-11-11 23:41:06 | ncoghlan | create | |
|