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

deprecate Spider.make_requests_from_url. #1728

Merged
merged 3 commits into from Feb 20, 2017

Conversation

kmike
Copy link
Member

@kmike kmike commented Jan 26, 2016

Fixes #1495.

Todo:

  • implementation is incorrect; fix it
  • tests

@codecov-io
Copy link

codecov-io commented Jan 26, 2016

Codecov Report

Merging #1728 into master will decrease coverage by -3.28%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1728      +/-   ##
==========================================
- Coverage   83.59%   80.31%   -3.28%     
==========================================
  Files         161      161              
  Lines        8812     8817       +5     
  Branches     1296     1298       +2     
==========================================
- Hits         7366     7081     -285     
- Misses       1200     1482     +282     
- Partials      246      254       +8
Impacted Files Coverage Δ
scrapy/spiders/init.py 97.1% <100%> (-1.34%)
scrapy/core/downloader/handlers/ftp.py 0% <ø> (-97.96%)
scrapy/linkextractors/sgml.py 0% <ø> (-97.76%)
scrapy/linkextractors/regex.py 0% <ø> (-95.66%)
scrapy/linkextractors/htmlparser.py 0% <ø> (-93.23%)
scrapy/core/downloader/handlers/s3.py 62.9% <ø> (-32.26%)
scrapy/extensions/statsmailer.py 0% <ø> (-30.44%)
scrapy/utils/boto.py 46.66% <ø> (-26.67%)
scrapy/_monkeypatches.py 42.85% <ø> (-14.29%)
scrapy/link.py 86.36% <ø> (-13.64%)
... and 12 more

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 afac3fd...5adacc4. Read the comment docs.

@kmike kmike changed the title deprecate Spider.make_requests_from_url. [WIP] deprecate Spider.make_requests_from_url. Jan 26, 2016
@nyov nyov mentioned this pull request Feb 14, 2016
@nyov
Copy link
Contributor

nyov commented Oct 15, 2016

What's wrong with the implementation? Can the other doc-fixes get merged (assuming they're not already in master by now).

@kmike kmike force-pushed the deprecate-make-requests-from-url branch from bbfa4c0 to 692975a Compare February 15, 2017 22:42
@@ -66,10 +66,20 @@ def _set_crawler(self, crawler):
crawler.signals.connect(self.close, signals.spider_closed)

def start_requests(self):
for url in self.start_urls:
yield self.make_requests_from_url(url)
if self.make_requests_from_url is not Spider.make_requests_from_url:
Copy link
Member Author

Choose a reason for hiding this comment

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

^^ this line is wrong because the condition is always True: bound method is not the same as unbound.

@kmike kmike changed the title [WIP] deprecate Spider.make_requests_from_url. deprecate Spider.make_requests_from_url. Feb 16, 2017
@kmike kmike added this to the v1.4 milestone Feb 16, 2017
@dangra dangra merged commit b0388e4 into master Feb 20, 2017
@dangra dangra deleted the deprecate-make-requests-from-url branch February 20, 2017 14:23
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.

deprecate Spider.make_requests_from_url
4 participants