[issue43968] os.path.realpath() unexpected breaking change: resolves subst'd paths to real paths

sfmc report at bugs.python.org
Fri Apr 30 14:39:13 EDT 2021


sfmc <Sergey_Filimonov at mentor.com> added the comment:

> If you don't need to resolve symlinks, just use os.path.abspath() in Windows and os.path.realpath() in POSIX.

As I said, we already fixed it in our scripts.

The problem is with Python debugger and third-party tools - we can't make changes there.

The environment variable would be easy fix to this issue.

No impact on those who do not set the variable.

-----

In our organization we use substituted drives for development, and no other tools (including other programming languages and their IDEs), except for Python 3.8+, had any problems with this.

For example, in last versions of Perl and Ruby the realpath keeps the substitute drive.

(In Ruby the realpath is also smart enough to resolve symlinks while keeping the drive.)

-----

I consider this a serious issue with Python, I hope it gets the deserved attention and at least the workaround with env. var. gets implemented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43968>
_______________________________________


More information about the Python-bugs-list mailing list