lukasschwab / arxiv.py

Python wrapper for the arXiv API
MIT License
1.07k stars 120 forks source link

Deprecate `(Search|Client).get` in favor of `(Search|Client).results` #69

Closed lukasschwab closed 3 years ago

lukasschwab commented 3 years ago

Description

Makes this package's API more literate.

It's not obvious what it means to "get" a Search; Results are the true object for the verb "get", but they're absent from the method call construction.

results seems more like an accessor (accessing the results on the Search, or accessing results in the Client that correspond to a Search).

Still considering: client.run(search) or client.getResults(search) or something. Will merge after I reach some conclusion.

Breaking changes

List any changes that break the API usage supported on master.

None; the old *.get() methods remain supported (as simple wrappers of *.results().

These deprecated methods should be removed at the point that the results signatures need to change. This is unlikely to happen:

Relevant issues

List GitHub issues relevant to this change.

N/A

Checklist

lukasschwab commented 3 years ago

Should use warnings to warn of deprecation

Edit: added in 1726660 ✅

lukasschwab commented 3 years ago

Should only merge this when I'm really ready to roll the release to prevent publishing ~1.2.1~ 1.3.0 docs before *.results(...) is available.