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

Returns a JSON serializable Python object. #4574

Merged
merged 8 commits into from Jun 1, 2020

Conversation

bulatbulat48
Copy link
Contributor

@bulatbulat48 bulatbulat48 commented May 13, 2020

  • added property .json
  • added tests

Fixes #2444, closes #4460.

@elacuesta
Copy link
Member

elacuesta commented May 13, 2020

Hey @bulatbulat48, thanks for the PR. For the record, this was originally requested in #2444, and there is an open PR at #4460.

scrapy/http/response/text.py Outdated Show resolved Hide resolved
@bulatbulat48 bulatbulat48 requested a review from Gallaecio May 14, 2020
Copy link
Member

@Gallaecio Gallaecio left a comment

I see you’ve switched from a property to a method. I have no strong opinion either way, just mentioning it in case someone does.

tests/test_http_response.py Outdated Show resolved Hide resolved
@bulatbulat48 bulatbulat48 requested a review from Gallaecio May 18, 2020
docs/topics/request-response.rst Outdated Show resolved Hide resolved
Co-authored-by: Adrián Chaves <adrian@chaves.io>
@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #4574 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4574      +/-   ##
==========================================
+ Coverage   84.55%   84.58%   +0.03%     
==========================================
  Files         164      164              
  Lines        9923     9938      +15     
  Branches     1476     1478       +2     
==========================================
+ Hits         8390     8406      +16     
  Misses       1266     1266              
+ Partials      267      266       -1     
Impacted Files Coverage Δ
scrapy/http/response/text.py 100.00% <100.00%> (ø)
scrapy/spiders/sitemap.py 80.64% <0.00%> (-0.31%) ⬇️
scrapy/responsetypes.py 94.02% <0.00%> (-0.09%) ⬇️
scrapy/spiders/crawl.py 92.39% <0.00%> (-0.09%) ⬇️
scrapy/mail.py 73.75% <0.00%> (ø)
scrapy/shell.py 68.21% <0.00%> (ø)
scrapy/cmdline.py 67.74% <0.00%> (ø)
scrapy/robotstxt.py 97.53% <0.00%> (ø)
scrapy/utils/url.py 100.00% <0.00%> (ø)
scrapy/core/engine.py 87.87% <0.00%> (ø)
... and 12 more

@bulatbulat48
Copy link
Contributor Author

bulatbulat48 commented May 25, 2020

@elacuesta, please review. Thanks!

Copy link
Member

@elacuesta elacuesta left a comment

LGTM 👍
I left a minor suggestion, but it shouldn't be a blocker.
Thanks @bulatbulat48!

scrapy/http/response/text.py Outdated Show resolved Hide resolved
@Gallaecio Gallaecio merged commit 5cef927 into scrapy:master Jun 1, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants