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 the scrapy.downloadermiddlewares.decompression module #5547

Merged
merged 2 commits into from
Jul 5, 2022
Merged

Deprecate the scrapy.downloadermiddlewares.decompression module #5547

merged 2 commits into from
Jul 5, 2022

Conversation

Laerte
Copy link
Member

@Laerte Laerte commented Jun 30, 2022

Closes #5546

@Gallaecio
Copy link
Member

We have a policy not to remove features right away, and instead issue deprecation warnings for at least 1 year.

So the change at this stage should consist of doing this in the module:

from warnings import warn

from scrapy.exceptions import ScrapyDeprecationWarning

warn(
    'scrapy.downloadermiddlewares.decompression is deprecated',
    ScrapyDeprecationWarning,
    stacklevel=2,
)

The tests can remain there until the feature is removed.

@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #5547 (fe08a11) into master (b51b52f) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5547      +/-   ##
==========================================
- Coverage   88.74%   88.73%   -0.02%     
==========================================
  Files         162      162              
  Lines       10771    10774       +3     
  Branches     1843     1843              
==========================================
+ Hits         9559     9560       +1     
- Misses        939      940       +1     
- Partials      273      274       +1     
Impacted Files Coverage Δ
scrapy/downloadermiddlewares/decompression.py 100.00% <100.00%> (ø)
scrapy/core/downloader/__init__.py 90.97% <0.00%> (-1.51%) ⬇️

@Laerte
Copy link
Member Author

Laerte commented Jun 30, 2022

@Gallaecio Like this?

Copy link
Member

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

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

Yes, thank you!

@kmike kmike merged commit 4994202 into scrapy:master Jul 5, 2022
@kmike
Copy link
Member

kmike commented Jul 5, 2022

Looks good, thanks!

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 the scrapy.downloadermiddlewares.decompression module
3 participants