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

[MRG+1] Change DOWNLOAD_MAXSIZE logger level from Error to Warning #3886

Closed
wants to merge 1 commit into from
Closed

[MRG+1] Change DOWNLOAD_MAXSIZE logger level from Error to Warning #3886

wants to merge 1 commit into from

Conversation

WinterComes
Copy link
Contributor

@WinterComes WinterComes commented Jul 18, 2019

This PR based on #3874

Raising error on reaching download maxsize is removed.
Logger level is replaced to warning.

Closes #3874

@codecov
Copy link

codecov bot commented Jul 18, 2019

Codecov Report

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

@@           Coverage Diff           @@
##           master    #3886   +/-   ##
=======================================
  Coverage   85.68%   85.68%           
=======================================
  Files         165      165           
  Lines        9734     9734           
  Branches     1463     1463           
=======================================
  Hits         8341     8341           
  Misses       1136     1136           
  Partials      257      257
Impacted Files Coverage Δ
scrapy/core/downloader/handlers/http11.py 92.91% <100%> (ø) ⬆️

tests/test_downloader_handlers.py Outdated Show resolved Hide resolved
@Gallaecio Gallaecio changed the title Change DOWNLOAD_MAXSIZE logger level from Error to Warning [MRG+1] Change DOWNLOAD_MAXSIZE logger level from Error to Warning Aug 5, 2019
@sprzedwojski
Copy link

sprzedwojski commented Oct 6, 2019

May I suggest 2 things before this is merged?

  1. Adding "Closes DOWNLOAD_MAXSIZE logger level shouldn't be Error #3874" or similar to automatically close the related issue (see here)
  2. Squashing all commits to a single commit

@WinterComes
Copy link
Contributor Author

WinterComes commented Oct 6, 2019

thanks @sprzedwojski
I did this actions.

error_msg = ("Cancelling download of %(url)s: expected response "
"size (%(size)s) larger than download max size (%(maxsize)s).")
error_args = {'url': request.url, 'size': expected_size, 'maxsize': maxsize}
warning_msg = ("Expected response size (%(size)s) larger than "
Copy link
Member

@kmike kmike Jan 23, 2020

Choose a reason for hiding this comment

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

I think previous error message made more sense, because now we're getting two almost identical messages for warnsize and maxsize - there is no indication that response is dropped here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOWNLOAD_MAXSIZE logger level shouldn't be Error
4 participants