mkb79 / freeletics-python

Python client for the non-publicly Freeletics API
GNU Affero General Public License v3.0
5 stars 0 forks source link

Update QueryParams import #3

Closed Xebeth closed 1 year ago

Xebeth commented 1 year ago

I tried using the example but had to make the following changes for it to work (Python 3.10 and httpx 0.24)

Subject: [PATCH] Update QueryParams import
---
Index: src/freeletics/_api.py
<+>UTF-8
===================================================================
diff --git a/src/freeletics/_api.py b/src/freeletics/_api.py
--- a/src/freeletics/_api.py    (revision e706990f4edc3f19cc463ca0dc29ae1e9d63007f)
+++ b/src/freeletics/_api.py    (date 1681739001246)
@@ -1,6 +1,7 @@
 from typing import Optional, Union

-from httpx._models import URL, Cookies, Headers, QueryParams, Request
+from httpx._models import URL, Cookies, Headers, Request
+from httpx._urls import QueryParams
 from httpx._types import (
     CookieTypes,
     HeaderTypes,
mkb79 commented 1 year ago

Thank you for this information.

QueryParams must be moved in httpx since v0.23.0. And CookieTypes and HeaderTypes in later release.

I will update this soon.

mkb79 commented 1 year ago

@Xebeth Your issue should now be fixed.