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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crawl rule: remove deprecated code #4818

Merged
merged 1 commit into from Oct 1, 2020

Conversation

elacuesta
Copy link
Member

@elacuesta elacuesta commented Oct 1, 2020

Deprecated in #3682, which was released in 1.7 (Jul 18, 2019).

Personally I don't see a problem with removing the Rule.process_request_argcount attribute (which should have been underscored from the beginning, my bad 馃檵) without deprecating it first, because it's not documented, but I understand if any objections are made. What are your thoughts on this?

Remove the compatibility layer that handles 'process_request'
methods that do not receive a 'response' parameter
@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

Merging #4818 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4818   +/-   ##
=======================================
  Coverage   87.52%   87.52%           
=======================================
  Files         160      160           
  Lines        9761     9751   -10     
  Branches     1440     1439    -1     
=======================================
- Hits         8543     8535    -8     
+ Misses        955      954    -1     
+ Partials      263      262    -1     
Impacted Files Coverage 螖
scrapy/spiders/crawl.py 93.97% <100.00%> (-0.65%) 猬囷笍
scrapy/core/downloader/__init__.py 92.48% <0.00%> (+1.50%) 猬嗭笍

self.follow = follow if follow is not None else not callback

def _compile(self, spider):
self.callback = _get_method(self.callback, spider)
self.errback = _get_method(self.errback, spider)
self.process_links = _get_method(self.process_links, spider)
self.process_request = _get_method(self.process_request, spider)
self.process_request_argcount = len(get_func_args(self.process_request))
Copy link
Member

@Gallaecio Gallaecio Oct 1, 2020

Choose a reason for hiding this comment

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

I鈥檓 +0.5 on just removing it.

@kmike kmike merged commit 872f68a into scrapy:master Oct 1, 2020
1 check passed
@elacuesta elacuesta deleted the crawl-rule-remove-deprecated-code branch Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants