question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support PEP 440 versioning

See original GitHub issue

Description

It would be useful to support PEP 440 versioning alongside, or instead of, semantic versioning (they are similar, with subtle differences in identifiers).

Use cases

Poetry enforces PEP 440. pip, pypi and setuptools all will or currently do support it, and may also require it. Since this package is intended for python specifically, it would make sense to support versioning that adheres to the accepted format.

Possible implementation

Currently, there is a --prerelease option. In PEP 440, you can also have post releases, dev releases, and local versions. It would be nice / required to have those options as kwarg flags as well (like --postrelease, --dev, --local).

In terms of prerelease, the prerelease_tag would have to go from accepting any input to accepting only those valid in the spec (alpha, beta, pre, preview, a, b, c, and rc).

PEP 440 also provides regular expressions that can be used to check and extract existing version identifiers, which could be useful in automatically determining the next version of a valid release.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bernardcooke53commented, Aug 31, 2022

Ah yes - the “.” before the revision specifier, sorry for not getting that sooner. I’ve hit the same pain before, I agree that a --pep-440 would be valuable.

An alternative might be to have a --version-compat= flag which can be set to python to achieve the same goal - but with the advantage of being able to allow additional values down the line if another language has a similar quirk (admittedly I don’t know of one offhand). What do you think?

0reactions
github-actions[bot]commented, Nov 13, 2022

This feature request has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 440 – Version Identification and Dependency Specification
This PEP describes a scheme for identifying versions of Python software distributions, and declaring dependencies on particular versions.
Read more >
pep440 - PyPI
A simple package with utils to check whether versions number match PEP 440.
Read more >
PEP 440 version matching of local version identifier clause ...
In PEP 440, it says the following in the section "Version Matching": If the specified version identifier is a public version identifier (no ......
Read more >
python and PEP 440 - how serious is this warning about ...
py:298: UserWarning: The version specified ('2014.2.2.dev5.gb329598') is an invalid version, this may not work as expected with newer versions ...
Read more >
5 Best Practices for Versioning Your Python Packages
While PEP 440 improved Python by creating uniform versioning schemes, ... While Python doesn't fully support SemVer, you can still create ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found