properly define what "canonical" means in `os.path.realpath`
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 77.2k
- Forks
- 36k
- Métriques de merge des PR
- Métriques de PR en attente
Description
Documentation
The documentation says:
https://github.com/python/cpython/blob/2fd09b011031f3c00c342b44e02e2817010e507c/Doc/library/os.path.rst?plain=1#L406-L409
So it merely mentions symlink resolution, but not what else it means (if anything).
It does however mention that whatever it does is OS dependent:
https://github.com/python/cpython/blob/2fd09b011031f3c00c342b44e02e2817010e507c/Doc/library/os.path.rst?plain=1#L416-L418
IMO, it should be clearly documented what it does or at least:
- what it guarantees to the least (For example will the pathname be absolute? Will it be normalised?)
and/or: - which OS function it’s identical to, like on POSIX where that would probably realpath(), and whether there are differences to that
Especially since IMO "canonical" pathname (though I think it has no formal definition, or is there anything in POSIX?) means rather just that there are no symlinks left, i.e. that the file is "reached" by its true (=canonical) name.
But that could still be a relative pathname, and perhaps even one that is not normalised.
Cheers,
Chris.
Linked PRs
- gh-134755
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez dans Doc/library/os.path.rst aux lignes citées 406-409 et 416-418, puis comparez avec la référence POSIX de realpath() liée dans l’issue. Documentez les garanties minimales de os.path.realpath ainsi que tout comportement ou toute différence propre au système d’exploitation, en formulant le texte de manière à rendre clair ce que signifie « canonical ».
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- documentation
- Type d'issue
- Documentation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100