fix(cli): silence authlib.jose deprecation warning from fastmcp#2025
Open
kermanx wants to merge 4 commits intoMoonshotAI:mainfrom
Open
fix(cli): silence authlib.jose deprecation warning from fastmcp#2025kermanx wants to merge 4 commits intoMoonshotAI:mainfrom
kermanx wants to merge 4 commits intoMoonshotAI:mainfrom
Conversation
authlib 1.7.0 added an import-time AuthlibDeprecationWarning on authlib.jose, which fastmcp's JWT auth provider imports. Filter that specific message before any fastmcp import so users don't see the noise on startup.
Signed-off-by: _Kerman <kermanx@qq.com>
Signed-off-by: _Kerman <kermanx@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
N/A — trivial startup noise cleanup.
Description
authlib1.7.0 (2026-04-18) added an import-timeAuthlibDeprecationWarningonauthlib.jose, whichfastmcp's JWT auth provider imports unconditionally:Users see this on every
kimistartup.Why we can't root-cause fix this
fastmcp), not our code.fastmcp— including the latest 3.x — still importsauthlib.josedirectly; there is no upstream migration tojoserfcin flight.authlib<1.7in ourpyproject.tomlwould constrain a transitive dependency we don't directly use, block us from futureauthlib1.7+ fixes, and could collide iffastmcplater tightens its own bound.authlibkeeps the module functional until 2.0.0, so this is purely cosmetic noise during the transition.What this PR does
Add a narrow, message-specific
warnings.filterwarningsat the top ofsrc/kimi_cli/__main__.py(before any import chain that pulls infastmcp), matching only this exact deprecation text. Unlike the existing broadDeprecationWarningfilter inapp.py, this one won't hide unrelated warnings. Whenfastmcpmigrates offauthlib.jose, the filter becomes a no-op and can be removed.Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.