planetlabs / planet-client-python

Python client for Planet APIs
https://planet-sdk-for-python-v2.readthedocs.io/en/latest/
Apache License 2.0
271 stars 91 forks source link

using CLI errors out for version 2.1.x #996

Closed jreiberkyle closed 1 year ago

jreiberkyle commented 1 year ago

Expected behavior on the latest version of the planet package (2.1.x), planet results in the CLI help being displayed

Actual behavior (describe the problem) planet results in the following traceback

Traceback (most recent call last):
  File "/Users/jennifer.kyle/.pyenv/versions/planet-client-python-3.7.9/bin/planet", line 5, in <module>
    from planet.cli.cli import main
  File "/Users/jennifer.kyle/.pyenv/versions/planet-client-python-3.7.9/lib/python3.7/site-packages/planet/__init__.py", line 16, in <module>
    from . import data_filter, order_request, reporting, subscription_request
  File "/Users/jennifer.kyle/.pyenv/versions/planet-client-python-3.7.9/lib/python3.7/site-packages/planet/subscription_request.py", line 16, in <module>
    from typing import Any, Dict, Optional, List, Literal, Mapping, Sequence
ImportError: cannot import name 'Literal' from 'typing' (/Users/jennifer.kyle/.pyenv/versions/3.7.9/lib/python3.7/typing.py)

Workaround pin install to 2.0.x with pip install planet==2.0

Installation Method pip install planet and pip install -e . run from repo root dir result in the same behavior.

jreiberkyle commented 1 year ago

maybe this boils down to changing the min version of python for the package at https://github.com/planetlabs/planet-client-python/blob/74e8b77af6c9c33b7a8dc85f57eacfe226eb6b63/setup.py#L79

nvm, looks like with #998 3.7 support will be restored