Skip to content

Commit 2bbbba3

Browse files
committed
Update version to 0.2.4 and implement fallback for __getattr__ in iris_ep module
1 parent 169b001 commit 2bbbba3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

iris_ep.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
try:
33
from iris_embedded_python import __getattr__
44
except ImportError:
5-
pass
5+
def __getattr__(name):
6+
if name in ['cls', 'sql']:
7+
logging.warning(f"Class or module '{name}' not found in iris_embedded_python. Returning a mock object. Make sure you local installation is correct.")
8+
from unittest.mock import MagicMock
9+
return MagicMock()
10+
else:
11+
return []

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
33

44
[project]
55
name = "iris-embedded-python-wrapper"
6-
version = "0.2.3"
6+
version = "0.2.4"
77
description = "Wrapper for embedded python on InterSystems IRIS"
88
readme = "README.md"
99
authors = [

0 commit comments

Comments
 (0)