◐ Shell
clean mode source ↗

gh-89745: Remove dead realpath branch in getpath.c by pelson · Pull Request #128861 · python/cpython

Conversation

@pelson

The readlink code before is always taking precedence, and I don't know of a platform which has realpath but not readlink.

Note that this is a bit of a speculative change identified when tackling another getpath[.py] issue - I have no broad knowledge of platforms to be 100% certain that realpath without readlink isn't a thing.

@pelson

@pelson

@FFY00 and @zooba - is this a worthwhile change? If so, I'm happy to open up an issue, rebase, etc.

If not, I would also be happy to just close the PR.

@picnixz picnixz changed the title gh-XXXXX: Remove dead realpath branch in getpath.c gh-89745: Remove dead realpath branch in getpath.c

Jan 21, 2025

@picnixz

This comment was marked as resolved.

@zooba

I have no broad knowledge of platforms to be 100% certain that realpath without readlink isn't a thing.

Me neither. I'm not confident to remove code that I copy-pasted (I assume from posixmodule.c, possibly from fileutils.c, but I expect if it were there then I could've just called it).

@github-actions

This PR is stale because it has been open for 30 days with no activity.

@picnixz

Closing as we are not entirely sure it is really a dead path.

@pelson pelson deleted the tidy/remove-dead-code branch

April 21, 2026 07:35

Labels