influxdb-client-python icon indicating copy to clipboard operation
influxdb-client-python copied to clipboard

fix: return `str` instead of `urllib3.HTTPResponse` for `InfluxDBClie…

Open jules-ch opened this issue 2 years ago • 5 comments

Closes #569

Proposed Changes

As it is done in the Async version of the client, return str response data as per the documentation.

Checklist

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

jules-ch avatar Aug 22 '23 18:08 jules-ch

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2f9e5ed) 90.30% compared to head (0a4ae41) 90.31%. Report is 8 commits behind head on master.

:exclamation: Current head 0a4ae41 differs from pull request most recent head a05c5b0. Consider uploading reports for the commit a05c5b0 to get more accurate results

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #606   +/-   ##
=======================================
  Coverage   90.30%   90.31%           
=======================================
  Files          39       39           
  Lines        3456     3458    +2     
=======================================
+ Hits         3121     3123    +2     
  Misses        335      335           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 22 '23 19:08 codecov-commenter

I had to use .data, using .read function with debug resulted with a bug when the response already read by the debugger it returned an empty string. I'd have to check it is not the case with the async function.

jules-ch avatar Aug 22 '23 19:08 jules-ch

Ready for review

jules-ch avatar Aug 22 '23 19:08 jules-ch

Do you need me to introduce this as a BREAKING CHANGE. Just want to wonfirm this, since the function was not returning the documented type in the first place.

I'll document it as a Breaking change for now

jules-ch avatar Nov 10 '23 14:11 jules-ch

CI is failing because of a problem on CircleCI I think. Pipeline needs to be triggered again.

jules-ch avatar Nov 15 '23 09:11 jules-ch