Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-89745: Remove dead realpath branch in getpath.c #128861

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pelson
Copy link
Contributor

@pelson pelson commented Jan 15, 2025

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
Copy link
Contributor Author

pelson commented Jan 15, 2025

It looks like this came in part in 99fcf15#diff-ad0a6e4fd367f158f5af826b512704cef7808813c3a3a474f9d8a10b5ef75e45.

@pelson
Copy link
Contributor Author

pelson commented Jan 21, 2025

@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
Copy link
Member

zooba commented Jan 21, 2025

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants