As a follow up to @aabmass 's comment on #769, the __init__.py file in the SDK package causes it to be interpreted as a Regular Package instead of a Namespace Package. See the two types of Python packages. Namespace Packages should not have an __init__.py file.
Namespace packages are meant to contribute sub-packages (e.g. sdk.metrics, sdk.traces, sdk.resources) to some parent package (i.e. opentelemtry.sdk).
Having this __init__.py file makes it so that we cannot extend the opentelmetry.sdk package to have additional sub-packges (e.g. opentelemetry.sdk.extension).
The solution should be the same as in #769 , where we change the file to be called __init__.pyi instead. This should allow mypy to know this is a namespace package without preventing future sub-packages from being added.
As a follow up to @aabmass 's comment on #769, the
__init__.pyfile in the SDK package causes it to be interpreted as a Regular Package instead of a Namespace Package. See the two types of Python packages. Namespace Packages should not have an__init__.pyfile.Namespace packages are meant to contribute sub-packages (e.g.
sdk.metrics,sdk.traces,sdk.resources) to some parent package (i.e.opentelemtry.sdk).Having this
__init__.pyfile makes it so that we cannot extend theopentelmetry.sdkpackage to have additional sub-packges (e.g.opentelemetry.sdk.extension).The solution should be the same as in #769 , where we change the file to be called
__init__.pyiinstead. This should allow mypy to know this is a namespace package without preventing future sub-packages from being added.