Author brett.cannon
Recipients Arfrever, brett.cannon, eric.snow, martin.panter, r.david.murray
Date 2014-11-14.14:38:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
So it isn't about importlib not handling missing directories on sys.path directly, it has to do with the fact that os.getcwd() raises FileNotFoundError when CWD is no longer valid and that is in a fundamental part of importlib that isn't worrying about non-existent directories.

We could be robust and simply have instances of os.getcwd() failing just move on, e.g. when '' is hit in sys.path and os.getcwd() raises an exception just give up. The other option is leaving this to raise FileNotFoundError but throwing a new copy with a better error message mentioning this is because the current working directory no longer exists. That would lead to easier debugging since paths on sys.path are typically obvious -- since makes them absolute -- but I'm willing to bet people don't bother checking CWD is still good. So it's robustness vs. debugging when you make this mistake.

Any opinions on the matter?
Date User Action Args
2014-11-14 14:38:48brett.cannonsetrecipients: + brett.cannon, Arfrever, r.david.murray, eric.snow, martin.panter
2014-11-14 14:38:48brett.cannonsetmessageid: <>
2014-11-14 14:38:48brett.cannonlinkissue22834 messages
2014-11-14 14:38:47brett.cannoncreate