From 97cc591f5c050224acf6b15ab091b155cd0b1f10 Mon Sep 17 00:00:00 2001 From: Yehia Ibrahim Date: Sun, 22 Nov 2026 16:46:05 +0100 Subject: [PATCH 1/2] setup: count the commits after a tag as a post-release A git checkout got the version .dev, e.g. 0.6.1.dev106 for the 106th commit after 0.6.1. In PEP 440 a development release comes before its release, so pip took the checkout for older than the tag it was built on. Installing it from git together with a package that requires python-ipmi>=0.6.1, e.g. robotframework-ipmilibrary, failed with ResolutionImpossible. Use .post instead: a post-release sorts after the tag and before the next release. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Yehia Ibrahim --- README.md | 2 +- docs/source/introduction.rst | 2 +- setup.py | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77149a8..67a27c9 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ as `dev` as long as `pyipmi/version.py` has not been generated, e.g. by The version of the package is taken from, in this order: -1. `git describe --tags` in a git checkout, e.g. `0.5.8.dev77+g7c853b0` +1. `git describe --tags` in a git checkout, e.g. `0.5.8.post77+g7c853b0` for the 77th commit after the tag `0.5.8` 2. `pyipmi/version.py`, which is generated by `setup.py` and is part of the source distribution on PyPI diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index def6b71..683c7f9 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -150,7 +150,7 @@ Package version The version of the package is taken from, in this order: -#. ``git describe --tags`` in a git checkout, e.g. ``0.5.8.dev77+g7c853b0`` +#. ``git describe --tags`` in a git checkout, e.g. ``0.5.8.post77+g7c853b0`` for the 77th commit after the tag ``0.5.8`` #. ``pyipmi/version.py``, which is generated by ``setup.py`` and is part of the source distribution on PyPI diff --git a/setup.py b/setup.py index 5136794..426ae98 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,10 @@ def pep440_version(describe): """Convert the output of 'git describe' to a PEP 440 version. - 0.5.8-77-g7c853b0.dirty -> 0.5.8.dev77+g7c853b0.dirty + 0.5.8-77-g7c853b0.dirty -> 0.5.8.post77+g7c853b0.dirty + + The commits after a tag are counted as a post-release: a version + newer than the tag, so that it satisfies e.g. python-ipmi>=0.5.8. Without tags, e.g. in a shallow clone, 'git describe --always' prints only the abbreviated commit: @@ -32,7 +35,7 @@ def pep440_version(describe): tag, distance, commit, dirty = m.groups() version = tag if distance: - version += f'.dev{distance}+{commit}' + version += f'.post{distance}+{commit}' if dirty: version += ('.' if distance else '+') + dirty[1:] return version From 506637807524d8f93a999efe40dd1804251bca97 Mon Sep 17 00:00:00 2001 From: Yehia Ibrahim Date: Tue, 24 Nov 2026 15:21:41 +0100 Subject: [PATCH 2/2] interfaces: remove the unused import of IpmiTimeoutError Since the IPMB request retries accept a late response to an earlier try, ipmb.py no longer catches or raises IpmiTimeoutError itself; it is only named in the docstrings. ruff reports the import as unused (F401), which fails the lint check. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Yehia Ibrahim --- pyipmi/interfaces/ipmb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyipmi/interfaces/ipmb.py b/pyipmi/interfaces/ipmb.py index 77c53e7..2ba4634 100644 --- a/pyipmi/interfaces/ipmb.py +++ b/pyipmi/interfaces/ipmb.py @@ -37,7 +37,6 @@ from collections.abc import Iterable, Sequence from .. import Routing, Target -from ..errors import IpmiTimeoutError from ..msgs import (create_message, create_request_by_name, encode_message, decode_message, constants) from ..utils import check_rsp_completion_code