Closed eggplants closed 10 months ago
I have introduced mypy and fixed some errors. And then I have added py.typed file to package_data to mark this package is typed. (See PEP561)
py.typed
package_data
List any changes that break the API usage supported on master.
master
The annotation of Search.max_results changes from float into int. If the instance variable is float like 10.0, the Arxiv API raises max_results must be an integer. https://export.arxiv.org/api/query?search_query=all:electron&max_results=10.0
Search.max_results
float
int
10.0
max_results must be an integer
import arxiv client = arxiv.Client(page_size=10, delay_seconds=0) search = arxiv.Search(query="testing", max_results=2.0) client.results(search) # arxiv.arxiv.HTTPError: Page request resulted in HTTP 400: max_results must be an integer (http://export.arxiv.org/api/query?search_query=testing&id_list=&sortBy=relevance&sortOrder=descending&start=0&max_results=2.0)
Not found.
...
@eggplants thanks for submitting this. I'm running a bit behind on reviews — this interacts with #124, which is also in my review queue. Thanks for your patience 🙇
Description
I have introduced mypy and fixed some errors. And then I have added
py.typed
file topackage_data
to mark this package is typed. (See PEP561)Breaking changes
The annotation of
Search.max_results
changes fromfloat
intoint
. If the instance variable isfloat
like10.0
, the Arxiv API raisesmax_results must be an integer
. https://export.arxiv.org/api/query?search_query=all:electron&max_results=10.0Relevant issues
Not found.
Checklist
...