Skip to content

FIX: ensure that used sub-packages are actually imported #22306

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

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

tacaswell
Copy link
Member

PR Summary

closes #22305

We were relying on an implicit import of a sub-module.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

We could test this by adding a sub-process test, but I am not sure that it is worth it. That said, if someone wants a test on this I will add it.

@tacaswell tacaswell added this to the v3.5.2 milestone Jan 24, 2022
jklymak
jklymak previously approved these changes Jan 24, 2022
@jklymak jklymak dismissed their stale review January 24, 2022 20:32

oops, guess I shouldn't approve if the tests aren't passing. Looks like we have a circular import...

We need to ensure that the sub-module matplotlib.font_manager is imported when
it is used in SclarFormater, however if we import it at the top level we will
get circular imports.

closes matplotlib#22305
@tacaswell
Copy link
Member Author

🐑 Did not run the tests locally before pushing.

@timhoffm timhoffm merged commit 22b6b89 into matplotlib:main Jan 24, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 24, 2022
@tacaswell tacaswell deleted the fix_missing_import branch January 24, 2022 22:49
QuLogic added a commit that referenced this pull request Jan 24, 2022
…306-on-v3.5.x

Backport PR #22306 on branch v3.5.x (FIX: ensure that used sub-packages are actually imported)
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.

[Bug]: Import Error in Matplotlib 3.5.1
4 participants