From 3e2c81f371745198efd1a4da42b85b325130e45c Mon Sep 17 00:00:00 2001 From: Brian Kohan Date: Sat, 6 May 2023 11:13:45 -0700 Subject: [PATCH] closes #47 --- doc/requirements.txt | 2 +- doc/source/changelog.rst | 5 +++++ enum_properties/__init__.py | 4 ++-- pyproject.toml | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 67b1ae0..8e904da 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -6,4 +6,4 @@ sphinxcontrib-htmlhelp==2.0.1; python_version >= "3.5" sphinxcontrib-jsmath==1.0.1; python_version >= "3.5" sphinxcontrib-qthelp==1.0.3; python_version >= "3.5" sphinxcontrib-serializinghtml==1.1.5; python_version >= "3.5" -enum-properties==1.5.1 +enum-properties==1.5.2 diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index ccfce4e..8279bb7 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -2,6 +2,11 @@ Change Log ========== +v1.5.2 +====== + +* Fixed `_missing_ allows exceptions through that are not ValueError, TypeError or KeyError `_ + v1.5.1 ====== diff --git a/enum_properties/__init__.py b/enum_properties/__init__.py index 562f6fd..f8b6fbb 100644 --- a/enum_properties/__init__.py +++ b/enum_properties/__init__.py @@ -31,7 +31,7 @@ cached_property = property # pylint: disable=C0103 -VERSION = (1, 5, 1) +VERSION = (1, 5, 2) __title__ = 'Enum Properties' __version__ = '.'.join(str(i) for i in VERSION) @@ -235,7 +235,7 @@ def _missing_(cls, value): # pylint: disable=R0911 if isinstance(val, str): return cls._ep_isymmetric_map_[_do_casenorm(val)] - except (KeyError, TypeError, ValueError): + except Exception: # pylint: disable=W0703 pass return super()._missing_(value) diff --git a/pyproject.toml b/pyproject.toml index fb0efc2..8bf1967 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "enum-properties" -version = "1.5.1" +version = "1.5.2" description = "Add properties and method specializations to Python enumeration values with a simple declarative syntax." authors = ["Brian Kohan "] license = "MIT"