From 31bcc3d083807801ab4fb96f48bd238580f6d5ce Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 21 Nov 2022 22:29:56 +0100 Subject: [PATCH 1/2] use a published version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f32708a8..52fba5d5 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ def get_templates(): "cryptography", "python-box", "xyzservices", - "planet==2.0a2", # this is a prerelease + "planet, "pyyaml", "dask", "tqdm", From 875c38b49f87f6265b2d1a9ec774fa9e1f158901 Mon Sep 17 00:00:00 2001 From: 12rambau Date: Sun, 11 Dec 2022 19:26:28 +0000 Subject: [PATCH 2/2] fix: drop use of Request from planet The method was removed from the lib between 2.0.a2 and 2.0.a6 --- sepal_ui/planetapi/planet_model.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sepal_ui/planetapi/planet_model.py b/sepal_ui/planetapi/planet_model.py index 1674a7f3..dc613c3c 100644 --- a/sepal_ui/planetapi/planet_model.py +++ b/sepal_ui/planetapi/planet_model.py @@ -7,7 +7,6 @@ from planet.auth import Auth from planet.exceptions import NoPermission from planet.http import Session -from planet.models import Request from traitlets import Bool, Dict from sepal_ui.message import ms @@ -112,10 +111,10 @@ def _is_active(self): def get_subscriptions(self): """load the user subscriptions and return empty list if nothing found""" - req = Request(self.SUBS_URL, method="GET") + req = self.session.request("GET", self.SUBS_URL) try: - response = asyncio.run(self.session.request(req)) + response = asyncio.run(req) if response.status_code == 200: return response.json()