Skip to content

Import Literal from typing_extensions #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
Expand Down
5 changes: 4 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
2.1.1 (TBD)
2.1.1 (2023-07-20)

Changed:
- Version 2.1.0 was not compatible with Python 3.7 because of an import of
typing.Literal. It is now imported exclusively from typing_extensions and
Python 3.7, while EOL, will be supported for a while longer (#).
- The upper version pin for click has been removed. This project ignores type
errors involving click.command() and click.group() since 2.1.0 and does not
need to avoid click 8.1.4 or 8.1.5.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def coverage(session):
session.run('coverage', 'report')


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
def test(session):
session.run('python', '-m', 'ensurepip', '--upgrade')
session.install('-U', 'setuptools')
Expand Down
4 changes: 3 additions & 1 deletion planet/clients/subscriptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""Planet Subscriptions API Python client."""

import logging
from typing import AsyncIterator, Literal, Optional, Sequence
from typing import AsyncIterator, Optional, Sequence

from typing_extensions import Literal

from planet.exceptions import APIError, ClientError
from planet.http import Session
Expand Down
4 changes: 3 additions & 1 deletion planet/subscription_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# the License.
"""Functionality for preparing subscription requests."""
from datetime import datetime
from typing import Any, Dict, Optional, List, Literal, Mapping, Sequence
from typing import Any, Dict, Optional, List, Mapping, Sequence

from typing_extensions import Literal

from . import geojson, specs
from .exceptions import ClientError
Expand Down