Deprecate download helpers #178
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Downloads may be a common use case for this package, but the current download helpers are clumsy. They expose (necessarily) partial interfaces for filename-formatting and path construction, they obscure the inner HTTP logic (see
urlretrieve
).Instead, the caller can download these files given a URL for them, using whatever HTTP and file logic suits the application. We can add a README example that demonstrates a download with the current default behavior that does not use the newly deprecated methods.
The one clear counterargument I can see: if these download endpoints are subject to the same rate-limiting logic as the API, they should be reimplemented (with reference to a
Client
) rather than deprecated: managing rate limiting per arXiv policy is a responsibility of this client library.Breaking changes
None — strictly additive for the time being: adds
source_url
method.Checklist
README.md
example usage has been updated.