fgmacedo / python-statemachine

Python Finite State Machines made easy.
MIT License
854 stars 84 forks source link

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

Closed fgmacedo closed 2 months ago

fgmacedo commented 2 months ago

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[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (2669b92) to head (c87e6b9).

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/fgmacedo/python-statemachine/pull/452/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/fgmacedo/python-statemachine/pull/452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud