#35734: Tests fail with Postgres 16 and server side bindings
-------------------------------------+-------------------------------------
Reporter: john-parton | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Tests fail with Postgres 16 and server side bindings
Steps to replicate
1. Pull down main
2. Up a postgres 16 database (supplied docker-compose.yml)
3. Use supplied settings file
4. Install requirements
5. Run `./runtests.py --settings test_postgres db_functions.comparison`
docker-compose.yml
{{{
services:
postgres:
image: postgres:16.3
shm_size: 1g
ports:
- "5436:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: postgres
POSTGRES_DB: django
}}}
test_postgres.py
{{{
from test_sqlite import * # NOQA
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"USER": "user",
"NAME": "django",
"PASSWORD": "postgres",
"HOST": "localhost",
"PORT": 5436,
"OPTIONS": {
"server_side_binding": True,
},
},
}
}}}
Here's the output of my pip freeze for reference
{{{
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
aiosmtpd==1.4.6
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
asgiref==3.8.1
atpublic==5.0
attrs==24.2.0
bcrypt==4.2.0
black==24.8.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.3.2
click==8.1.7
-e
git+ssh://
g...@github.com/django/django.git@aa5293068782dfa2d2173c75c8477f58a9989942#egg=Django
docutils==0.21.2
frozenlist==1.4.1
geoip2==4.8.0
h11==0.14.0
idna==3.8
Jinja2==3.1.4
MarkupSafe==2.1.5
maxminddb==2.6.2
multidict==6.0.5
mypy-extensions==1.0.0
numpy==2.1.1
outcome==1.3.0.post0
packaging==24.1
pathspec==0.12.1
pillow==10.4.0
platformdirs==4.2.2
psycopg==3.2.1
psycopg-binary==3.2.1
psycopg-pool==3.2.2
pycparser==2.22
pylibmc==1.6.3
pymemcache==4.0.0
PySocks==1.7.1
pywatchman==2.0.0
PyYAML==6.0.2
redis==5.0.8
requests==2.32.3
selenium==4.24.0
setuptools==74.1.2
sniffio==1.3.1
sortedcontainers==2.4.0
sqlparse==0.5.1
tblib==3.0.0
trio==0.26.2
trio-websocket==0.11.1
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
websocket-client==1.8.0
wsproto==1.2.0
yarl==1.9.11
}}}
Python 3.12.3
Made this discovery while trying to finish a JSON feature, comment here:
https://github.com/django/django/pull/18541#issuecomment-2331630403
--
Ticket URL: <
https://code.djangoproject.com/ticket/35734>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.