fix: add async audience aliases#230
Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 5/5
tests/audiences_async_test.pyaddstest_should_*method names that conflict with the repo’s test-naming convention; merging as-is mainly risks style inconsistency and a small hit to test-suite readability/maintainability rather than runtime behavior. This PR is safe to merge, but renaming the new tests to the project’s declarative/action-oriented pattern would fully align it before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
87f65ed to
717886e
Compare
|
@cubic-dev-ai review this PR |
@mayankbohradev I have started the AI code review. It will take a few minutes to complete. |
Codecov ReportCaution This repository is currently using the Sentry GitHub App to receive Codecov PR comments. This integration will be deprecated on July 8, 2026. Please install the Codecov GitHub App to continue receiving coverage reports on your pull requests. Additional details and impacted files@@ Coverage Diff @@
## main #230 +/- ##
===========================================
+ Coverage 82.66% 95.65% +12.99%
===========================================
Files 4 58 +54
Lines 75 3109 +3034
===========================================
+ Hits 62 2974 +2912
- Misses 13 135 +122 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
Audiencesalias so it mirrorsSegmentsasync support.Why
Audiencesdelegates sync calls toSegments, but the async alias methods were missing. Users on the deprecated alias could not use the async SDK surface consistently.Testing
tox -e py -- tests/audiences_async_test.pytox -e pytox -e mypyblack --check resend/audiences/_audiences.py tests/audiences_async_test.pyisort --check-only resend/audiences/_audiences.py tests/audiences_async_test.pyNote
tox -e lintis blocked on this machine becauseflake8<5is incompatible with the available Python 3.12/3.14 entry-point API. CI runs lint on Python 3.8-3.11 per.github/workflows/ci.yaml.Summary by cubic
Adds async support to the deprecated
Audiencesalias to matchSegments. Users can now call create/get/list/remove asynchronously with deprecation warnings.create_async,get_async,list_async, andremove_asynconresend.Audiences, delegating toSegmentsasync methods.DeprecationWarningto guide migration toSegments.NoContentErrorpaths.Written for commit 717886e. Summary will update on new commits.