Alexey Izbyshev added the comment:

I've encountered this issue too. (FYI, the official 3.6.0 embeddable zip from 
https://www.python.org/downloads/windows/ does contain a blank line in its 
._pth, so all its users get an invalid entry in sys.path).

The patch is attached. I couldn't fix tests in more straightforward way because 
both of them were broken:
* Both of them generated ._pth with 'import site'
* Both of them checked for zero exit code instead of non-zero one, but both 
passed because predicates in sys.exit() were incorrect

I've strengthened the check in 'nosite' test because it is trivial to fully 
emulate sys.path calculation logic in this case. I've preserved weaker checks 
in the other test because I didn't want to emulate site.py logic.

----------
nosy: +izbyshev
Added file: http://bugs.python.org/file46433/underpth_blank_lines.diff

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

Reply via email to