From 70ecaaca8c76a34aeb4eb0b133b6882609cd1663 Mon Sep 17 00:00:00 2001 From: Clay McGinnis Date: Thu, 28 May 2026 13:24:17 -0700 Subject: [PATCH] fix: stop shipping empty top-level wherobots/__init__.py (0.28.1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dbapi source tree contained an empty `wherobots/__init__.py`, which hatchling included in the built wheel. `wherobots-python-sdk` (the Jobs SDK) ships its own non-empty `wherobots/__init__.py` re-exporting `WherobotsJob`, `WherobotsConfig`, the enums, models, etc. When both wheels are installed into the same environment they fight over that file. Whichever wheel pip installs last wins. In the common case (`pip install wherobots-python-dbapi wherobots-python-sdk`) dbapi's empty file wins and `from wherobots import WherobotsJob` raises ImportError. `from wherobots.db import ...` keeps working in both orders because submodule imports bypass the parent `__init__.py`, so dbapi-only consumers are not affected — and neither is `airflow-providers-wherobots`, which only uses `wherobots.db.*`. Remove the empty file so `wherobots/` becomes a PEP 420 implicit namespace package from dbapi's side. The Jobs SDK's real `__init__.py` remains the canonical one whenever both packages are installed. Verified with three install orderings — dbapi first, sdk first, both in one command — that `from wherobots import WherobotsJob` and `from wherobots.db import connect, Region` succeed in all of them after this change. --- pyproject.toml | 2 +- uv.lock | 2 +- wherobots/__init__.py | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 wherobots/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 3d2aae3..78f7f2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "wherobots-python-dbapi" -version = "0.28.0" +version = "0.28.1" description = "Python DB-API driver for Wherobots DB" authors = [{ name = "Maxime Petazzoni", email = "max@wherobots.com" }] requires-python = ">=3.10, <4" diff --git a/uv.lock b/uv.lock index 2fe876e..1b9602a 100644 --- a/uv.lock +++ b/uv.lock @@ -1147,7 +1147,7 @@ wheels = [ [[package]] name = "wherobots-python-dbapi" -version = "0.28.0" +version = "0.28.1" source = { editable = "." } dependencies = [ { name = "cbor2" }, diff --git a/wherobots/__init__.py b/wherobots/__init__.py deleted file mode 100644 index e69de29..0000000