gdcc / pyDataverse

Python module for Dataverse Software (dataverse.org).
http://pydataverse.readthedocs.io/
MIT License
63 stars 41 forks source link

Requests via `httpx` #174

Closed JR-1991 closed 4 months ago

JR-1991 commented 4 months ago

Overview

As highlighted and discussed in issue #171, the requests library seems to supply wrong content types, leading to certain upload operations such as replace_datafile not working (see the issue for details). This PR addresses this issue and substitutes requests with httpx that fixes the highlighted problem.

Besides the previously mentioned fix, the library also provides means of async requests as shown here. Since async requests were planned anyway, this would inevitably also lead to ditching requests and thus the change to httpx already paves the way.

Changes introduced by this PR

Additional notes

Closes

Fixes #171

JR-1991 commented 4 months ago

Todo: Add a badge for Python versions supported