You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 theopentelmetry.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.The text was updated successfully, but these errors were encountered: