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

Added py.typed in sub-modules confirming to PEP 420 #3385

Merged
merged 9 commits into from
Jul 10, 2024

Conversation

rajat315315
Copy link
Contributor

@rajat315315 rajat315315 commented Jul 18, 2023

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.

  • 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/ or opentelemetry-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:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • [] Unit tests have been added
  • Documentation has been updated

@rajat315315 rajat315315 requested a review from a team July 18, 2023 11:24
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 18, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@jenshnielsen
Copy link
Contributor

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 18, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@rajat315315
Copy link
Contributor Author

If we convert version.py and environment_variables.py to a module, running tox fails..

@jenshnielsen
Copy link
Contributor

ok, what are the exact errors that you are seeing ? It may be that the tox configuration needs to be updated?

@rajat315315
Copy link
Contributor Author

Sorry, it got fixed. I needed to correct the reference to version.py in pyproject.toml as well.
Could you please review now?

@ocelotl ocelotl added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 7, 2023
@rajat315315 rajat315315 requested a review from ocelotl August 11, 2023 14:47
@jenshnielsen
Copy link
Contributor

@ocelotl @rajat315315 This looks good to me

@lzchen
Copy link
Contributor

lzchen commented Sep 7, 2023

@rajat315315

Are you still working on this? Please fix the conflicts and rebase.

@ocelotl ocelotl merged commit 732ea8a into open-telemetry:main Jul 10, 2024
269 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyLance / mypy doesn't accept opentelemetry as a namespace package
4 participants