Conversation
The xfail blamed a Pydantic bug about trailing slashes, but the real
issue was that AnyHttpUrl('https://auth.example.com') normalizes the
URL to 'https://auth.example.com/' at construction time. Once built,
passing that object to a model with url_preserve_empty_path=True has
no effect — the config only applies when parsing from a string.
Fix: construct test inputs via TypeAdapter(AnyHttpUrl,
config=ConfigDict(url_preserve_empty_path=True)).validate_python(),
which mirrors how AuthSettings parses issuer_url in production and
preserves the empty path correctly end to end.
Contributor
|
This PR has been closed automatically. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and this PR doesn't link an open issue yet.
You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned, and realistically most auto-closed PRs stay closed. There's no need to open a new PR either way. CONTRIBUTING.md has the full reasoning, but in short:
Maintainers: reopen, remove |
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.
The xfail blamed a Pydantic bug about trailing slashes, but the real issue was that AnyHttpUrl('https://auth.example.com') normalizes the URL to 'https://auth.example.com/' at construction time. Once built, passing that object to a model with url_preserve_empty_path=True has no effect — the config only applies when parsing from a string.
Fix: construct test inputs via TypeAdapter(AnyHttpUrl, config=ConfigDict(url_preserve_empty_path=True)).validate_python(), which mirrors how AuthSettings parses issuer_url in production and preserves the empty path correctly end to end.
Fixes #
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
help wanted, or I'm a maintainer)Additional context