opentelemetry-python
opentelemetry-python copied to clipboard
Added py.typed in sub-modules confirming to PEP 420
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
This PR is regarding https://github.com/open-telemetry/opentelemetry-python/issues/2591 Issue where PyLance was unable to detect opentelemetry because its a namespace package.
Fixes #2591
Type of change
Please delete options that are not relevant.
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
Does This PR Require a Contrib Repo Change?
Answer the following question based on these examples of changes that would require a Contrib Repo Change:
-
The OTel specification has changed which prompted this PR to update the method interfaces of
opentelemetry-api/
oropentelemetry-sdk/
-
The method interfaces of
test/util
have changed -
Scripts in
scripts/
that were copied over to the Contrib repo have changed -
Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
-
pyproject.toml
-
isort.cfg
-
.flake8
-
-
When a new
.github/CODEOWNER
is added -
Major changes to project information, such as in:
-
README.md
-
CONTRIBUTING.md
-
-
[ ] Yes. - Link to PR:
-
[ ] No.
Checklist:
- [X] Followed the style guidelines of this project
- [x] Changelogs have been updated
- [] Unit tests have been added
- [ ] Documentation has been updated
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: rajat315315 / name: Rajat Jain (cec89e13f2bd2473b081b9646676cae079f6b273, 4679a8573f7d4cdbe2affcf4a4dc7aca655feaf1, 85ed6792c8b19c94199abc2f6cb83507a655cc53, 2b82d4ef74ab54f85eb5cdefdd181f6265f8d552)
- :white_check_mark: login: ocelotl / name: Diego Hurtado (d876cdb51f2ef158d480fffb704db753c759f47d, 745dbce6e0d8632ac7b4ed58b5589ab4e1633b4e, 48f82986aa1e16e251f466a249bf086c38d85352, 23ba2578783838ba801ce858eadcb6cb2e01bb72, 4486518f7614a8ccde74d3ca1d3f3a6b2cb7021e)
My understanding is that in each of the folders within https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-api/src/opentelemetry _logs
, attributes
... there should be a py.typed file rather than a single py.typed file in that folder. Furthermore the 2 .py files in that folder should be converted to modules that has a py.typed
file within them
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: rajat315315 / name: Rajat Jain (4bb8d72074481c7cbfba83301cf503cc77bdfded, 96320d20ad7937611a00fedf01cdb73e4d1379e1, 9af787297e606fa6b9db34e71be976b3c44cf540, 752d485976f3a6434cc9843f303aa8835ce4b361)
If we convert version.py
and environment_variables.py
to a module, running tox
fails..
ok, what are the exact errors that you are seeing ? It may be that the tox configuration needs to be updated?
Sorry, it got fixed. I needed to correct the reference to version.py
in pyproject.toml
as well.
Could you please review now?
@ocelotl @rajat315315 This looks good to me
@rajat315315
Are you still working on this? Please fix the conflicts and rebase.