Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upShould we delete the deprecated code in Scrapy 2.0? #4356
Comments
|
I think that's fine to remove most of them, better in separate PRs. It can be nice to do this for 2.0, but it is not a blocker for release; we can remove them at any time. For Spider.make_requests_from_url there are few PRs already; it turns out a bit more tricky, as not all usages were properly deprcated. |
|
Scrapy 2.0 sounds like the perfect release target to do some breaking changes and get rid of more of the cruft. But that's just radical me talking, as usual. I don't see a problem with all of these getting removed wholesale, nothing here has any bearing on external lib versions, as xlib did or the Selectors shortcut. Most are merely internal renames anyway, and legacy code shouldn't have much trouble with the rest? Off with their heads! Errr... :) |
|
Another one from the list: #4411 for But I noticed I might be cleaning up easy first issues for gsoc candidates here, oops. So for completeness sake: That means, currently remaining on the list of easy pickings, here, are: |
Nah, let us just get rid of them in time for 2.1. |
|
Hi @nyov @elacuesta @Gallaecio @kmike , thank you for taking this!! I updated the issue description with the PRs. |
Issue scrapy#4356
BaseSgmlLinkExtractor is also removed.
BaseSgmlLinkExtractor is also removed.
|
So except |
|
Let’s just leave it open until we fix #4178. |
I recopilated some of the old (before 2018) deprecation warnings to discuss if we can delete them in the upcoming Scrapy 2.0 release (chronological order):
BaseSgmlLinkExtractorandSgmlLinkExtractor(classes)Deprecation warnings: 07/2014Links:https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/sgml.py#L23https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/sgml.py#L116Crawler.spiders(property)Deprecation warning: 08/2014Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/crawler.py#L74HtmlParserLinkExtractor(class)Deprecation warning: 05/2015Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/htmlparser.py#L22stringify_dict(function)Deprecation warning: 07/2015Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/python.py#L296is_writable(function)Deprecation warning: 07/2015Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/python.py#L311setattr_default(function)Deprecation warning: 07/2015Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/python.py#L322Initialising
scrapy.extensions.feedexport.S3FeedStoragewithout AWS keys is deprecated. (procedure)Deprecation warning: 11/2015Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/extensions/feedexport.py#L103scrapy.utils.datatypes.MultiValueDict,MultiValueDictKeyErrorandSiteNode(classes)Deprecation warnings: 01/2016Links:https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L46https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L19https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L161isbinarytext(function)Deprecation warning: 03/2016Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/python.py#L168scrapy.downloadermiddlewares.chunked(module)Deprecation warning: 11/2016Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/downloadermiddlewares/chunked.py#L7Spider.make_requests_from_url(method)There are other deprecation warnings but as they are from 2018 to the present I think we can leave it there for a while. However, as we are going to release a major version maybe is a good moment to do it.
Do you see any inconvenience?
Any thoughts? Let me know what you think.