Skip to content

fix: Regression that broke sync callbacks interacting with Django ORM. Closes #446#452

Merged
fgmacedo merged 1 commit intodevelopfrom
macedo/compat-django-async-guards
Jun 26, 2024
Merged

fix: Regression that broke sync callbacks interacting with Django ORM. Closes #446#452
fgmacedo merged 1 commit intodevelopfrom
macedo/compat-django-async-guards

Conversation

@fgmacedo
Copy link
Copy Markdown
Owner

@fgmacedo fgmacedo commented Jun 26, 2024

CLoses #446 .

I've added a sync_to_async wrap around sync callbacks if asgiref is available, as pointed out in Django's async safety docs.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2669b92) to head (c87e6b9).
Report is 30 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #452   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         1276      1282    +6     
  Branches       191       192    +1     
=========================================
+ Hits          1276      1282    +6     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fgmacedo fgmacedo force-pushed the macedo/compat-django-async-guards branch from 146e0c6 to c87e6b9 Compare June 26, 2024 03:07
@sonarqubecloud
Copy link
Copy Markdown

@fgmacedo fgmacedo self-assigned this Jun 26, 2024
@fgmacedo fgmacedo added the bug label Jun 26, 2024
@fgmacedo fgmacedo merged commit d446d99 into develop Jun 26, 2024
@fgmacedo fgmacedo deleted the macedo/compat-django-async-guards branch June 26, 2024 19:26
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.

Using async wrappers on callbacks causes errors with sync-only callbacks

1 participant