From cacbe381e0a5848932ddbc8085180febe503e8ca Mon Sep 17 00:00:00 2001 From: Sigurd Pettersen Date: Wed, 6 Jan 2021 23:21:27 +0100 Subject: [PATCH 1/4] Updated CHANGELOG to reflect the already published release 0.2.5 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca5de444..84509fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] - YYYY-MM-DD +## [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 From eae83cd05679e86105143bb6309edca9a0772fa4 Mon Sep 17 00:00:00 2001 From: Sigurd Pettersen Date: Wed, 6 Jan 2021 23:44:30 +0100 Subject: [PATCH 2/4] Fixed import of TypedDict for older Python versions Check against Python version instead of using try-except during import. --- webviz_config/_plugin_abc.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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 From 2fb4b2b124a449cc97f235c89954caea9c53a155 Mon Sep 17 00:00:00 2001 From: Sigurd Pettersen Date: Thu, 7 Jan 2021 00:10:44 +0100 Subject: [PATCH 3/4] Updated changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84509fca..b983b8d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] - YYYY-MM-DD +### 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 From b6e440beee1dd1ffe08b89baac9053751dd3b2d4 Mon Sep 17 00:00:00 2001 From: Sigurd Pettersen Date: Thu, 7 Jan 2021 10:25:09 +0100 Subject: [PATCH 4/4] Updated changelog for 0.2.6 release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b983b8d9..b251d852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ 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.