Deprecate and ignore the user_agent parameter - #2
Conversation
Co-Authored-By: Clanker
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughBoth verification clients now ignore supplied ChangesUser-Agent handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Both clients are described as sending the SDK User-Agent while warning when the deprecated parameter is supplied. No merge-blocking issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation consistently enforces the fixed header and adequately tests the intended behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Deprecates custom User-Agent configuration while preserving 1.x API compatibility.
Changes:
- Ignores
user_agentand emitsDeprecationWarning. - Enforces the SDK’s default header for sync and async clients.
- Adds coverage and changelog documentation.
| File | Description |
|---|---|
src/didww_verification/client.py |
Enforces User-Agent for synchronous clients. |
src/didww_verification/async_client.py |
Enforces User-Agent for asynchronous clients. |
tests/test_user_agent.py |
Tests fixed headers and deprecation warnings. |
CHANGELOG.md |
Documents the deprecation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Clanker
|



The SDK always sends
User-Agent: didww-verification-python/<version>.user_agentonVerificationClientandAsyncVerificationClientis published API, so it stays for 1.x but is ignored and emits aDeprecationWarning. Removal is planned for the next major version.http_clientis adopted, so that client's own default does not replace it.Verified with
pytest(143 passed),ruff,mypyandpyright.Summary by CodeRabbit
user_agentvalue.user_agentemits a deprecation warning; the parameter is planned for removal in the next major version.