Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py.typed not included in wheels #4113

Closed
hartungstenio opened this issue Aug 8, 2024 · 2 comments · Fixed by #4172
Closed

py.typed not included in wheels #4113

hartungstenio opened this issue Aug 8, 2024 · 2 comments · Fixed by #4172
Labels
bug Something isn't working

Comments

@hartungstenio
Copy link

hartungstenio commented Aug 8, 2024

Describe your environment

OS: ubuntu
Python version: Python 3.12
SDK version: 1.26.0
API version: 1.26.0

What happened?

#3385 added a py.typed marker to every subpackage.

This marker was added to the subpackage root, but it should stay with the package source code (inside /src)

ie: Instead of exporter/opentelemetry-exporter-prometheus, it should be exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus

Steps to Reproduce

Run mypy with --strict flag in a project importing from opentelemetry.exporter.prometheus.

Expected Result

Mypy succeeds

Actual Result

Mypy fails with

error: Skipping analyzing "opentelemetry.exporter.prometheus": module is installed, but missing library stubs or py.typed marker  [import-untyped]

Additional context

No response

Would you like to implement a fix?

Yes

@hartungstenio hartungstenio added the bug Something isn't working label Aug 8, 2024
kjagiello added a commit to kjagiello/opentelemetry-python that referenced this issue Sep 1, 2024
As defined in PEP 420, the py.typed marker files for namespace packages
should be placed "in the submodules of the namespace, to avoid conflicts
and for clarity". In commit 732ea8a, the markers were added to the
subpackage roots, which serves no purpose. This changeset addresses all
marker-related issues in this repository.

A summary of the changes:

- Removed the unnecessary py.typed markers from the subpackage roots.
- Removed the markers at the root of the namespaces.
- Added the missing marker to the prometheus exporter. Fixes open-telemetry#4113.
- Added the missing marker in opentelemetry._events.
- Removed the accidentally reintroduced jaeger exporters, which were
  originally removed in commit 1625b35.
kjagiello added a commit to kjagiello/opentelemetry-python that referenced this issue Sep 1, 2024
As defined in PEP 561, the py.typed marker files for namespace packages
should be placed "in the submodules of the namespace, to avoid conflicts
and for clarity". In commit 732ea8a, the markers were added to the
subpackage roots, which serves no purpose. This changeset addresses all
marker-related issues in this repository.

A summary of the changes:

- Removed the unnecessary py.typed markers from the subpackage roots.
- Removed the markers at the root of the namespaces.
- Added the missing marker to the prometheus exporter. Fixes open-telemetry#4113.
- Added the missing marker in opentelemetry._events.
- Removed the accidentally reintroduced jaeger exporters, which were
  originally removed in commit 1625b35.
kjagiello added a commit to kjagiello/opentelemetry-python that referenced this issue Sep 1, 2024
As defined in PEP 561, the py.typed marker files for namespace packages
should be placed "in the submodules of the namespace, to avoid conflicts
and for clarity". In commit 732ea8a, the markers were added to the
subpackage roots, which serves no purpose. This changeset addresses all
marker-related issues in this repository.

A summary of the changes:

- Removed the unnecessary py.typed markers from the subpackage roots.
- Removed the markers at the root of the namespaces.
- Added the missing marker to the prometheus exporter. Fixes open-telemetry#4113.
- Added the missing marker to opentelemetry._events.
- Removed the accidentally reintroduced jaeger exporters, which were
  originally removed in commit 1625b35.
kjagiello added a commit to kjagiello/opentelemetry-python that referenced this issue Sep 1, 2024
As defined in PEP 561, the py.typed marker files for namespace packages
should be placed "in the submodules of the namespace". In commit
732ea8a, the markers were added to the subpackage roots, which serves no
purpose. This changeset addresses all marker-related issues in this
repository.

A summary of the changes:

- Removed the unnecessary py.typed markers from the subpackage roots.
- Added the missing marker to the prometheus exporter. Fixes open-telemetry#4113.
- Added the missing marker to opentelemetry._events.
- Removed the accidentally reintroduced jaeger exporters, which were
  originally removed in commit 1625b35.
kjagiello added a commit to kjagiello/opentelemetry-python that referenced this issue Sep 1, 2024
As defined in PEP 561, the py.typed marker files for namespace packages
should be placed "in the submodules of the namespace". In commit
732ea8a, the markers were added to the subpackage roots, which serves no
purpose. This changeset addresses all marker-related issues in this
repository.

A summary of the changes:

- Removed the unnecessary py.typed markers from the subpackage roots.
- Added the missing marker to the prometheus exporter. Fixes open-telemetry#4113.
- Added the missing marker to opentelemetry._events.
- Removed the accidentally reintroduced jaeger exporters, which were
  originally removed in commit 1625b35.
@jenshnielsen
Copy link
Contributor

I think this was resolved in #4084 included in 1.27

@xrmx
Copy link
Contributor

xrmx commented Sep 10, 2024

@jenshnielsen there is a followup PR at #4172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants