Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

support for implicit namespace packages (pep 420) #68

Open
Nurbel opened this issue Aug 25, 2020 · 2 comments
Open

support for implicit namespace packages (pep 420) #68

Nurbel opened this issue Aug 25, 2020 · 2 comments

Comments

@Nurbel
Copy link

Nurbel commented Aug 25, 2020

my project uses implicit namespace packages ( https://www.python.org/dev/peps/pep-0420/ ), which source trail does not seem to recognize.

For example, given this file structure:
my_ns_package/subpackage/
init.py
main.py
other.py

I get errors in main.py when trying to import symbols from my_ns_package.subpackage.other ( "Imported symbol named "my_ns_package" has not been found.")

Is it something you plan to support?

@mlangkabel
Copy link
Contributor

Hey @Nurbel. From within main.py you would just write import other, right?

@Nurbel
Copy link
Author

Nurbel commented Sep 14, 2020

No, the subpackage directory is not in my python path. I could write from . import other or from .other import symbol.
I guess in this example, I would call main with python -m my_ns_package.subpackage.main

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants