[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Henk-Jaap Wagenaar
Change by Henk-Jaap Wagenaar : -- keywords: +patch pull_requests: +4580 stage: -> patch review ___ Python tracker ___

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Brett Cannon
Brett Cannon added the comment: Import itself I don't believe calls os.path.realpath(), so this is probably just something pkgutil happens to do. -- nosy: +brett.cannon ___ Python tracker

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Henk-Jaap Wagenaar
Henk-Jaap Wagenaar added the comment: Ignoring testing code, there is minimal use of os.path.realpath in the stdlib (https://github.com/python/cpython/search?utf8=%E2%9C%93=%22os.path.realpath%22=): - Lib/platform.py: used before opening a file (works around a

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-11-30 Thread Henk-Jaap Wagenaar
New submission from Henk-Jaap Wagenaar : ImpImporter.find_modules calls os.path.real on the path used: https://github.com/python/cpython/blob/be6b74c0795b709c7a04e2187a7e32d08f5155f6/Lib/pkgutil.py#L181 This means if there is a submodule (foo.bar) which first