Skip to content

[mypyc] Provide instructions for resolving missing test module on Windows #19579

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

Merged

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.

Co-authored-by: Stanislav Terliakov <50529348+sterliakov@users.noreply.github.com>
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