Menu

#67 get_writer_class supporting multi-level module names

Default
closed-fixed
nobody
None
5
2021-04-03
2020-01-28
No

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.

Discussion

  • Günter Milde

    Günter Milde - 2020-01-30
    • status: open --> open-accepted
     
  • Günter Milde

    Günter Milde - 2020-01-30

    Implemented in revision 8478.
    Thanks for reporting.

     
  • Günter Milde

    Günter Milde - 2020-03-03
    • status: open-accepted --> open-fixed
     
  • Günter Milde

    Günter Milde - 2021-04-03
    • status: open-fixed --> closed-fixed
     
  • Günter Milde

    Günter Milde - 2021-04-03

    Fixed in Docutils 0.17.
    Thank you for the report.

     

Log in to post a comment.