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

Changed asyncpg to psycopg3 #94

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Changed asyncpg to psycopg3 #94

merged 1 commit into from
Nov 22, 2023

Conversation

carlosvdr
Copy link
Collaborator

No description provided.

tests/test_logs_db.py Fixed Show fixed Hide fixed
@carlosvdr carlosvdr linked an issue Nov 15, 2023 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Nov 15, 2023

Pull Request Test Coverage Report for Build 6962888761

  • 22 of 22 (100.0%) changed or added relevant lines in 5 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.4%) to 84.738%

Files with Coverage Reduction New Missed Lines %
autoagora/price_multiplier.py 2 96.77%
autoagora/model_builder.py 4 79.55%
Totals Coverage Status
Change from base Build 5958133257: -0.4%
Covered Lines: 372
Relevant Lines: 439

💛 - Coveralls

@carlosvdr
Copy link
Collaborator Author

carlosvdr commented Nov 15, 2023

If the pool is initialized like this:

pgpool = psycopg_pool.AsyncConnectionPool(
            conn_string,
            min_size=1,
            max_size=args.postgres_max_connections
        )

This way is going to be deprecated according to this warning:

DeprecationWarning: opening the async pool AsyncConnectionPool in the constructor is deprecated and will not be supported anymore in a future release. Please use `await pool.open()

That is why an extra parameter for open=False is added.
And an extra line for opening the pool

autoagora/price_save_state_db.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
tests/test_model_builder.py Outdated Show resolved Hide resolved
tests/test_price_save_state_db.py Outdated Show resolved Hide resolved
Copy link
Contributor

@aasseman aasseman left a comment

Choose a reason for hiding this comment

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

Please squash merge

@carlosvdr carlosvdr merged commit 203272a into master Nov 22, 2023
7 checks passed
@carlosvdr carlosvdr deleted the psycopg-refactor branch November 22, 2023 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from asyncpg to psycopg v3
3 participants