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

fix: packaging type info #654

Merged
merged 2 commits into from
May 15, 2024
Merged

fix: packaging type info #654

merged 2 commits into from
May 15, 2024

Conversation

alespour
Copy link
Contributor

@alespour alespour commented May 13, 2024

Closes #622

Proposed Changes

This adds PEP 561 distributing and packaging type information, which specifically resolves issue with MyPy
error: Skipping analyzing "influxdb_client": module is installed, but missing library stubs or py.typed marker [import-untyped]

The required marker really is just an empty file py.typed. The same fix has been applied in v3 client.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional

@alespour alespour marked this pull request as ready for review May 13, 2024 10:03
@alespour alespour marked this pull request as draft May 14, 2024 11:25
@alespour alespour force-pushed the fix/packaging-type-info branch from 423c185 to e2dd513 Compare May 14, 2024 12:17
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.42%. Comparing base (08acb17) to head (e2dd513).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #654   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files          39       39           
  Lines        3510     3510           
=======================================
  Hits         3174     3174           
  Misses        336      336           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alespour alespour marked this pull request as ready for review May 14, 2024 13:05
@alespour alespour requested review from karel-rehor and bednar May 14, 2024 13:06
@alespour alespour merged commit 51d6fa4 into master May 15, 2024
17 checks passed
@alespour alespour deleted the fix/packaging-type-info branch May 15, 2024 07:20
@bednar bednar added this to the 1.43.0 milestone May 15, 2024
@max-accenta
Copy link

Hi, for some reason installing the package with the latest version (1.43) from pip does not install the py.typed file. Steps to reproduce:

python -m venv venv
. venv/bin/activate
python -m pip install influxdb_client
ls -l venv/lib/python3.11/site-packages/influxdb_client | grep typed
# Nothing

Installing directly from the repo works though (pip install git+https://github.com/influxdata/influxdb-client-python).
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Type Hints
4 participants