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

Fix pool maxsize unlimited #426

Merged
merged 8 commits into from
Feb 2, 2022

Conversation

d-ryzhykau
Copy link
Contributor

What do these changes do?

Fix pool.maxsize logic to allow pool's size to be unlimited when maxsize is 0.
https://aiomysql.readthedocs.io/en/latest/pool.html#Pool

Are there changes in behavior for the user?

No changes.

Related issue number

#119

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

@d-ryzhykau d-ryzhykau force-pushed the fix/pool-maxsize-unlimited branch from f3e6486 to 22dd779 Compare August 11, 2019 17:00
@codecov
Copy link

codecov bot commented Aug 11, 2019

Codecov Report

Merging #426 (7238ef7) into master (0824b26) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   92.69%   92.70%   +0.01%     
==========================================
  Files          35       35              
  Lines        5432     5444      +12     
  Branches      586      588       +2     
==========================================
+ Hits         5035     5047      +12     
  Misses        309      309              
  Partials       88       88              
Flag Coverage Δ
ubuntu-latest_3.10_mariadb-10.2 89.51% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mariadb-10.3 89.51% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mariadb-10.4 89.51% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mariadb-10.5 89.49% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mariadb-10.6 89.49% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mariadb-10.7 89.49% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mysql-5.7 90.20% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.10_mysql-8.0 91.62% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.7_mariadb-10.2 88.92% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mariadb-10.3 88.92% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mariadb-10.4 88.92% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mariadb-10.5 88.90% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mariadb-10.6 88.90% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mariadb-10.7 88.90% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mysql-5.7 89.66% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.7_mysql-8.0 91.16% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.8_mariadb-10.2 89.55% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mariadb-10.3 89.55% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mariadb-10.4 89.55% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mariadb-10.5 89.53% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mariadb-10.6 89.53% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mariadb-10.7 89.53% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mysql-5.7 90.25% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.8_mysql-8.0 91.64% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.9_mariadb-10.2 89.42% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mariadb-10.3 89.42% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mariadb-10.4 89.42% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mariadb-10.5 89.40% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mariadb-10.6 89.40% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mariadb-10.7 89.40% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mysql-5.7 90.12% <100.00%> (+0.02%) ⬆️
ubuntu-latest_3.9_mysql-8.0 91.52% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiomysql/pool.py 96.98% <100.00%> (ø)
tests/test_pool.py 97.37% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0824b26...7238ef7. Read the comment docs.

@Nothing4You Nothing4You added this to the 1.0.0 milestone Jan 22, 2022
@aio-libs aio-libs deleted a comment from CLAassistant Jan 28, 2022
Copy link
Collaborator

@Nothing4You Nothing4You left a comment

Choose a reason for hiding this comment

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

thank you for the PR.

effectively this PR should be porting aio-libs/aiopg#59

i've added another test case that fails on this PR, this change should be ported as well:
https://github.com/aio-libs/aiopg/pull/59/files#diff-34274c292424cfc2c3ac7e6a8a625f4d2cc652639b0bcaab02978bdf5bad6520R42

aiomysql/pool.py Outdated Show resolved Hide resolved
@Nothing4You Nothing4You linked an issue Feb 2, 2022 that may be closed by this pull request
@Nothing4You Nothing4You self-requested a review February 2, 2022 21:42
@Nothing4You Nothing4You merged commit e33f429 into aio-libs:master Feb 2, 2022
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.

Pool.maxsize = 0 does not allow unlimited connections
2 participants