You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] __version__ in __init__.py (0.5.0) out of sync with pyproject.toml (0.6.3) #25
Root cause: semantic-release (.releaserc.yaml:52,63) only rewrites and commits pyproject.toml on release — it never touches __init__.py, so the hardcoded __version__ drifts on every release.
The fix
Rather than just bumping the literal to 0.6.3 (which would drift again next release), __version__ is now derived from installed package metadata, making pyproject.toml the single source of truth:
fromimportlib.metadataimportPackageNotFoundError, versiontry:
__version__=version("inference-gateway")
exceptPackageNotFoundError: # pragma: no cover__version__="0.0.0"
Added tests/test_version.py asserting __version__ == importlib.metadata.version("inference-gateway") to guard against future drift.
Verification
python -m py_compile on both files → OK
Verified importlib.metadata.version() resolves an installed dist (returned pip's version) and that the PackageNotFoundError fallback fires for an uninstalled name → both paths OK
⚠️Could not run the full pytest/black suite: dependencies aren't installed in this environment and pip install -e ".[dev]" required an approval that wasn't granted. CI on the PR will run black --check + pytest. If you'd like me to run them here, add pip/task to my allowed tools.
Maintainer notes
No cross-repo impact — SDK-only change, no schemas/openapi.yaml involvement.
No [DOCS] ticket needed — this is a fix:, not a feat:/public-surface refactor, and adds no new documented surface.
Activity
edenreich commentedon Jun 6, 2026
@claude Can you validate it's true? and if so can you fix it? use /maintainer
claude commentedon Jun 6, 2026
Claude finished @edenreich's task in 5m 34s —— View job •
fix/issue-25-20260606-1228• [Create PR ➔](https://github.com/inference-gateway/python-sdk/compare/main...fix/issue-25-20260606-1228?quick_pull=1&title=Issue%20%2325%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%2325%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Version sync fix — issue #25
Validated: confirmed true.
__version__was out of sync, and I've fixed it.Tasks
__version__from package metadata)What was wrong
inference_gateway/__init__.py:37→__version__ = "0.5.0"pyproject.toml:3→version = "0.6.3"Root cause: semantic-release (
.releaserc.yaml:52,63) only rewrites and commitspyproject.tomlon release — it never touches__init__.py, so the hardcoded__version__drifts on every release.The fix
Rather than just bumping the literal to
0.6.3(which would drift again next release),__version__is now derived from installed package metadata, makingpyproject.tomlthe single source of truth:Added
tests/test_version.pyasserting__version__ == importlib.metadata.version("inference-gateway")to guard against future drift.Verification
python -m py_compileon both files → OKimportlib.metadata.version()resolves an installed dist (returnedpip's version) and that thePackageNotFoundErrorfallback fires for an uninstalled name → both paths OKpytest/blacksuite: dependencies aren't installed in this environment andpip install -e ".[dev]"required an approval that wasn't granted. CI on the PR will runblack --check+pytest. If you'd like me to run them here, addpip/taskto my allowed tools.Maintainer notes
schemas/openapi.yamlinvolvement.[DOCS]ticket needed — this is afix:, not afeat:/public-surface refactor, and adds no new documented surface.PR: #30
· branch
fix/issue-25-20260606-1228