[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support for Path.absolute() ___ Python tracker ___

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2019-08-26 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 08/09/2015 01:21, David Barnett a écrit : > > My use case was that I had an equality check like this failing: > expected_path = pathlib.Path.cwd() / pathlib.Path('some/path') > pathlib.Path('some/path') == expected_path > I suppose I should file that as

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett
David Barnett added the comment: Right, and to clarify a bit further why I didn't just use A.resolve() == B.resolve() from the beginning, this is in a unit test where the equality check wasn't in my code. I wanted to assert I received a certain call on my mock, like

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett
David Barnett added the comment: And the symlinks for my paths refer to really cryptic hashes in a virtual filesystem for the tests, so rendering them into the assertion failed errors would really make the failure messages hard to interpret. -- ___

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-05 Thread David Barnett
New submission from David Barnett: There doesn't seem to be any helper in pathlib to expand a relative path to an absolute path *without* resolving symlinks. For example, if I want to convert pathlib.Path('some/path') to pathlib.Path('/full/path/to/some/path') where some/path is a symlink,

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: pathlib.Path.cwd() / pathlib.Path('some/path') -- nosy: +pitrou, serhiy.storchaka ___ Python tracker ___

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-05 Thread eryksun
eryksun added the comment: There's a public method that's almost what you want: >>> print(pathlib.Path.absolute.__doc__) Return an absolute version of this path. This function works even if the path doesn't point to anything. No normalization is done, i.e. all