Skip to content

fix: start fix of issue 694 with more pythonic __all__ array. - #723

Open
karel-rehor wants to merge 5 commits into
masterfrom
fix/issue694
Open

karel-rehor wants to merge 5 commits into
masterfrom
fix/issue694

Conversation

@karel-rehor

@karel-rehor karel-rehor commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #694

Proposed Changes

Add the __all__ array to __init__.py

This replaces #722, which is good. But no-op aliases might be confusing for future maintainers and the more "pythonic" approach is to use the documented __all__ variable.

Note that ac1982's tests from that PR are gratefully being reused here.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (ef60f89) to head (b847687).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #723      +/-   ##
==========================================
+ Coverage   90.49%   90.53%   +0.03%     
==========================================
  Files          40       41       +1     
  Lines        3568     3581      +13     
==========================================
+ Hits         3229     3242      +13     
  Misses        339      339              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new export-list formatting violates the repository’s enforced flake8 rules and would fail the code-style CI check.

1 open issue
What changed in this PR

This PR addresses #694 by explicitly exporting the package’s public API through __all__, replacing the alias-based approach in #722 to support strict type checkers.

Changes:

  • Add an explicit public export list and a changelog entry.
  • Add runtime and mypy regression checks, with mypy included in test dependencies.
  • Update the asynchronous batching example’s timeout and error propagation.
File Description
tests/​typing/​public_exports.py Exercise representative public imports and runtime behavior.
tests/​test_PublicExports.py Run the import fixture directly and through mypy.
setup.py Add mypy to test dependencies.
influxdb_client/​__init__.py Declare public exports using __all__.
examples/​asynchronous_batching.py Increase the timeout and propagate write errors to the completion future.
CHANGELOG.md Document the public export fix.

Review effort: Balanced

Comment thread influxdb_client/__init__.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The asynchronous batching example suppresses import failures, allowing unsuccessful writes to appear successful to callers and CI.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread examples/asynchronous_batching.py
@karel-rehor
karel-rehor requested a review from bednar October 22, 2026 15:34
@karel-rehor
karel-rehor marked this pull request as ready for review October 22, 2026 15:35
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.

Public symbols not properly exported with py.typed present — triggers Pylance/Pyright errors

3 participants