`zipfile`: docs should document what `ZipInfo.date_time` actually is
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
Documentation
Currently, the documentation for ZipInfo.date_time is:
The time and date of the last modification to the archive member. This is a tuple of six values:
...
Note: The ZIP file format does not support timestamps before 1980.
This should be extended/clarified to define which date/time is meant (which currently is only hinted by the does not support timestamps before 1980.
The ZIP format supports for multiple timestamps:
- there's the
last mod file timeandlast mod file datein the central directory (see chapters 4.3.7 and 4.4.6) - but also various times (e.g. for NTFS and UNIX) as part of the
extrafields (see e.g. chapter 4.5.7).
The latter may e.g. support times before 1980, higher resolutions and time zones.
Right now it seems not strictly defined what .date_time actually returns - from what I can see from the code, it's the one from the central directory - but that could in principle be just an implementation detail and a future version of zipfile could e.g. use the extra fields if present.
Thus it would be nice, if the documentation could specify, whether .date_time is always meant to be the time from the central directory, or whether this could change.
Thanks,
Chris.
Linked PRs
- gh-136082
- gh-138076
- gh-138077
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 documentación enlazada de zipfile.ZipInfo.date_time e inspecciona la implementación existente de zipfile que proporciona este atributo. Actualiza la documentación para indicar qué marca de tiempo de ZIP representa y cómo se relaciona con otros campos de marca de tiempo; después, verifica el texto renderizado y las comprobaciones de la documentación.
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
- Bastante claro
- Aptitud para principiantes
- 25/100