Sep-30-2017, 03:13 PM
I had a question regarding namespace packages:
https://packaging.python.org/guides/pack...-packages/
Let’s say I have several packages, a through z. All of these packages are part of a group but do not necessarily depend on one another so they would not all need to be installed at once as part of a parent package.
This appears to be the case that namespace packages were made for and it does say:
However, I know that just because a feature exists does not mean it should be used for it also says,
I am not sure I understand the caveats and the inappropriate use cases. What are the caveats? What are some inappropriate use cases?
I do note that it also says:
and this approach does have some appeal in its simplicity.
https://packaging.python.org/guides/pack...-packages/
Let’s say I have several packages, a through z. All of these packages are part of a group but do not necessarily depend on one another so they would not all need to be installed at once as part of a parent package.
This appears to be the case that namespace packages were made for and it does say:
Quote:Each sub-package can now be separately installed, used, and versioned.
However, I know that just because a feature exists does not mean it should be used for it also says,
Quote:namespace packages come with several caveats and are not appropriate in all cases.
I am not sure I understand the caveats and the inappropriate use cases. What are the caveats? What are some inappropriate use cases?
I do note that it also says:
Quote:A simple alternative is to use a prefix on all of your distributions such as import mynamespace_subpackage_a (you could even use import mynamespace_subpackage_a as subpackage_a to keep the import object short).
and this approach does have some appeal in its simplicity.