fix: remove stale influxdb_client references from v3 docs - #243
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 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...toinfluxdb_client_3.... - Update docstrings/embedded examples to import from
influxdb_client_3module 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
MultiprocessingWriterreads the server address from thehostkwarg (and the default bucket fromdatabase), but the docstring example usesurl=and omitsdatabase=, 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 omitsdatabase=, butMultiprocessingWriterexpectshost/databasekwargs when constructing the internalRestClient/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 omitsdatabase=, butMultiprocessingWriterexpectshost/databasekwargs when constructing the internalRestClient/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.
There was a problem hiding this comment.
🟡 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 passingbucket="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 tobucket="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
|
Addressed the remaining Copilot feedback:
The earlier |
There was a problem hiding this comment.
🟡 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
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 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
Closes #242
Proposed Changes
Update v3-specific docstrings, embedded examples, comments, and logger names to use canonical
influxdb_client_3paths. No public API or runtime behavior changes.Checklist