aboutcode-org / aboutcode-org/univers

Semver 2.0 != 2.0.0 and 2.0.0.0 is valid

Abierto
#16 1 comentario 0 reacciones 0 asignados Ver en GitHub
2-next documentation good first issue
Lenguaje dominante
Python
Estrellas
50
Forks
29
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Code docs say
https://github.com/nexB/univers/blob/a52ea9900d87ef6cd0ed989bf20a41a794cf39c4/src/univers/versions.py#L177-L180

Even so, semver with more than 3 segments is treated as valid. This looks like an issue on the `semantic_version` side but we should not make false promises.

```py
>>> from univers.versions import SemverVersion
>>> SemverVersion.is_valid("2")
True
>>> SemverVersion.is_valid("2.0")
True
>>> SemverVersion.is_valid("2.0.0")
True
>>> SemverVersion.is_valid("2.0.0.0")
True
>>> SemverVersion.is_valid("2.0.0.0.1")
True
>>> SemverVersion("2") == SemverVersion("2.0")
False
>>> SemverVersion("2.0.0") == SemverVersion("2.0")
False
```

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.