Skip to content

Commit 01336b5

Browse files
committed
Clone psycopg2 patch to psycopg2-binary
1 parent 695a13b commit 01336b5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[rules]]
2+
patch = "psycopg2-binary.patch"
3+
license = "LGPL-3.0-or-later WITH openssl-exception"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/psycopg/utils.c b/psycopg/utils.c
2+
index 16be906..c78a24b 100644
3+
--- a/psycopg/utils.c
4+
+++ b/psycopg/utils.c
5+
@@ -392,7 +392,9 @@ psyco_set_error(PyObject *exc, cursorObject *curs, const char *msg)
6+
static int
7+
psyco_is_main_interp(void)
8+
{
9+
-#if PY_VERSION_HEX >= 0x03080000
10+
+#if GRAALVM_PYTHON
11+
+ return 1;
12+
+#elif PY_VERSION_HEX >= 0x03080000
13+
/* tested with Python 3.8.0a2 */
14+
return _PyInterpreterState_Get() == PyInterpreterState_Main();
15+
#else

0 commit comments

Comments
 (0)