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

MNT: Deprecate unused keywords in utils/data.py #10628

Merged
merged 1 commit into from Oct 22, 2020

Conversation

pllim
Copy link
Member

@pllim pllim commented Aug 6, 2020

Description

This pull request follows up on #10437 to really deprecate unused keywords. We decided not to issue warning when they are refactored to be no-op keywords in #10437 because that PR is being backported to LTS.

With this patch:

>>> from astropy.utils.data import check_download_cache
>>> check_download_cache(check_hashes=True)
WARNING: AstropyDeprecationWarning: "check_hashes" was deprecated in
version 4.2 and will be removed in a future version.  [warnings]
>>> from astropy.utils.data import import_file_to_cache
>>> import_file_to_cache('https://example.com/', 'README.md', hexdigest='abcdef')
WARNING: AstropyDeprecationWarning: "hexdigest" was deprecated in
version 4.2 and will be removed in a future version.  [warnings]
'/path/to/.astropy/cache/download/url/.../contents'

cc @aarchiba

@pllim pllim added Refactoring API change PRs and issues that change an existing API, possibly requiring a deprecation period labels Aug 6, 2020
@pllim pllim added this to the v4.2 milestone Aug 6, 2020
@pllim pllim requested review from eteq and bsipocz August 6, 2020 18:48
@astropy-bot astropy-bot bot added the utils label Aug 6, 2020
@pllim
Copy link
Member Author

pllim commented Aug 6, 2020

You can ignore the coverage failure.

@aarchiba
Copy link
Contributor

The diff looks fine.

@pllim
Copy link
Member Author

pllim commented Oct 22, 2020

Just rebased and checked locally that this still works:

>>> from astropy.utils import data                                                              
>>> data.check_download_cache(check_hashes=True)                                                
WARNING: AstropyDeprecationWarning: "check_hashes" was deprecated in version 4.2 and will be removed in a future version.  [warnings]
set()

Given blessing from @aarchiba , I just need an official approval to get this in for 4.2.

@bsipocz bsipocz merged commit 5801f5f into astropy:master Oct 22, 2020
@bsipocz
Copy link
Member

bsipocz commented Oct 22, 2020

Thanks @pllim

@pllim pllim deleted the depre-utils-keywords branch October 23, 2020 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change PRs and issues that change an existing API, possibly requiring a deprecation period Refactoring utils
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants