Skip to content

Commit 57ce093

Browse files
authored
Merge pull request #23 from Archmonger/database-sync-to-async
Use `database_sync_to_async`
2 parents f58ba83 + 67e6f79 commit 57ce093

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

django_async_orm/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import concurrent
22

3-
from asgiref.sync import sync_to_async
3+
from channels.db import database_sync_to_async as sync_to_async
44
from django.db.models import QuerySet
55

66
from django_async_orm.iter import AsyncIter

django_async_orm/wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from asgiref.sync import sync_to_async
1+
from channels.db import database_sync_to_async as sync_to_async
22
from django.contrib.auth import login, logout
33

44

tests/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ black==22.12.0; python_version >= "3.7"
55
certifi==2022.12.7; python_version >= "3.7" and python_version < "4" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0")
66
charset-normalizer==3.0.1; python_version >= "3.7" and python_version < "4" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0")
77
click==8.1.3; python_version >= "3.7"
8-
codecov==2.1.12; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
8+
codecov==2.1.13; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
99
colorama==0.4.6; python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" and platform_system == "Windows" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.7.0" and platform_system == "Windows"
1010
coverage==7.1.0; python_version >= "3.7"
1111
distlib==0.3.6; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
@@ -39,3 +39,4 @@ urllib3==1.26.14; python_version >= "3.7" and python_full_version < "3.0.0" and
3939
virtualenv==20.16.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
4040
wcwidth==0.2.6; python_version >= "3.5"
4141
zipp==3.11.0; python_version < "3.8" and python_version >= "3.7" and python_full_version >= "3.6.1" and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.5.0" and python_version < "3.8" and python_version >= "3.6")
42+
channels

0 commit comments

Comments
 (0)