Visitar URL original
bpo-44120: Fix class resolver in logging.config by akihiro · Pull Request #26229 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20250621221120/https://github.com/python/cpython/pull/26229
Skip to content

bpo-44120: Fix class resolver in logging.config #26229

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

Closed
wants to merge 1 commit into from

Conversation

akihiro
Copy link

@akihiro akihiro commented May 19, 2021 •

Use importlib.import_module instead of import to avoid import error.

ImportError is happend when import class foo.logging.BarFormatter if foo module has import logging directive because getattr(found, name) return logging module not bar.logging module when _resolve() traverse module from bar to bar.logging.

https://bugs.python.org/issue44120

Use importlib.import_module instead of __import__ to avoid import error.
@vsajip
Copy link
Member

vsajip commented May 19, 2021 •

See my comment on the issue. I don't think bpo-44120 is a valid bug.

@vsajip
Copy link
Member

vsajip commented May 25, 2021

Issue closed as "not a bug".

@vsajip vsajip closed this May 25, 2021
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.

5 participants