Skip to content

Report the real version in X-Search1API-Client, release 0.6.1 - #7

Merged
fatwang2 merged 1 commit into
mainfrom
client-header-version
Nov 5, 2026
Merged

fatwang2 merged 1 commit into
mainfrom
client-header-version

Conversation

@fatwang2

@fatwang2 fatwang2 commented Nov 5, 2026

Copy link
Copy Markdown
Member

What changed

  • Since 0.3.0 the X-Search1API-Client request header has always said python/0.3.0, whatever version was installed. It now sends python/<package version>.
  • __version__ moved to search1api/_version.py, so client.py can import it without importing the package __init__ in a cycle. search1api.__version__ is still exported.
  • New tests check that __version__ equals the version in pyproject.toml and that the header uses it, so a version bump that forgets this file fails CI.
  • Version 0.6.1 and a CHANGELOG entry. No API changes.

How it was tested

On Python 3.9 and 3.12:

  • ruff format --check .: passed.
  • ruff check .: passed.
  • mypy src/search1api: passed.
  • pytest: 25 passed, including 2 new tests.

python -m build produces search1api-0.6.1 sdist and wheel.

After release

  • PyPI shows 0.6.1.
  • Gateway request logs show python/0.6.1 for this client.

🤖 Generated with Claude Code

The header has said python/0.3.0 since 0.3.0. The version now lives in
search1api/_version.py and a test keeps it equal to pyproject.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fatwang2
fatwang2 merged commit e13530b into main Nov 5, 2026
2 checks passed
@fatwang2
fatwang2 deleted the client-header-version branch November 5, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant