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: fix DeprecationWarning in write API #419

Merged
merged 2 commits into from
Mar 16, 2022
Merged

Conversation

mmatl
Copy link
Contributor

@mmatl mmatl commented Mar 15, 2022

Proposed Changes

Was getting this warning using the client with Python 3.9:

/lib/python3.9/site-packages/influxdb_client/client/write/retry.py:47: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead
    super().__init__(**kw)

This commit should fix things by moving to the new parameter name for urllib3.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • pytest tests completes successfully
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2022

Codecov Report

Merging #419 (7461297) into master (4fc41d2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #419   +/-   ##
=======================================
  Coverage   92.74%   92.74%           
=======================================
  Files          31       31           
  Lines        2604     2604           
=======================================
  Hits         2415     2415           
  Misses        189      189           
Impacted Files Coverage Δ
influxdb_client/client/write_api.py 99.17% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fc41d2...7461297. Read the comment docs.

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thanks for your PR 👍. There are a few requirements that must be be satisfy before we accept the PR:

  1. Please satisfy our Checklist:
    image
  2. Change method_whitelist to allowed_methods also in:
    • tests/test_WriteOptions.py
    • tests/test_WritesRetry.py
  3. Change minimal version of urllib3 in setup.py to 1.26.0 (add a note about this change into CHANGELOG.md)

Regards

Was getting this warning using the client with Python 3.9:
```
/lib/python3.9/site-packages/influxdb_client/client/write/retry.py:47: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead
    super().__init__(**kw)
```
This commit should fix things.
@mmatl
Copy link
Contributor Author

mmatl commented Mar 15, 2022

@bednar Should be good to go. Update the changelog, ran tests, and changed the tests, plus an updated setup.py. Let me know if you need anything else.

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thanks again for your PR 👍

LGTM 🚀

@bednar bednar merged commit 47eec5d into influxdata:master Mar 16, 2022
@bednar bednar added this to the 1.27.0 milestone Mar 16, 2022
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.

3 participants