Skip to content

Commit 09433ef

Browse files
committed
Add patch for psycopg2-2.9.10
1 parent 1c379ae commit 09433ef

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,23 @@ patch = 'protobuf-3.21.9.patch'
394394
license = 'BSD-3-Clause'
395395

396396
[[psycopg2.rules]]
397-
patch = "psycopg2.patch"
397+
version = '<= 2.9.9'
398+
patch = "psycopg2-2.9.9.patch"
399+
license = "LGPL-3.0-or-later WITH openssl-exception"
400+
401+
[[psycopg2.rules]]
402+
version = '>= 2.9.10'
403+
patch = "psycopg2-2.9.10.patch"
404+
license = "LGPL-3.0-or-later WITH openssl-exception"
405+
406+
[[psycopg2-binary.rules]]
407+
version = '<= 2.9.9'
408+
patch = "psycopg2-2.9.9.patch"
398409
license = "LGPL-3.0-or-later WITH openssl-exception"
399410

400411
[[psycopg2-binary.rules]]
401-
patch = "psycopg2-binary.patch"
412+
version = '>= 2.9.10'
413+
patch = "psycopg2-2.9.10.patch"
402414
license = "LGPL-3.0-or-later WITH openssl-exception"
403415

404416
[[py4j.rules]]
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
diff --git a/psycopg/utils.c b/psycopg/utils.c
2-
index 16be906..c78a24b 100644
2+
index 1dfb87d..28cc6c1 100644
33
--- a/psycopg/utils.c
44
+++ b/psycopg/utils.c
55
@@ -392,7 +392,9 @@ psyco_set_error(PyObject *exc, cursorObject *curs, const char *msg)
66
static int
77
psyco_is_main_interp(void)
88
{
9-
-#if PY_VERSION_HEX >= 0x03080000
9+
-#if PY_VERSION_HEX >= 0x030d0000
1010
+#if GRAALVM_PYTHON
1111
+ return 1;
12-
+#elif PY_VERSION_HEX >= 0x03080000
13-
/* tested with Python 3.8.0a2 */
14-
return _PyInterpreterState_Get() == PyInterpreterState_Main();
15-
#else
12+
+#elif PY_VERSION_HEX >= 0x030d0000
13+
/* tested with Python 3.13.0a6 */
14+
return PyInterpreterState_Get() == PyInterpreterState_Main();
15+
#elif PY_VERSION_HEX >= 0x03080000

0 commit comments

Comments
 (0)