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

Make LineTooLong exception more detailed about actual data size #2863

Merged
merged 5 commits into from
Apr 5, 2018

Conversation

popravich
Copy link
Member

What do these changes do?

Implementation of #2857

Are there changes in behavior for the user?

No

Related issue number

#2857

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

@popravich popravich changed the title WIP: Make LineTooLong exception more detailed about actual data size Make LineTooLong exception more detailed about actual data size Mar 20, 2018
@asvetlov
Copy link
Member

Looks good but tests should be fixed

@popravich
Copy link
Member Author

Is it the tests should be fixed or py-parser?
Tests are failing because py-parser counts more bytes than c-parser (this issue I described in #2857 (comment))

@popravich
Copy link
Member Author

Http Py-parser and C-parser calculate data length in a different ways.
I can either make Py-parser act like C-parser or update tests with placeholders in LineTooLong
messages and not check actual data size (which is reported different by Py- and C-parser).

@asvetlov
Copy link
Member

Sorry, looks like my comment is missing.
Better to fix py-parser to be consistent with c-parser I think

@popravich
Copy link
Member Author

Ok, I will update this PR

@popravich
Copy link
Member Author

Updated PR.

@popravich popravich requested a review from asvetlov April 3, 2018 09:30
@codecov-io
Copy link

codecov-io commented Apr 3, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2863      +/-   ##
==========================================
+ Coverage   97.98%   97.98%   +<.01%     
==========================================
  Files          40       40              
  Lines        7506     7509       +3     
  Branches     1316     1317       +1     
==========================================
+ Hits         7355     7358       +3     
  Misses         48       48              
  Partials      103      103
Impacted Files Coverage Δ
aiohttp/http_exceptions.py 100% <100%> (ø) ⬆️
aiohttp/http_parser.py 98.05% <100%> (+0.01%) ⬆️

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 2584ba2...a03d50b. Read the comment docs.

@asvetlov
Copy link
Member

asvetlov commented Apr 3, 2018

Please merge, but add CHANGES note first.
Would you backport the PR into 3.1 branch? If yes I'll make a new release.
Backport procedure is described here: https://docs.aiohttp.org/en/latest/contributing.html#backporting

@popravich
Copy link
Member Author

Ok, give me some time for this.

@asvetlov asvetlov merged commit 6a60358 into master Apr 5, 2018
@asvetlov asvetlov deleted the too_long_line_size branch April 5, 2018 18:32
asvetlov pushed a commit that referenced this pull request Apr 5, 2018
…GH-2863)

(cherry picked from commit 6a60358)

Co-authored-by: Alexey Popravka <popravich@users.noreply.github.com>
asvetlov added a commit that referenced this pull request Apr 5, 2018
…GH-2863) (#2917)

(cherry picked from commit 6a60358)

Co-authored-by: Alexey Popravka <popravich@users.noreply.github.com>
@lock
Copy link

lock bot commented Oct 28, 2019

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].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants