This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients jaraco, ncoghlan
Date 2019-09-03.07:47:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567496863.38.0.929244531893.issue31874@roundup.psfhosted.org>
In-reply-to
Content
Good point regarding the heuristic: it would need to take the requested module name into account to be correct.

* check if the requested module was found relative to the current directory (can be worked out from __main__.__spec__ and the current working directory)
* if it was, make sys.path[0] the absolute path of the current directory
* otherwise, remove sys.path[0] entirely
History
Date User Action Args
2019-09-03 07:47:43ncoghlansetrecipients: + ncoghlan, jaraco
2019-09-03 07:47:43ncoghlansetmessageid: <1567496863.38.0.929244531893.issue31874@roundup.psfhosted.org>
2019-09-03 07:47:43ncoghlanlinkissue31874 messages
2019-09-03 07:47:43ncoghlancreate