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

adding psycog binary/pool; fixing PostgresContainer field names #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgeisel
Copy link

@cgeisel cgeisel commented Jul 5, 2024

Hi folks,

I couldn't find any contributor guidelines, so let me know if this doesn't conform to style or if PRs aren't accepted.

I was recently following this guide: https://testcontainers.com/guides/getting-started-with-testcontainers-for-python/ and ran into two issues.

  1. ImportError: no pq wrapper available
  2. testcontainers AttributeError: 'Postgres Container' object has no attribute 'POSTGRES_USER'

For #1, it seems that on a M2 mac you need to explicitly install the binary and pool components of psycog. I'm not sure if this is something specific to M2 macs, but thought it might be helpful to update the requirements.txt file.

For #2, the field names for the PostgresContainer seem to have been renamed. I'm not sure if this is specific to the version of TestContainers that's installed or something else.

This PR also adds an entry in .gitignore for pycache/ which I thought would be generally useful.

Thanks for reviewing my PR. Let me know how I can improve it and I'll be happy to do so.

@cgeisel
Copy link
Author

cgeisel commented Jul 5, 2024

Something I forgot to mention, I'm using TestContainers Desktop Embedded Runtime, not a local docker service. In case that changes/causes the issues I saw above.

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.

1 participant