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

So if you were to insert '.' via PYTHONPATH it would be made absolute as the 
site module makes all entries in sys.path absolute during startup.

And changing this to have to check every time import runs if an entry in 
sys.path is absolute would be costly (that's not a insignificant number of stat 
calls which we always try to avoid during import when possible). Your best 
option is to insert an absolute path to begin with. Also realize that 
manipulating sys.path is an advanced thing to do and so I don't think asking 
people to be "consenting adults" and be careful about adding relative paths on 
sys.path is an unreasonable thing to ask.

So while I appreciate the report, Daniel, and the motivation, I'm closing this 
as "won't fix" as the overhead of implementing this is too high.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type:  -> enhancement

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

Reply via email to