You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say my project has a Writer class in the file a/b/c.py. I can not refer to this writer using get_writer_class('a.b.c') because get_writer_class uses __import__ for importing the module and __import__('a.b.c') returns a in this case. Using importlib.import_module instead of __import__ would fix this and it is also the way that the help message for __import__ recommends.
author: uyar
created: 2020-01-28 12:17:32.721000
assigned: None
SF_url: https://sourceforge.net/p/docutils/feature-requests/67
Say my project has a
Writer
class in the filea/b/c.py
. I can not refer to this writer usingget_writer_class('a.b.c')
becauseget_writer_class
uses__import__
for importing the module and__import__('a.b.c')
returnsa
in this case. Usingimportlib.import_module
instead of__import__
would fix this and it is also the way that the help message for__import__
recommends.commenter: milde
posted: 2020-01-30 12:32:06.304000
title: #67 get_writer_class supporting multi-level module names
commenter: milde
posted: 2020-01-30 12:32:06.786000
title: #67 get_writer_class supporting multi-level module names
Implemented in revision 8478.
Thanks for reporting.
commenter: milde
posted: 2020-03-03 21:36:28.938000
title: #67 get_writer_class supporting multi-level module names
The text was updated successfully, but these errors were encountered: