Skip to content

add support async postgres driver #320

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

Closed
wants to merge 6 commits into from

Conversation

fourteekey
Copy link

No description provided.

@fourteekey fourteekey requested a review from pffijt March 16, 2023 11:20
@fourteekey
Copy link
Author

@pffijt
Do you have any questions or comments about commits?

Copy link
Contributor

@tillahoffmann tillahoffmann left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Added a few inline questions.

@wait_container_is_ready(*ADDITIONAL_TRANSIENT_ERRORS)
def _connect(self) -> None:
import sqlalchemy
engine = sqlalchemy.create_engine(self.get_connection_url(driver=self.DEFAULT_DRIVER))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use the super call here? It looks like the method body is the same as in the parent class (except for the driver argument which is already handled in the updated get_connection_url).

Copy link
Contributor

Choose a reason for hiding this comment

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

@fourteekey, could you please address this question?

@tillahoffmann
Copy link
Contributor

Unresolved some of the outstanding questions, @fourteekey. We'll also have to regenerate the lock files in requirements.txt. See step three of https://github.com/testcontainers/testcontainers-python#contributing-a-new-feature for details.

@fourteekey
Copy link
Author

@tillahoffmann

All questions have been resolved.
I can't regenerate the lock files without approve, I got error: RuntimeError: Could not find a workflow. Has the GitHub Action run completed? If youare a first-time contributor, a contributor has to approve your changesbefore Actions can run.

@alexanderankin
Copy link
Member

closing in favor of #445 because i believe it will handle this use case, let me know if this is not the case

alexanderankin pushed a commit that referenced this pull request Mar 10, 2024
…445)

Updates the pg testcontainer implementation to not use (and not install)
SQLAlchemy nor psycopg2.

Closes: #340
Closes: #336
Closes: #320

---------

Co-authored-by: Jason Turim <[email protected]>
alexanderankin pushed a commit that referenced this pull request Mar 11, 2024
…445)

Updates the pg testcontainer implementation to not use (and not install)
SQLAlchemy nor psycopg2.

Closes: #340
Closes: #336
Closes: #320

---------

Co-authored-by: Jason Turim <[email protected]>
bearrito pushed a commit to bearrito/testcontainers-python that referenced this pull request Mar 30, 2024
…estcontainers#445)

Updates the pg testcontainer implementation to not use (and not install)
SQLAlchemy nor psycopg2.

Closes: testcontainers#340
Closes: testcontainers#336
Closes: testcontainers#320

---------

Co-authored-by: Jason Turim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating a Postgres contrainer with an async driver fails
4 participants