]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Don't return None as text in Python 9.6
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 13 Jan 2021 00:02:13 +0000 (01:02 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 13 Jan 2021 00:02:13 +0000 (01:02 +0100)
commit91544696d24c6ee75376dd572257be9dc9ce7c0f
tree4d9fb89dcc3dd6015c5b99e4291b784e4fe505d7
parent639644074ae02ed6764b42a3a6785369a87cce00
Don't return None as text in Python 9.6

This makes to require a cast on pretty much any placeholder that might
receive a None, which is really asking too much.

Exploratory commit to test what can be done with PG 9.6. The result
shows that in PG 9.6 it's pretty much impossible to use prepared
statements: neither for executemany nor for preparation. Tests failing:

- tests/test_cursor.py::test_executemany_null_first
- tests/test_cursor_async.py::test_executemany_null_first
- tests/test_prepared.py::test_different_types
- tests/test_prepared_async.py::test_different_types

all with: psycopg3.errors.IndeterminateDatatype: could not determine
data type of parameter $x
psycopg3/psycopg3/_transform.py
psycopg3_c/psycopg3_c/_psycopg3/transform.pyx
tests/test_adapt.py