Skip to content

fix: support _elsdk_.py filename in intersystems-irispython >= 3.4#60

Open
isc-tdyar wants to merge 13 commits intointersystems-community:mainfrom
isc-tdyar:fix/elsdk-filename-compatibility
Open

fix: support _elsdk_.py filename in intersystems-irispython >= 3.4#60
isc-tdyar wants to merge 13 commits intointersystems-community:mainfrom
isc-tdyar:fix/elsdk-filename-compatibility

Conversation

@isc-tdyar
Copy link
Copy Markdown
Contributor

Problem

`_get_iris_dbapi_module()` searches for `_init_elsdk.py` when manually loading the DBAPI shim. In newer builds of intersystems-irispython (current macOS and Linux packages from containers.intersystems.com), the shim was renamed to `elsdk.py`.

The search loop finds nothing, `connect()` is never injected, and all DBAPI connections return `None`:
```
iris module imported but connect() method not found!
Available attributes: ['current_dir', 'file_name_elsdk', 'os']
_init_elsdk.py not found in any search paths
IRIS connection utility returned None
```

Fix

Check both filenames in the inner search loop. First hit wins. One extra `for` loop, no other changes.

Workaround for users on existing installs

```bash
IRIS_PKG=$(python3 -c "import iris,os; print(os.path.dirname(iris.file))")
ln -sf "$IRIS_PKG/elsdk.py" "$IRIS_PKG/_init_elsdk.py"
```

Tested

  • Python 3.14.3 (Homebrew macOS arm64)
  • intersystems-irispython current (containers.intersystems.com image)
  • iris-vector-rag 0.5.15

tom-dyar and others added 13 commits December 25, 2025 14:20
…ity/feature/llm-cache-and-evaluation

LLM Caching, Connection Hardening, and Evaluation Framework (v0.5.15)
iris_dbapi_connector searched only for _init_elsdk.py when manually
loading the DBAPI shim into the iris module namespace. In newer builds
of intersystems-irispython (and current macOS/Linux packages from
containers.intersystems.com), the shim was renamed to _elsdk_.py.

The search loop found nothing, connect() was never injected, and all
DBAPI connections returned None with the log message:
  _init_elsdk.py not found in any search paths

Fix: check both filenames in the search loop. First hit wins.

Workaround for users on existing installs:
  IRIS_PKG=$(python3 -c "import iris,os; print(os.path.dirname(iris.__file__))")
  ln -sf "$IRIS_PKG/_elsdk_.py" "$IRIS_PKG/_init_elsdk.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants