psycopg2 2.9.8 not working with Python 3.12.0
Bug report
A clear and concise description of what the bug is.
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
I tried Python 3.12.0b1 (beta) and I ran tests of Speedy Net but it didn't work. I got this exception:
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module
My pip freeze --all:
asgiref==3.6.0
boto3==1.26.138
botocore==1.29.138
crispy-bootstrap4==2022.1
Django==4.2.1
django-admin-inline-paginator==0.3.0
django-crispy-forms==2.0
django-debug-toolbar==4.1.0
django-environ==0.10.0
django-friendship==1.9.6
django-translated-fields==0.12.0
factory-boy==3.2.1
Faker==18.9.0
haversine==2.8.0
jmespath==1.0.1
Pillow==9.5.0
pip==23.1.2
psycopg2==2.9.6
pymemcache==4.0.0
python-dateutil==2.8.2
pytz==2023.3
rules==3.3
s3transfer==0.6.1
setuptools==67.4.0
six==1.16.0
sorl-thumbnail==12.9.0
sqlparse==0.4.4
typing_extensions==4.5.0
tzdata==2023.3
urllib3==1.26.15
wheel==0.40.0
The above tests work with Python 3.10.11 and Python 3.11.3.
Your environment
- CPython versions tested on:
- Operating system and architecture:
Please complete the following information:
OS: Windows
Psycopg version: 2.9.6
Python version: Python 3.12.0b1 (beta)
PostgreSQL version: 13
pip version: 23.1.2
Repository - https://github.com/speedy-net/speedy-net
pip install the requirements and run tests with ./run_all_tests.sh.
I also filed an issue with psycopg/psycopg2#1578 which was closed.