FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-118761: Fix star-import of ``ast`` by AA-Turner · Pull Request #132024 · python/cpython · GitHub

/ cpython Public

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

Closed
AA-Turner wants to merge 2 commits into
python:mainfrom
AA-Turner:ast-unparse-followups
Closed

gh-118761: Fix star-import of ast#132024
AA-Turner wants to merge 2 commits into
python:mainfrom
AA-Turner:ast-unparse-followups

Conversation

AA-Turner commented Apr 2, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member Author

Closing in favour of #132025.

A

AA-Turner closed this Apr 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL