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

Replace httpx.post data kwarg with content #425

Merged

Conversation

ayharano
Copy link
Contributor

@ayharano ayharano commented Apr 6, 2023

Description of the change

As described in https://github.com/encode/httpx/blame/08a557e3e2b9220b90ee21238e316206ffa65d36/docs/compatibility.md?plain=1#L70-L90 the data parameter in httpx.post was intended to provide compatibility from requests, but as it does not provide anymore for this end, it issues a warning

DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.

when using pyrollbar is used with asyncio

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

As described in https://github.com/encode/httpx/blame/08a557e3e2b9220b90ee21238e316206ffa65d36/docs/compatibility.md?plain=1#L70-L90 the `data` parameter in `httpx.post` was intended to provide compatibility from `requests`, but as it does not provide anymore for this end, it issues a warning

`DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.`

when using `pyrollbar` is used with `asyncio`
@danielmorell danielmorell self-requested a review April 28, 2023 19:14
@danielmorell danielmorell self-assigned this Apr 28, 2023
Copy link
Collaborator

@danielmorell danielmorell left a comment

Choose a reason for hiding this comment

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

Thank you @ayharano for submitting this! This is a helpful fix indeed!

@danielmorell danielmorell merged commit 9fe5f8e into rollbar:master Sep 1, 2023
0 of 105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants