Skip to content

gh-118761: Fix star-import of ast #132024

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

Closed
wants to merge 2 commits into from

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Apr 2, 2025

cc @danielhollas

I agree that removing 'sys' in __dir__ is fragile, but we can now move the import to the main() function, which I missed initially.

A

@danielhollas
Copy link
Contributor

I agree that removing 'sys' in dir is fragile, but we can now move the import to the main() function, which I missed initially.

Thanks, but my original objection still stands: If somebody introduces a new import at the top of the file and "forgets" to modify __dir__ we have a problem. And that problem would be worse in this PR which explicitly couples __dir__ to star imports.

@AA-Turner
Copy link
Member Author

Closing in favour of #132025.

A

@AA-Turner AA-Turner closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants