Skip to content

Remove star import from _mkl_service#178

Merged
ndgrigorian merged 9 commits into
masterfrom
remove-star-import
Apr 13, 2026
Merged

Remove star import from _mkl_service#178
ndgrigorian merged 9 commits into
masterfrom
remove-star-import

Conversation

@ndgrigorian

@ndgrigorian ndgrigorian commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

This PR removes a star import in the __init__ from _mkl_service. This star import polluted __dir__ with numbers and warnings modules which are imported in _py_mkl_service.pyx. Replacing with individual imports resolved this issue.

Copilot AI review requested due to automatic review settings April 10, 2026 19:25
@ndgrigorian ndgrigorian reopened this Apr 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the mkl public API surface by replacing from ._py_mkl_service import * with explicit imports, preventing internal helper modules imported by the Cython extension (e.g., numbers, warnings) from leaking into mkl’s namespace and dir(mkl) output.

Changes:

  • Replace star import from ._py_mkl_service with an explicit symbol import list.
  • Add an explicit __all__ to define the intended public export set.

Comment thread mkl/__init__.py Outdated
Comment thread mkl/__init__.py Outdated
Comment thread mkl/__init__.py Outdated
@ndgrigorian ndgrigorian changed the title Remove star import from _py_mkl_service Remove star import from _mkl_service Apr 12, 2026
@antonwolfy antonwolfy added this to the 2.7.0 release milestone Apr 12, 2026

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ndgrigorian

@antonwolfy

Copy link
Copy Markdown
Collaborator

The only changelog is left

Comment thread mkl/__init__.py
Comment thread mkl/__init__.py
Comment thread pyproject.toml Outdated
@ndgrigorian ndgrigorian requested a review from antonwolfy April 13, 2026 18:51

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more comments from

@ndgrigorian ndgrigorian merged commit eb8784d into master Apr 13, 2026
96 of 98 checks passed
@ndgrigorian ndgrigorian deleted the remove-star-import branch April 13, 2026 20:32
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.

3 participants