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

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

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

kxepal
Copy link
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
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
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

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

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