View Single Post
Old 01-11-2021, 12:10 AM   #8
bugstomper
Member
bugstomper began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jun 2017
Device: kindle
The two places that FanFicFare uses with self: are in the def load_actual_plugin and def cli_main in its __init__.py. Is it wrong for load_actual_plugin to return its result calculated inside with self: where it will be used outside of the scope of the with self:? If it should use self.__enter__() and self:__exit__() where would they go to make sure it works?

Also, if that is wrong, what is going on with the problem only showing up when a .so file exists?

I looked for all uses of __file__ in files in the plugin and found that the one for certificates is in file certifi/core.py. That is very short and simple. It looks like it first tries to use importlib.resources and falls back to __file__ if it gets an ImportError exception. Is there something wrong with the call to get_path or __enter__ which would interact with whatever happens when there is a .so file in the plugin zip?
bugstomper is offline   Reply With Quote