Skip to content

fix: remove stale influxdb_client references from v3 docs - #243

Open
bednar wants to merge 4 commits into
mainfrom
issue-242-stale-influxdb-references
Open

fix: remove stale influxdb_client references from v3 docs#243
bednar wants to merge 4 commits into
mainfrom
issue-242-stale-influxdb-references

Conversation

@bednar

@bednar bednar commented Sep 9, 2026

Copy link
Copy Markdown
Member

Closes #242

Proposed Changes

Update v3-specific docstrings, embedded examples, comments, and logger names to use canonical influxdb_client_3 paths. No public API or runtime behavior changes.

Checklist

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

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.21%. Comparing base (d2fc4da) to head (05325fa).

❗ There is a different number of reports uploaded between BASE (d2fc4da) and HEAD (05325fa). Click for more details.

HEAD has 58 uploads less than BASE
Flag BASE (d2fc4da) HEAD (05325fa)
62 4
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
- Coverage   87.43%   82.21%   -5.23%     
==========================================
  Files          28       28              
  Lines        2030     2030              
==========================================
- Hits         1775     1669     -106     
- Misses        255      361     +106     

☔ 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

Several updated docstring examples are still incorrect for the v3 client (e.g., MultiprocessingWriter examples use url=/omit database=, and QueryApi shows a Flux-style query), which undermines the PR’s documentation-focused goal.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates v3-facing documentation strings and logger namespaces to consistently use the canonical influxdb_client_3 package path, removing misleading v2-era influxdb_client references.

Changes:

  • Rename several internal logger namespaces from influxdb_client... to influxdb_client_3....
  • Update docstrings/embedded examples to import from influxdb_client_3 module paths.
  • Add a CHANGELOG entry documenting the cleanup.
File summaries
File Description
influxdb_client_3/write_client/client/write/retry.py Updates logger namespace to influxdb_client_3....
influxdb_client_3/write_client/client/write/polars_dataframe_serializer.py Updates logger namespace to influxdb_client_3....
influxdb_client_3/write_client/client/write/dataframe_serializer.py Updates logger namespace to influxdb_client_3....
influxdb_client_3/write_client/client/warnings.py Updates warning-message example imports to influxdb_client_3....
influxdb_client_3/write_client/client/util/multiprocessing_helper.py Updates logger namespace and docstring example imports to influxdb_client_3....
influxdb_client_3/write_client/client/util/date_utils.py Updates docstring example imports to influxdb_client_3....
influxdb_client_3/write_client/_sync/rest_client.py Updates logger namespace and related comments to influxdb_client_3....
influxdb_client_3/query/query_api.py Updates docstring example to reference InfluxDBClient3.
CHANGELOG.md Adds an entry for removing stale influxdb_client references.
Review details

Suppressed comments (3)

influxdb_client_3/write_client/client/util/multiprocessing_helper.py:52

  • MultiprocessingWriter reads the server address from the host kwarg (and the default bucket from database), but the docstring example uses url= and omits database=, which would result in a misconfigured client (base_url=None / bucket=None).

This issue also appears in the following locations of the same file:

  • line 69
  • line 87
            from influxdb_client_3.write_client.client.util.multiprocessing_helper import MultiprocessingWriter


            def main():
                writer = MultiprocessingWriter(url="http://localhost:8086", token="my-token", org="my-org",

influxdb_client_3/write_client/client/util/multiprocessing_helper.py:89

  • The batch-events example also uses url= and omits database=, but MultiprocessingWriter expects host/database kwargs when constructing the internal RestClient/WriteApi.
            from influxdb_client_3 import WriteOptions
            from influxdb_client_3.exceptions import InfluxDBError
            from influxdb_client_3.write_client.client.util.multiprocessing_helper import MultiprocessingWriter

influxdb_client_3/write_client/client/util/multiprocessing_helper.py:75

  • Same as above: the context manager example uses url= and omits database=, but MultiprocessingWriter expects host/database kwargs when constructing the internal RestClient/WriteApi.
            from influxdb_client_3 import WriteOptions
            from influxdb_client_3.write_client.client.util.multiprocessing_helper import MultiprocessingWriter


            def main():
                with MultiprocessingWriter(url="http://localhost:8086", token="my-token", org="my-org",
                                           write_options=WriteOptions(batch_size=100)) as writer:
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread influxdb_client_3/query/query_api.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

A few updated docstring examples/comments are now misleading or inconsistent (especially around v3 “database” vs “bucket” naming and a stale “QueryApi” comment), and should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (4)

Previously missed (1) — in code that hasn't changed since the last review.

influxdb_client_3/write_client/_sync/rest_client.py:216

  • This comment is now self-referential/unclear after renaming the logger ("instead of this" no longer refers to anything). Reword it to state directly which logger is used for HTTP debugging.

This issue also appears on line 222 of the same file.

influxdb_client_3/write_client/client/util/multiprocessing_helper.py:77

  • This context-manager example mixes v3 terminology by using database="my-bucket" while still passing bucket="my-bucket" to write. Use a consistent sample name (e.g., my-database) to avoid confusion for v3 users.
                with MultiprocessingWriter(host="http://localhost:8086", token="my-token", org="my-org",
                                           database="my-bucket",
                                           write_options=WriteOptions(batch_size=100)) as writer:

influxdb_client_3/write_client/client/util/multiprocessing_helper.py:112

  • This batch-callback example uses database="my-bucket" and then writes to bucket="my-bucket". Since this is v3 documentation, use a consistent sample name (e.g., my-database) to avoid mixing v2/v3 terminology.
                with MultiprocessingWriter(host="http://localhost:8086", token="my-token", org="my-org",
                                           database="my-bucket",
                                           success_callback=callback.success,
                                           error_callback=callback.error,
                                           retry_callback=callback.retry) as writer:

influxdb_client_3/write_client/_sync/rest_client.py:222

  • Same as above: after renaming the logger, this comment is unclear ("instead of this"). Reword it to state directly which logger is used for HTTP debugging.
            # we use 'influxdb_client_3.write_client._sync.rest_client' logger instead of this
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread influxdb_client_3/query/query_api.py Outdated
@bednar

bednar commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Addressed the remaining Copilot feedback:

  • Updated all multiprocessing examples to use host, database="my-database", and matching bucket="my-database" values.
  • Updated the query example comment to match the InfluxDBClient3.query() usage.
  • Reworded the REST debug logging comments to describe the logger directly.

The earlier url/missing database issues in the multiprocessing examples were fixed in f4e24ca; the remaining terminology and comment fixes are in bcdbe38.

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 CHANGELOG entry references the issue URL while being labeled like a PR entry, which is inconsistent with the changelog’s established linking pattern and creates ambiguity.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread CHANGELOG.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

The updated examples and logger names match the current influxdb_client_3 API surface, and repository search confirms no remaining stale influxdb_client references in v3-specific code/docs.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@bednar
bednar requested a review from karel-rehor September 9, 2026 12:21
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.

Remove stale influxdb_client references from docstrings and loggers

2 participants