Skip to content

gh-135069: Fix exception message in encodings.idna module #135071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Jun 3, 2025

Fixes #135069.

Requires backport to 3.13 and 3.14 branches.

Fix the 'Unsupported error handling' error message
in the encodings.idna.IncrementalDecoder class.
@danielhollas
Copy link
Contributor Author

danielhollas commented Jun 3, 2025

The docs build fails with

cpython/cpython/Doc/build/NEWS:91: WARNING: py:meth reference target not found: encodings.idna.IncrementalDecoder.decode [ref.meth]

The decode method comes from a parent class I believe. Should a link to the private _buffer_decode method instead?

@tomasr8
Copy link
Member

tomasr8 commented Jun 3, 2025

Should a link to the private _buffer_decode method instead?

You could also just link to IncrementalDecoder

@danielhollas
Copy link
Contributor Author

danielhollas commented Jun 3, 2025

You could also just link to IncrementalDecoder

Thanks, makes sense to me. I tried to change it but still got an error:

cpython/Doc/build/NEWS:91: WARNING: py:class reference target not found: encodings.idna.IncrementalDecoder [ref.class]

No matter how long I stare at it the new blurb looks correct to me? Apologies if that is something obvious, I don't have much experience with rst.

EDIT: The windows build failure looks like a transient http error?

@tomasr8
Copy link
Member

tomasr8 commented Jun 4, 2025

Maybe we can suppress the reference with !? Something like

 `:class:`!encodings.idna.IncrementalDecoder

@danielhollas
Copy link
Contributor Author

Maybe we can suppress the reference with !?

That worked, thanks!

Copy link
Member

@tomasr8 tomasr8 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! The news entry could be even shorter (and with less detail) but I think this is also fine 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

encodings.idna: Unexpanded f-string in "Unsupported error handling" exception
3 participants