Skip to content

Typing errors after upgrading to 1.34 #4615

Closed
@remohammadi

Description

@remohammadi

Describe your environment

OS: Mac OS X
Python version: 3.13.3
SDK version: 1.34.0
API version: 1.34.0

What happened?

Just after updating opentelemetry-sdk to the version released a few hours ago, I am receiving '"opentelemetry.sdk.resources" has no attribute "Resource"' error when type checking my code, on the line that simply imports it:

from opentelemetry.sdk.resources import SERVICE_NAME, SERVICE_VERSION, Resource
mypy src --install-types --non-interactive
src/vinder/otel_utils.py:8: error: Module "opentelemetry.sdk.resources" has no attribute "SERVICE_NAME"  [attr-defined]
src/vinder/otel_utils.py:8: error: Module "opentelemetry.sdk.resources" has no attribute "SERVICE_VERSION"  [attr-defined]
src/vinder/otel_utils.py:8: error: Module "opentelemetry.sdk.resources" has no attribute "Resource"  [attr-defined]
Found 3 errors in 1 file (checked 94 source files)

Is this expected? Am I importing them from an internal module?

Steps to Reproduce

pip install --upgrade opentelemetry-sdk?

Expected Result

No typing errors for that line.

Actual Result

'Module "opentelemetry.sdk.resources" has no attribute X' errors

Additional context

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions