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

Fixed static files handling for loops without .sendfile() #5157

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

greshilov
Copy link
Contributor

@greshilov greshilov commented Oct 26, 2020

What do these changes do?

Bug fix. Static routes on aiohttp+uvloop now work again.

Are there changes in behavior for the user?

No.

Related issue number

Fixes #5149.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (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."

@codecov-io
Copy link

codecov-io commented Oct 26, 2020

Codecov Report

Merging #5157 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5157      +/-   ##
==========================================
- Coverage   97.56%   97.56%   -0.01%     
==========================================
  Files          43       43              
  Lines        8846     8781      -65     
  Branches     1420     1412       -8     
==========================================
- Hits         8631     8567      -64     
+ Misses        101      100       -1     
  Partials      114      114              
Flag Coverage Δ
#unit 97.56% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
aiohttp/web_fileresponse.py 100.00% <100.00%> (+0.53%) ⬆️

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 21805dc...13ca4d7. Read the comment docs.

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

I'll publish aiohttp 3.7.2 with the fix soon.

@github-actions
Copy link
Contributor

💚 Backport successful

The PR was backported to the following branches:

asvetlov pushed a commit that referenced this pull request Oct 27, 2020
asvetlov pushed a commit that referenced this pull request Oct 27, 2020
bdraco added a commit to bdraco/aiohttp that referenced this pull request Jan 2, 2021
Changing the sendfile implementation in aio-libs#5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.
bdraco added a commit to bdraco/aiohttp that referenced this pull request Jan 2, 2021
Changing the sendfile implementation in aio-libs#5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.
bdraco added a commit to bdraco/aiohttp that referenced this pull request Jan 2, 2021
Changing the sendfile implementation in aio-libs#5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.
bdraco added a commit to bdraco/aiohttp that referenced this pull request Jan 2, 2021
Changing the sendfile implementation in aio-libs#5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
asvetlov pushed a commit that referenced this pull request Oct 27, 2021
Changing the sendfile implementation in #5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.
patchback bot pushed a commit that referenced this pull request Oct 27, 2021
Changing the sendfile implementation in #5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.

(cherry picked from commit 11b46df)
asvetlov pushed a commit that referenced this pull request Oct 27, 2021
Changing the sendfile implementation in #5157 caused a
regression with sending zero byte files, and the test
had too much mocking to expose the issue.

(cherry picked from commit 11b46df)

Co-authored-by: J. Nick Koston <[email protected]>
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.

An error occurred when publishing a static file using uvloop
3 participants