Skip to content

Decode IDNA labels in non-leading host positions#1018

Merged
Kludex merged 1 commit into
pydantic:mainfrom
mbeijen:fix-url-host-nested-idna-display
Jun 4, 2026
Merged

Decode IDNA labels in non-leading host positions#1018
Kludex merged 1 commit into
pydantic:mainfrom
mbeijen:fix-url-host-nested-idna-display

Conversation

@mbeijen

@mbeijen mbeijen commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Supersedes #979 — uses the new idna.decode(..., display=True) added in idna 3.18 (kjd/idna#248, kjd/idna@1a5bf80, released 2026-06-02), so the per-label recovery lives in idna where Kludex preferred it.


AI-assisted: change drafted by Claude under my review.

Refs pydantic#979, kjd/idna#248.

Co-Authored-By: Abdulmumin Yaqeen <abdulmuminyqn@gmail.com>
@codspeed-hq

codspeed-hq Bot commented Jun 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing mbeijen:fix-url-host-nested-idna-display (91e7c3c) with main (26dd31e)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pyproject.toml">

<violation number="1" location="pyproject.toml:6">
P2: `exclude-newer-package` uses a hardcoded timestamp that will permanently cap `idna` versions after the temporary workaround period expires</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread pyproject.toml
default-groups = ["dev", "docs", "bench"]
required-version = ">=0.8.6"
exclude-newer = "7 days"
exclude-newer-package = { idna = "2026-06-03T00:00:00Z" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: exclude-newer-package uses a hardcoded timestamp that will permanently cap idna versions after the temporary workaround period expires

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pyproject.toml, line 6:

<comment>`exclude-newer-package` uses a hardcoded timestamp that will permanently cap `idna` versions after the temporary workaround period expires</comment>

<file context>
@@ -3,6 +3,7 @@ package = false
 default-groups = ["dev", "docs", "bench"]
 required-version = ">=0.8.6"
 exclude-newer = "7 days"
+exclude-newer-package = { idna = "2026-06-03T00:00:00Z" }
 
 [tool.uv.workspace]
</file context>

@Kludex Kludex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that idna was vulnerable in <3.15 versions, given GHSA-65pc-fj4g-8rjx, then I'll assume that bumping is fine for everybody.

I don't think anyone sets upperbound constraints on idna.

@Kludex Kludex changed the title fix: decode IDNA labels in non-leading position Decode IDNA labels in non-leading host positions Jun 4, 2026
@Kludex Kludex merged commit 998dd69 into pydantic:main Jun 4, 2026
12 checks passed
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.

2 participants