Skip to content

Conversation

@emmatyping
Copy link
Member

This might be overkill - I definitely understand if people think so, but I stumbled over this when testing #19578. Python doesn't come with the test module by default on Windows if installed through pymanager. Since test.support.EqualToForwardRef is used, I figured a clear error message about how to resolve this would be nice.

Another approach would be to just use the pre-3.14 ForwardRef code and not raise an error here. I'm not totally sure which is better.

Copy link
Collaborator

@sterliakov sterliakov left a comment

Choose a reason for hiding this comment

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

LG, thanks! I don't have any particular preference either: both raising an actionable error and falling back to the old import makes sense. Given that this code only lives in a test, maybe suggesting the proper fix (as done in this PR) is better.

@emmatyping emmatyping merged commit adacbbf into python:master Aug 9, 2025
13 checks passed
@emmatyping emmatyping deleted the give-instructions-missing-test-module branch August 9, 2025 00:27
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