semver icon indicating copy to clipboard operation
semver copied to clipboard

A semantic versioning library for Python

Results 6 semver issues
Sort by recently updated
recently updated
newest added

According to semver 2.0 specification (mentioned in [official poetry docs](https://python-poetry.org/docs/pyproject/#version)), there is no special requirements for pre-release suffix- namely: ``` A pre-release version MAY be denoted by appending a hyphen...

This module already has some typing comments, so this pull request adds the py.typed file to conform to [PEP 561 – Distributing and Packaging Type Information](https://peps.python.org/pep-0561/)

updates: - [github.com/psf/black: stable → 21.10b0](https://github.com/psf/black/compare/stable...21.10b0) - https://gitlab.com/pycqa/flake8 → https://github.com/PyCQA/flake8 - [github.com/PyCQA/flake8: 3.7.8 → 4.0.1](https://github.com/PyCQA/flake8/compare/3.7.8...4.0.1) - https://github.com/pre-commit/mirrors-isort → https://github.com/PyCQA/isort - [github.com/PyCQA/isort: v4.3.21 → 5.10.1](https://github.com/PyCQA/isort/compare/v4.3.21...5.10.1) - [github.com/pre-commit/pre-commit-hooks: v2.3.0 → v4.0.1](https://github.com/pre-commit/pre-commit-hooks/compare/v2.3.0...v4.0.1)

When parse non-semver version, it should raise an exception not like below. non- semver version: 1.2.3-0123, 1.2, .0.0+artiary+version ``` >>> import semver >>> semver.Version.parse('1.2.3-0123') >>> semver.Version.parse('1.2') >>> semver.Version.parse('0.0+artiary+version') ```

Before this change the prerelease `rc1` in e.g. `~=7.0.0rc1` would be lost on the low end: ```pycon >>> vrange = parse_single_constraint('~=7.0.0rc1') >>> vrange.min ``` After: ```pycon >>> vrange = parse_single_constraint('~=7.0.0rc1')...

Using match only matches the beginning of the string and can ignore some version information. I've encountered this problem with this version string '0.7.1dev1+1.\*' where not using fullmatch would ignore...