Documentation is self-contradictory regarding Windows-supported file permissions

Abierto
#101,675 2 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Comprueba primero el estado del PR vinculado gh-101694. Compara las afirmaciones sobre permisos de Windows en la documentación de os.chmod y stat con los comentarios relacionados de Lib/stat.py; se considera terminado cuando la terminología es coherente en las tres ubicaciones.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

docs OS-windows

Documentation

One the one hand, the os.chmod documentation says that Windows only supports stat.S_IWRITE and stat.S_IREAD.

But on the other hand, the stat module documentation says that both of those (S_IWRITE and S_IREAD) are Unix V7 synonyms for S_IWUSR and S_IRUSR (and in fact comments in the stat code say the same thing).

That's confusing. One piece of documentation says Windows supports them (in fact, only them) and another piece of documentation says they're for Unix (i.e. not Windows).

The naming "IWUSR" and "IRUSR" implies the typical Unix permission model, which does not apply on Windows, so it makes sense that Windows code should ideally not use S_IWUSR or S_IRUSR (even though the code would happen to work because the values are identical to S_IWRITE and S_IREAD).

Therefore, I think the fix should be to replace the "Unix V7 synonym for ..." statements with "Unix V7 synonym for ..., also used on Windows" in both of the following:

  • comments in the stat module code
  • statements in the stat documentation
Linked PRs
  • gh-101694
Lenguaje dominante
Python
Estrellas
77.2k
Forks
36k
Merge medio
1 d 9 h
PR fusionados (30 d)
558

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python/cpython

Todos los issues de python/cpython

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.