python-igraph icon indicating copy to clipboard operation
python-igraph copied to clipboard

Development versions should have a distinct version number

Open szhorvat opened this issue 2 years ago • 3 comments

Can we please have distinct version numbers for development versions? For example, the current main branch could show 0.10.4.bignumber where bignumber is something derived from the present git commit. Right now it simply shows 0.10.4.

When looking at #685, at one point I was under the impression that I was running 0.10.4 while in reality I was using the dev version.

szhorvat avatar Jun 30 '23 13:06 szhorvat

I'll probably look into this, but it seems like this would also involve officially dropping support for Python 3.7. (Python 3.7 has reached EOL three days ago, so in theory we could drop support for it right now and it wouldn't go against our own policies).

The reason is that igraph's version number currently comes from src/igraph/version.py, which is read by setup.py during the process when the library is installed. What you ask for would involve dynamically re-writing src/igraph/version.py based on info from the VCS, during installatin time, which feels like a mess to me. Python 3.8 introduced a way to retrieve the version number of a package from the package metadata (see importlib.metadata.version()), but this is not available in Python 3.7 yet. Once we drop support for Python 3.7, we can re-implement src/igraph/version.py using importlib.metadata.version() and then there would be only one place where we need to update the version number: in pyproject.toml, probably using setuptools_scm. However, extensive testing is needed to ensure that setuptools_scm can come up with a reasonable version number even for rep archive tarballs downloaded directly from Github.

ntamas avatar Jun 30 '23 17:06 ntamas

I added the milestone by accident, this doesn't need to be done now. Let's do it only when we're ready. It's not worth dropping support for old versions just because of this one issue, not even if that Python version is out of support.

szhorvat avatar Jun 30 '23 17:06 szhorvat

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 18 '23 01:09 stale[bot]