When importing the library all subpackages are added to sys.modules as top-hierarchy packages/modules which creates ambigious imports.
If I would have my own module/package named like any of the supackages the import order becomes important.
# file 1
import world # imports my module, or the expected one from sys.path
import ad_rss
# file 2
import ad_rss
import world # This is ad_rss.rss.world which is unexpected
sys.modules["core"], sys.modules["world"], sys.modules["unstructured"], ... these all should be appropriate subpackages of ad_rss and not their own package, e.g. sys.modules[ad_rss.rss.core]`
When importing the library all subpackages are added to
sys.modules
as top-hierarchy packages/modules which creates ambigious imports. If I would have my own module/package named like any of the supackages the import order becomes important.sys.modules["core"], sys.modules["world"], sys.modules["unstructured"], ...
these all should be appropriate subpackages ofad_rss
and not their own package, e.g.sys.modules[
ad_rss.rss.core]`