fix: replace authlib with requests to eliminate AuthlibDeprecationWarning#632
fix: replace authlib with requests to eliminate AuthlibDeprecationWarning#632ambient-code[bot] wants to merge 3 commits intomainfrom
Conversation
…ning Remove the authlib dependency which triggers a deprecation warning from its internal authlib.jose module on every import. Replace the OAuth2Session usage with a lightweight _OAuth2Client class that uses requests.Session directly for OAuth2 flows. Fixes #627 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tests covering __init__, verify property, create_authorization_url, fetch_token, and Config.client to bring coverage on changed lines from 26.2% to 100%, meeting the 80% threshold required by diff-cover CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Added unit tests for the The new test file (
Diff-cover on changed lines is now 100% (was 26.2%), well above the 80% threshold. |
Each sub-package's coverage.xml records filenames relative to the package directory (e.g. "jumpstarter_cli_common/oidc.py"), but diff-cover resolves paths relative to the git root. This mismatch caused diff-cover to miss coverage data from per-package test runs, resulting in artificially low coverage percentages on changed lines. Fix by injecting the correct <source> element into each coverage.xml before running diff-cover, allowing it to reconstruct absolute paths that match the git diff output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI Fix: diff-cover path resolutionThe Root CauseEach sub-package test run (via The 26.2% coverage reported by CI came solely from the FixAdded a CI step that injects the correct Note: This is a pre-existing infrastructure issue affecting all sub-packages in the mono-repo, not specific to this PR. The fix benefits all future PRs. |
Summary
authlibdependency fromjumpstarter-cli-commonwhich triggers anAuthlibDeprecationWarningon every import due to its internalauthlib.josemodule usageauthlib.integrations.requests_client.OAuth2Sessionwith a lightweight_OAuth2Clientclass usingrequests.Sessiondirectlyrequestsas an explicit dependency (was previously a transitive dependency of authlib)Fixes #627
Test plan
jumpstarter-cli-commontests pass (including 4 oidc tests)AuthlibDeprecationWarningwhen importingjumpstarter_cli_common.oidcmake lint-fix)Generated with Claude Code