Some ntpath/posixpath functions unusable on foreign OS
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
The os.path docs intro includes:
Note: Since different operating systems have different path name conventions, there are several versions of this module in the standard library. The
os.pathmodule is always the path module suitable for the operating system Python is running on, and therefore usable for local paths. However, you can also import and use the individual modules if you want to manipulate a path that is always in one of the different formats. They all have the same interface:
posixpathfor UNIX-style pathsntpathfor Windows paths
But we don't explain that some of the functions in ntpath and posixpath aren't suitable for usage on a "foreign" OS, e.g. that using ntpath.realpath() from POSIX is a bad idea.
These functions are safe because they do purely lexical work:
basenamecommonpathcommonprefixdirnameisabsjoinnormcasenormpathsplitsplitdrivesplitrootsplitext
These functions are probably unsafe because they rely on details of the host OS (e.g. via the os module):
abspathexistslexistsexpanduserexpandvarsgetatimegetmtimegetctimegetsizeisfileisdirisjunctionislinkismountisdevdriverealpathrelpathsamefilesameopenfilesamestatsupports_unicode_filenames
Linked PRs
- gh-119772
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 la introducción de la documentación de os.path enlazada en el issue y revisa las listas de funciones léxicas y dependientes del host. Revisa el PR enlazado gh-119772 antes de hacer cambios. Se considera terminado cuando la documentación explique claramente qué funciones de ntpath y posixpath son seguras en un sistema operativo extranjero y cuáles dependen del sistema operativo host.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 20/100