HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/django/utils/__pycache__/asyncio.cpython-310.pyc
o

3�a$�@sNddlZddlZddlZddlmZddlmZerejZnejZdd�Z	dS)�N)�SynchronousOnlyOperation)�PY37cs(�fdd�}t��r�}d�||�S|S)z�
    Decorator to mark functions as async-unsafe. Someone trying to access
    the function while in an async context will get an error message.
    cst�����fdd��}|S)NcsLtj�d�szt�}Wn	tyYnwts|��rt����|i|��S)N�DJANGO_ALLOW_ASYNC_UNSAFE)�os�environ�get�get_running_loop�RuntimeErrorr�
is_runningr)�args�kwargs�
event_loop)�func�message��6/usr/lib/python3/dist-packages/django/utils/asyncio.py�inners
�z.async_unsafe.<locals>.decorator.<locals>.inner)�	functools�wraps)rr�r)rr�	decoratorszasync_unsafe.<locals>.decoratorzKYou cannot call this from an async context - use a thread or sync_to_async.)�callable)rrrrrr�async_unsafesr)
�asynciorr�django.core.exceptionsr�django.utils.versionrr�get_event_looprrrrr�<module>s