Jason R. Coombs <jar...@jaraco.com> added the comment:
It's because on Unix: ``` >>> os.path.relpath('/Users/jaraco/code/main/path/.flake8', '') '.flake8' ``` But on Windows, relpath raises an error for the comparable call: ``` >>> os.path.relpath('\\\\vmware-host\\shared >>> folders\\home\\code\\main\\path\\.flake8', '') ValueError: path is on mount '\\\\vmware-host\\shared folders', start on mount 'C:' ``` So it seems it may not be a bug in Python, but merely a consequence of Python 3.8 honoring symlinks in realpath, and exposing the unfortunate weakness of resolving relative real paths when root volumes aren't in a shared namespace. Does Python have any advice for downstream users running into this or similar issues? If they want cross-platform compatibility, must they avoid use of realpath? Do you have any tips specific to what setuptools_scm is doing? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40732> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com