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

Add psycopg2-binary as dev dependency. #5846

Merged
merged 1 commit into from
May 31, 2023

Conversation

Aadesh-Baral
Copy link
Contributor

@Aadesh-Baral Aadesh-Baral commented May 30, 2023

Fixes #5785

Because of its numerous system dependencies, installing psycopg2 on some systems can occasionally be very challenging. This problem can be fixed by adding psycopg2-binary as a dev dependency as mentioned by @spwoodcock on #5785 (comment)

Dev dependencies can be installed with command pdm install --dev

PS: Using psycopg2-binary in production is not advised.

@Aadesh-Baral Aadesh-Baral self-assigned this May 30, 2023
@Aadesh-Baral Aadesh-Baral added scope: backend dependencies Pull requests that update a dependency file labels May 30, 2023
@spwoodcock
Copy link
Member

Good stuff 👍

Note that installing with pdm install --dev will also install production dependencies (which we want), including psycopg.

So on a system that does not have the dependencies installed for psycopg, it may be worth testing if pdm install --dev fails when attempting to install both packages together.

@Aadesh-Baral
Copy link
Contributor Author

@spwoodcock pdm install --dev will successfully install all other requirements, including psycopg2-binary, on a system without the psycopg2 dependencies installed. However, psycopg2 will not be installed. Despite the issue, the app will function as intended.

@eternaltyro
Copy link
Contributor

@Aadesh-Baral please add the new pdm.lock file.

Copy link
Contributor

@eternaltyro eternaltyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

-------------------------------------------
Because of its numerous system dependencies, installing psycopg2 on some systems can occasionally be very challenging.
This problem can be fixed by adding psycopg2-binary as a dev dependency.
@Aadesh-Baral Aadesh-Baral force-pushed the dependencies/add-psycopg2-binary branch from ce069a3 to f042881 Compare May 31, 2023 04:17
@github-actions github-actions bot removed scope: backend dependencies Pull requests that update a dependency file labels May 31, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Aadesh-Baral Aadesh-Baral merged commit 41152a6 into develop May 31, 2023
7 of 8 checks passed
@Aadesh-Baral Aadesh-Baral deleted the dependencies/add-psycopg2-binary branch May 31, 2023 04:21
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.

[BUG] Error while installing psycopg2
3 participants