Replies: 1 comment 1 reply
-
psycopg2-binary is just a precompiled version of psycopg. Everything else
you mention are Django features: you should contact th for your enquiry.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is not a question, this is not a bug report. I'm not sure what is this. It is for history and maybe it will be helpful for someone else.
It is known and recommended to use:
But in case when we use psycopg2 on production we often get following error:
You cannot call this from an async context - use a thread or sync_to_async.
Which is caused by the
async_unsafe
attribute andSynchronousOnlyOperation
error.As a workaround we can use next env var
DJANGO_ALLOW_ASYNC_UNSAFE=1
There is no trouble just using
psycopg2-binary
package.Versions:
P.S.: we do not use explicitly
async
code in a project.Beta Was this translation helpful? Give feedback.
All reactions