question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we delete the deprecated code in Scrapy 2.0?

See original GitHub issue

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):

BaseSgmlLinkExtractor and SgmlLinkExtractor (classes)

  • Deprecation warnings: 07/2014
  • Links:
    • https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/sgml.py#L23
    • https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/sgml.py#L116
  • PR: #4679

Crawler.spiders (property)

HtmlParserLinkExtractor (class)

  • Deprecation warning: 05/2015
  • Link: https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/linkextractors/htmlparser.py#L22
  • PR: #4674

stringify_dict (function)

is_writable (function)

setattr_default (function)

Initialising scrapy.extensions.feedexport.S3FeedStorage without AWS keys is deprecated. (procedure)

scrapy.utils.datatypes.MultiValueDict, MultiValueDictKeyError and SiteNode (classes)

  • Deprecation warnings: 01/2016
  • Links:
    • https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L46
    • https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L19
    • https://github.com/scrapy/scrapy/blob/c4ee4b6075fbb616272788b14b70f0af63dc2877/scrapy/utils/datatypes.py#L161
  • PR: https://github.com/scrapy/scrapy/pull/4400/

isbinarytext (function)

scrapy.downloadermiddlewares.chunked (module)

Spider.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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
novilunicommented, Oct 7, 2020

I removed the “good first issue” label to avoid similar future questions.

2reactions
novilunicommented, Apr 29, 2020

Hi @nyov @elacuesta @Gallaecio @kmike , thank you for taking this!! 🚀

I updated the issue description with the PRs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release notes — Scrapy 2.7.1 documentation
Replaced deprecated asyncio APIs that implicitly use the current event loop with code that explicitly requests a loop from the event loop policy...
Read more >
Delete deprecated code is bad or good idea? [closed]
Yes, delete now. Save it to the side (outside of the codebase), if you think the schedule creation functionality might be useful in...
Read more >
Scrapy Documentation - Read the Docs
Before you start scraping, you will have to set up a new Scrapy project. Enter a directory where you'd like to store your...
Read more >
Release notes — Scrapy 1.5.0 documentation - API Manual
522 and 524 status codes are added to RETRY_HTTP_CODES (issue 2851) ... Remove page on (deprecated & unsupported) Ubuntu packages from ToC (issue...
Read more >
antialias is deprecated | The AI Search Engine You Control
scrapy/pipelines/images.py:163: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found