-
Notifications
You must be signed in to change notification settings - Fork 114
Incomplete / incorrect version splitting for REST API endpoint #238
Copy link
Copy link
Open
Description
Upstream in the 5.2 branch the API version is defined as 5.2+:
Unfortunately, python-bugzilla expects to split version on the . and retrieve two ints:
Bugzilla version string: 5.2+
version doesn't match expected format X.Y.Z, assuming 5.0
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/bugzilla/base.py", line 447, in _set_bz_version
major, minor = [int(i) for i in version.split(".")[0:2]]
~~~^^^
ValueError: invalid literal for int() with base 10: '2+'
python-bugzilla/bugzilla/base.py
Lines 444 to 453 in 78f9ada
| def _set_bz_version(self, version): | |
| self._cache.version_raw = version | |
| try: | |
| major, minor = [int(i) for i in version.split(".")[0:2]] | |
| except Exception: | |
| log.debug("version doesn't match expected format X.Y.Z, " | |
| "assuming 5.0", exc_info=True) | |
| major = 5 | |
| minor = 0 | |
| self._cache.version_parsed = (major, minor) |
We've dropped the + in the Gentoo Bugzilla in the interim, but clearly the current handling does not reflect the reality of modern Bugzilla. The fallback to 5.0 is "fine", but ideally we would strip the + or something so that we:
- get accurate version information
- don't display a traceback when we connect to the API
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels