Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change type of Payload.size from Optional[float] to Optional[int]#3484

Merged
asvetlov merged 1 commit into
aio-libs:masterfrom
kxepal:payload-int-size-type
Jan 4, 2019
Merged

Change type of Payload.size from Optional[float] to Optional[int]#3484
asvetlov merged 1 commit into
aio-libs:masterfrom
kxepal:payload-int-size-type

Conversation

@kxepal
Copy link
Copy Markdown
Member

@kxepal kxepal commented Jan 4, 2019

What do these changes do?

This changes type of Payload.size property from float to int. Since this property defines amount of bytes which payload contains, it's impossible to have there floating point value.

This behavior was introduced in #3294.

Are there changes in behavior for the user?

It's possible to break some annotations for users custom Payload instances, but no runtime issues should be caused.

@kxepal kxepal requested a review from asvetlov as a code owner January 4, 2019 17:39
@kxepal kxepal mentioned this pull request Jan 4, 2019
5 tasks
@kornicameister
Copy link
Copy Markdown
Contributor

@kxepal AFAIR I have similar doubts. I think it was coming from another portion of the code that received typings earlier. @asvetlov might remember more as he reviewed the code.

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.

Sorry, adding types was a very massive change.
If int works -- let's apply the change.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3484 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3484   +/-   ##
=======================================
  Coverage   97.92%   97.92%           
=======================================
  Files          44       44           
  Lines        8567     8567           
  Branches     1383     1383           
=======================================
  Hits         8389     8389           
  Misses         74       74           
  Partials      104      104
Impacted Files Coverage Δ
aiohttp/payload.py 98.63% <100%> (ø) ⬆️

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 0715ae7...48ac7f8. Read the comment docs.

@asvetlov asvetlov merged commit 075c705 into aio-libs:master Jan 4, 2019
@lock
Copy link
Copy Markdown

lock Bot commented Jan 4, 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 4, 2020
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 4, 2020
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Jan 4, 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.

4 participants