Skip to content

Change __aiter__ return type to AsyncIterator#5165

Merged
asvetlov merged 1 commit intoaio-libs:masterfrom
blazewicz:patch-1
Oct 28, 2020
Merged

Change __aiter__ return type to AsyncIterator#5165
asvetlov merged 1 commit intoaio-libs:masterfrom
blazewicz:patch-1

Conversation

@blazewicz
Copy link
Copy Markdown
Contributor

@blazewicz blazewicz commented Oct 28, 2020

What do these changes do?

Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator.

Are there changes in behavior for the user?

No more mypy errors should for code using multipart.

Related issue number

It fixes #5163

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."

@blazewicz blazewicz requested a review from asvetlov as a code owner October 28, 2020 09:27
@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 28, 2020

Codecov Report

Merging #5165 into master will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5165      +/-   ##
==========================================
- Coverage   97.56%   97.45%   -0.11%     
==========================================
  Files          43       43              
  Lines        8780     8779       -1     
  Branches     1412     1412              
==========================================
- Hits         8566     8556      -10     
- Misses        100      112      +12     
+ Partials      114      111       -3     
Flag Coverage Δ
#unit 97.45% <100.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
aiohttp/multipart.py 96.27% <100.00%> (ø)
aiohttp/frozenlist.py 95.83% <0.00%> (-2.09%) ⬇️
aiohttp/http_writer.py 97.36% <0.00%> (-1.76%) ⬇️
aiohttp/http_parser.py 95.81% <0.00%> (-0.89%) ⬇️
aiohttp/http_websocket.py 98.37% <0.00%> (-0.28%) ⬇️
aiohttp/helpers.py 96.45% <0.00%> (-0.24%) ⬇️
aiohttp/hdrs.py 100.00% <0.00%> (ø)

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 3c02a71...6e6c5f3. Read the comment docs.

@blazewicz blazewicz requested a review from webknjaz as a code owner October 28, 2020 09:34
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2020
@asvetlov asvetlov closed this Oct 28, 2020
@asvetlov asvetlov reopened this Oct 28, 2020
Copy link
Copy Markdown
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.

Thanks!

@asvetlov asvetlov merged commit c0f39f9 into aio-libs:master Oct 28, 2020
@github-actions
Copy link
Copy Markdown
Contributor

💔 Backport was not successful

The PR was attempted backported to the following branches:

  • ❌ 3.7: Commit could not be cherrypicked due to conflicts
  • ❌ 3.8: Commit could not be cherrypicked due to conflicts

@asvetlov
Copy link
Copy Markdown
Member

Backported manually

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Iterator[BodyPartReader]" has no attribute "__anext__"

3 participants