Support qualified referencing for `ntpath.abspath()`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Feature or enhancement
Proposal:
from @eryksun (https://github.com/python/cpython/pull/117855#discussion_r1579025703):
Offhand I can't remember why
normpath()gets called first. The fact that it removes an initial "." component is even more of a nuisance now. It prevents qualified referencing of files with certain DOS device names in the working directory such as "./con" versus unqualified "con". Support for the latter was added in Windows 11. For example:>>> nt._getfullpathname('./con') 'C:\\Temp\\con' >>> nt._getfullpathname('con') '\\\\.\\con' >>> os.path.abspath('./con') '\\\\.\\con'Calling
normpath()first was always an issue for unambiguous references to file streams of single-letter filenames in the current directory. For example:>>> nt._getfullpathname('./Z:spam') 'C:\\Temp\\Z:spam' >>> os.path.abspath('./Z:spam') 'Z:\\spam'Windows would beg to differ about the significance of a leading "." component, in these cases and others. Anyway, I thought this version could at least address the inconsistent behavior with embedded null characters, while still calling
normpath()first.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
- #117587
- #119826
Linked PRs
- gh-119849
- gh-126784
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el punto de entrada ntpath.abspath() y lee las discusiones enlazadas en #117587 y #119826, junto con los PRs #119849 y #126784. Reproduce los ejemplos de Windows para './con' y './Z:spam'; se considera terminado cuando las referencias cualificadas conservan su comportamiento previsto sin regresiones en el manejo existente de abspath.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- operating-systems
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100