[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread R. David Murray
R. David Murray added the comment: All right. So the challenge here for windows is: if python is installed on a path that has a semicolon in one of the directory names, is it even possible to populate sys.path such that modules can be imported from the lib directory that is under that path?

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread Eryk Sun
Eryk Sun added the comment: > Is this post wrong then? No, it's not wrong that semicolon is a valid character in Windows NTFS and FAT32 filesystems. However, the answer by Kevin Edwards that recommends using double quotes needs qualification. It only works in CMD. It doesn't work in

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread R. David Murray
R. David Murray added the comment: Is this post wrong then?: https://superuser.com/questions/584870/how-can-i-add-a-folder-containing-a-semicolon-to-the-windows-path ("I noticed that the semicolon ; is a valid character for Windows (NTFS) file and directory names.") --

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread Steve Dower
Steve Dower added the comment: We don't. Semicolons are not valid path characters, so you can't have them in a single path (unless you're deliberately trying to break your entire machine...) -- ___ Python tracker

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread Nick Coghlan
Nick Coghlan added the comment: I'm marking this as Python 3.7 only, not because I don't think it's a bug, but because getpath.c is a maintainability nightmare and I strongly prefer we avoid going anywhere near it in maintenance releases :) Targeting Python 3.7+ also means we may be able to

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: OK, that seems reasonable to me. I'll reopen the issue. Assuming other developers agree that this should be changed, I'm not sure if it will qualify as a bug or an enhancement, so I'm leaving versions unselected for now :) -- resolution: not a bug

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier
Cédric Krier added the comment: On 2017-08-15 17:32, R. David Murray wrote: > You mean to create the entries on sys.path that do not come from the > PYTHONPATH? Yes because such path could contain ':'. -- ___ Python tracker

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: You mean to create the entries on sys.path that do not come from the PYTHONPATH? -- ___ Python tracker ___

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier
Cédric Krier added the comment: A last comment, I do not think it is an issue to follow posix way to parse PATH. But for me, the problem is that Python adds without sanitation the sys.prefix to the PYTHONPATH. So I think internally Python should not use PATH notation to extend the PYTHONPATH

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: I'm not sure there is anything we should do here, then, because we are conforming to the posix parsing for PATH in our PYTHONPATH implementation. I think if you want to pursue this further you should take it to the python-ideas mailing list. I'm going to

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier
Cédric Krier added the comment: Yes I mean ':' for posix. Indeed I do not known a posix way to escape the colon (it was discussed here: https://stackoverflow.com/questions/14661373/how-to-escape-colon-in-path-on-unix). But it does not mean that the method makepathobject could not support one.

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: By DELIM, you mean the shell ':'? As far as I've been able to determine there is no way defined in posix to escape that character. If you can find one, please let us know. (I think the same is true for the Windows semicolon but I'm not sure.) --

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier
New submission from Cédric Krier: If the path on which Python is installed contains the DELIM, the resulted sys.path is split. I think maybe there should be a escape mechanism for the PYTHONPATH. -- components: Interpreter Core messages: 300293 nosy: ced priority: normal severity: