Skip to content

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