diff --git a/CHANGELOG.md b/CHANGELOG.md index ca5de444..b251d852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] - YYYY-MM-DD +## [0.2.6] - 2021-01-07 + +### Fixed +- [#373](https://github.com/equinor/webviz-config/pull/373) - Fix for import of TypedDict +in Python versions older than 3.8. Check against Python version instead of using try-except. + +## [0.2.5] - 2020-12-19 + ### Changed - [#367](https://github.com/equinor/webviz-config/pull/367) - Made type information -available to package consumers by indicating support for typing as specified in [PEP 561](https://www.python.org/dev/peps/pep-0561/). +available to package consumers by indicating support for typing as specified in +[PEP 561](https://www.python.org/dev/peps/pep-0561/). ## [0.2.4] - 2020-12-08 diff --git a/webviz_config/_plugin_abc.py b/webviz_config/_plugin_abc.py index 3570f78e..a118d344 100644 --- a/webviz_config/_plugin_abc.py +++ b/webviz_config/_plugin_abc.py @@ -3,18 +3,15 @@ import base64 import zipfile import warnings - +import sys from uuid import uuid4 from typing import List, Optional, Type, Union -try: - # Python 3.8+ - # pylint: disable=ungrouped-imports - from typing import TypedDict # type: ignore -except (ImportError, ModuleNotFoundError): - # Python < 3.8 - from typing_extensions import TypedDict # type: ignore - +# pylint: disable=wrong-import-position +if sys.version_info >= (3, 8): + from typing import TypedDict +else: + from typing_extensions import TypedDict import bleach from dash.development.base_component import Component