aboutcode-org / aboutcode-org/purldb

PypiVersionAPI.get_latest_date() crashes when a release entry is missing upload_time_iso_8601

Abierto
#863 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
HTML
Estrellas
67
Forks
69
Merge medio
8 d 8 h
PR fusionados (30 d)
1

Descripción

## Summary

`PypiVersionAPI.get_latest_date()` in `packagedb/package_managers.py` can fail when a PyPI release entry is missing `upload_time_iso_8601`.

The current implementation only assigns `current_date` when that field is present, but still uses `current_date` later in the loop even when it was never set. That can raise `UnboundLocalError` instead of skipping the malformed entry.

## Current behavior

A case like this can fail:

```python
downloads = [
{},
{"upload_time_iso_8601": "2010-12-23T05:14:23.509436Z"},
]

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.