Skip to content

Conversation

auvipy
Copy link
Member

@auvipy auvipy commented Jun 21, 2025

No description provided.

@auvipy auvipy mentioned this pull request Jun 21, 2025
Copy link

codecov bot commented Jun 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 81.10%. Comparing base (8723026) to head (ba21f8b).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
kombu/asynchronous/http/curl.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2322      +/-   ##
==========================================
- Coverage   81.11%   81.10%   -0.02%     
==========================================
  Files          77       77              
  Lines        9687     9689       +2     
  Branches     1191     1192       +1     
==========================================
  Hits         7858     7858              
- Misses       1624     1626       +2     
  Partials      205      205              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@auvipy auvipy added this to the 5.6.0 milestone Jun 21, 2025
@auvipy auvipy requested a review from Copilot June 21, 2025 06:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the body bytes encoding issue in curl.py during HTTP POST and PUT requests to ensure that request bodies are handled correctly based on their type.

  • Updated request body encoding logic for bytes and non-bytes types
  • Improved readability and robustness in the conditional encoding of request.body
Comments suppressed due to low confidence (1)

kombu/asynchronous/http/curl.py:258

  • [nitpick] Consider adding an inline comment explaining that the code conditionally encodes request.body only if it is not already in bytes. This can help improve clarity for future maintainers.
                body = request.body if isinstance(request.body, bytes) else request.body.encode('utf-8')

@auvipy auvipy marked this pull request as ready for review June 21, 2025 07:23
@auvipy
Copy link
Member Author

auvipy commented Jun 21, 2025

@spawn-guy for your review.

@spawn-guy
Copy link
Contributor

@auvipy looks the same as in my fix

@auvipy auvipy merged commit 46d4585 into main Jun 23, 2025
37 of 42 checks passed
@auvipy auvipy deleted the curl branch June 23, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants