Skip to content

Conversation

@nbruin
Copy link
Contributor

@nbruin nbruin commented Dec 16, 2025

Warn about not importing from all and instead use import_statements to figure out where to import from instead.

Fixes #41213

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Warn about not importing from all and instead use `import_statements` to figure out where to import from instead.
@github-actions
Copy link

Documentation preview for this PR (built with commit bbbbf60; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729
Copy link
Contributor

user202729 commented Dec 17, 2025

We have .. WARNING::, but this part doesn't get rendered to HTML page anyway.

caveat: it isn't entirely clear this is what this module is meant to be. That said, it is true that the general direction is for imports in the Sage library to not import from this module.

@nbruin
Copy link
Contributor Author

nbruin commented Dec 17, 2025

it isn't entirely clear this is what this module is meant to be.

It's the global namespace for the interactive prompt. Hence the definition of sage_globals in there that captures the global namespace of that module. It has some other configuration of the interactive state as well.

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.

LazyImport is breaking my personal modules

2 participants