Repository navigation
Fix two problems related to clear_download_cache - #4810
Conversation
|
Marked as v1.2.0 since it changes where files are cached. If people think this should be backported I would not object though. |
|
Need a change log.
If the cache location is changing, shouldn't it be documented in the docs? |
|
@pllim - about documenting the change in cache location, the cache directory does not appear to be anywhere in the docs currently, so there is nothing to change. I think this is by design, i.e. the exact location of the cache should not be something people worry about. So this is a subtle case where it is not clear if this represents an API change or just a plain bug fix. I usually wait for tests to pass and possibly get feedback before the changelog. Maybe @eteq would say this is a terrible idea and the PR gets scrapped. 😄 |
|
Can you at least comment on this PR on how the path changed exactly? Would be nice to document it here if not in the actual doc. Thanks! |
|
@pllim - the initial description has been updated to describe the change in file names. |
|
@eteq - I have tested backporting this to v1.1.2 and v1.0.9. There were no conflicts and tests passed (at least --package=utils) on Python 3, so I think we can backport if it seems like the right thing to do. I'll wait on updating CHANGES.rst and the milestone until there is a decision. |
|
I personally think we should backport this since it fixes two bugs, and the cache location should be irrelevant for the user. Worst case, some users are going to be redownloading some files. |
| Opens a shelf file. If `withclosing` is True, it will be opened with closing, | ||
| allowing use like: | ||
|
|
||
| with _open_shelve('somefile',True) as s: |
There was a problem hiding this comment.
Yikes, this cries out for a little class with an __enter__ and __exit__ method -- but fine to ignore here!
|
This looks good to me. I agree with @astrofrog that one might as well backport, since this is a bug. So I changed the milestone. Feel free to merge once the changelog entry is in the right place! |
|
@taldcroft - can you update this and add a changelog in the v1.0.10 section in this case? Thanks! |
|
@astrofrog - changelog entry added. |
|
OK, all set, merging! |
Fix two problems related to clear_download_cache
Fix two problems related to clear_download_cache
Fix two problems related to clear_download_cache
This fixes two problems:
Unfortunately I don't know of any automated test that can verify that the second is fixed, but I have done this manually.
The download cache directory / file structure is changed from
to:
The
2or3is justsys.version_info.major(so this is Python 4 compatible).cc: @eteq