-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix AsyncResult.forget() with couchdb backend method raises TypeError: a bytes-like object is required, not 'str'
#9865
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9865 +/- ##
==========================================
- Coverage 78.63% 78.62% -0.01%
==========================================
Files 153 153
Lines 19198 19199 +1
Branches 2546 2546
==========================================
Hits 15096 15096
Misses 3807 3807
- Partials 295 296 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
auvipy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add some unit test for it?
for more information, see https://pre-commit.ci
Added a few tests to ensure that To verify that celery actually works with the Please review carefully. |
|
thanks |
There was a problem hiding this 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 a TypeError in the CouchDB backend's delete() method where a bytes-like object was expected but a string was provided. The fix ensures proper type conversion before calling the underlying CouchDB delete operation.
- Adds
bytes_to_strconversion to thedelete()method for consistency with other methods - Introduces comprehensive test coverage for CouchDB backend operations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| celery/backends/couchdb.py | Fixes the delete method by adding bytes_to_str conversion |
| t/unit/backends/test_couchdb.py | Adds comprehensive test suite with mock CouchDB session and full backend operation tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
TypeError: a bytes-like object is required, not 'str'AsyncResult.forget() with couchdb backend method raises TypeError: a bytes-like object is required, not 'str'
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
Fix for #9864