This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mu_mind
Recipients eryksun, mu_mind, pitrou, serhiy.storchaka
Date 2015-09-07.23:21:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441668089.6.0.408013141759.issue25012@psf.upfronthosting.co.za>
In-reply-to
Content
The idiom of
  pathlib.Path.cwd() / pathlib.Path('some/path')
isn't too bad of an approach if it could just be mentioned in the docs. I would intuitively expected something like
  pathlib.Path('some/path').resolve(follow_symlinks=False)

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 a separate bug because semantically those paths are equal, but I was trying to work around it like
  pathlib.Path('some/path').resolve() == expected_path
which in my case still failed because some/path was a symlink.

Even if that's fixed, I would still expect to run into cases where I wanted to print specifically the relative or absolute path in informational messages and would not want to follow symlinks (e.g., in "Requested path X not found", the user would recognize the absolute path as the one they entered but not necessarily the symlink-resolved version).
History
Date User Action Args
2015-09-07 23:21:29mu_mindsetrecipients: + mu_mind, pitrou, serhiy.storchaka, eryksun
2015-09-07 23:21:29mu_mindsetmessageid: <1441668089.6.0.408013141759.issue25012@psf.upfronthosting.co.za>
2015-09-07 23:21:29mu_mindlinkissue25012 messages
2015-09-07 23:21:29mu_mindcreate