macxred / cashctrl_api

Python client for the CashCtrl REST API
MIT License
0 stars 0 forks source link

Avoid deprecation warning in request -- re-enable warning as errors #1

Closed chappi closed 4 months ago

chappi commented 4 months ago

The github action fails/failed due to the following situation:

The warning message reads: "DeprecationWarning: Non-string passwords will no longer be supported in Requests 3.0.0. Please convert the object you've passed in (<class 'NoneType'>) to a string or bytes object in the near future to avoid problems."

The initial code was response = requests.request(method, url, auth=requests.auth.HTTPBasicAuth(self._api_key, None), data=data, params=params). Currently there is response = requests.request(method, url, auth=(self._api_key, None), data=data, params=params). Either requests.request call triggers the warning.

'Run tests' has been relaxed to accept warnings, but this should be reverted again. Original code run: pytest -W error -W ignore::pytest.PytestUnraisableExceptionWarning. Current workaround code: run: pytest -W ignore::pytest.PytestUnraisableExceptionWarning

lasuk commented 4 months ago

Fixed in 3e0ac06