Skip to content

Refactor workers#3471

Merged
asvetlov merged 4 commits intomasterfrom
refactor-workers
Dec 30, 2018
Merged

Refactor workers#3471
asvetlov merged 4 commits intomasterfrom
refactor-workers

Conversation

@asvetlov
Copy link
Copy Markdown
Member

Use the same task for app initialization and web server handling in gunicorn workers.
It allows to use Python3.7 context vars smoothly.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 30, 2018

Codecov Report

Merging #3471 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3471      +/-   ##
==========================================
+ Coverage   97.93%   97.93%   +<.01%     
==========================================
  Files          44       44              
  Lines        8557     8559       +2     
  Branches     1383     1383              
==========================================
+ Hits         8380     8382       +2     
  Misses         74       74              
  Partials      103      103
Impacted Files Coverage Δ
aiohttp/worker.py 97.54% <100%> (+0.04%) ⬆️

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 ab33ae4...88525c3. Read the comment docs.

@asvetlov asvetlov merged commit c41ca7b into master Dec 30, 2018
@asvetlov asvetlov deleted the refactor-workers branch December 30, 2018 19:18
asvetlov added a commit that referenced this pull request Dec 30, 2018
cognifloyd added a commit to cognifloyd/connexion that referenced this pull request May 22, 2019
Somewhere between 3.5.1 and 3.5.2, the aiohttp reimport started
succeeding (in connexion.connexion.cli.run()). It's not clear which
change caused the issue, but it's probably one of:

- aio-libs/aiohttp#3469 (Remove wildcard imports)
- aio-libs/aiohttp#3464 (Don't suppress gunicorn cleanup errors)
- aio-libs/aiohttp#3471 (Refactor workers)
- aio-libs/aiohttp#3500 (Ignore done tasks)

In any case, setting sys.modules['aiohttp'] = None should prevent
reimporting it. See: https://stackoverflow.com/a/1350574

I successfully tested locally on py37 with aiohttp 3.5.1 and 3.5.2.
hjacobs pushed a commit to spec-first/connexion that referenced this pull request Oct 15, 2019
* Revert "set max aiohttp version to 3.5.1 (until build is fixed) (#844)"

This reverts commit b2a4287.

* Fix test_run_with_aiohttp_not_installed

Somewhere between 3.5.1 and 3.5.2, the aiohttp reimport started
succeeding (in connexion.connexion.cli.run()). It's not clear which
change caused the issue, but it's probably one of:

- aio-libs/aiohttp#3469 (Remove wildcard imports)
- aio-libs/aiohttp#3464 (Don't suppress gunicorn cleanup errors)
- aio-libs/aiohttp#3471 (Refactor workers)
- aio-libs/aiohttp#3500 (Ignore done tasks)

In any case, setting sys.modules['aiohttp'] = None should prevent
reimporting it. See: https://stackoverflow.com/a/1350574

I successfully tested locally on py37 with aiohttp 3.5.1 and 3.5.2.
@lock
Copy link
Copy Markdown

lock bot commented Jan 1, 2020

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bot:chronographer:provided There is a change note present in this PR outdated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants