Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hard dependency on psycopg2 #2126

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

bemoody
Copy link
Collaborator

@bemoody bemoody commented Nov 6, 2023

Importing the django.contrib.postgres.search module requires importing psycopg2. Installing psycopg2 can be a minor nuisance and is otherwise unnecessary if you're not using the postgres backend.

Importing django.contrib.postgres.search requires having psycopg2
installed, which often requires compiling psycopg2 from source, which
can be a nuisance.

Remove this hard dependency (only import the module if the relevant
backend is being used) so that it's possible to run a demo server
using sqlite without having psycopg2 installed.
@tompollard
Copy link
Member

Feels odd to do this but...okay! Don't see any strong reason why not.

@tompollard tompollard merged commit ca267f2 into dev Nov 7, 2023
11 checks passed
@tompollard tompollard deleted the search-psycopg2-optional branch November 7, 2023 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants