Skip to content
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

MAINT: Use importlib, pkgutil over __import__ #1284

Merged
merged 3 commits into from
Apr 30, 2023

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Apr 29, 2023

A cleanup, would be nice to have in before implementing things in #1283. Closes #1285.

@HaoZeke HaoZeke force-pushed the cleanUpPlugins branch 2 times, most recently from ee1b5d8 to 218c451 Compare April 29, 2023 21:08
Comment on lines -45 to +57
mod = __import__(name, {}, {}, [], level=0)
self.init_plugin(mod)
self._plugins.append(mod)
if extended:
mod = importlib.import_module(name)
else:
mod = self._load_plugin_by_name(name)
if mod:
self.init_plugin(mod)
self._plugins.append(mod)
Copy link
Member Author

@HaoZeke HaoZeke Apr 29, 2023

Choose a reason for hiding this comment

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

This also fixes what I noticed in #1283, and described in #1285.

@HaoZeke HaoZeke requested a review from mattip April 30, 2023 12:20
@mattip mattip merged commit 9c2f028 into airspeed-velocity:master Apr 30, 2023
@mattip
Copy link
Contributor

mattip commented Apr 30, 2023

Thanks @HaoZeke

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: asv plugins not loaded
2 participants