Skip to content

fix: add pkgutil.extend_path to namespace package init#11

Merged
aquemy merged 1 commit intomainfrom
fix/namespace-package-init
Jan 1, 2026
Merged

fix: add pkgutil.extend_path to namespace package init#11
aquemy merged 1 commit intomainfrom
fix/namespace-package-init

Conversation

@aquemy
Copy link
Member

@aquemy aquemy commented Jan 1, 2026

Summary

Fixes the hother namespace package to properly support multiple packages in the same namespace.

Changes

  • Update src/hother/__init__.py to include pkgutil.extend_path() call
  • This enables packages like hother.cancelable, hother.streamblocks, and hother.reactive_agent to coexist

Technical Details

Without pkgutil.extend_path(), only the last installed package in the hother namespace is accessible. This causes ModuleNotFoundError when trying to import other packages in the namespace.

Before:

# Namespace package marker for hother

After:

# Namespace package
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

Testing

  • All 592 tests pass with 100% coverage
  • Local testing confirms namespace packages work correctly after this fix

Impact

This is a critical fix for the hother namespace package ecosystem. It enables proper installation of multiple hother-* packages.

- Fix hother/__init__.py to properly support namespace packages
- Add pkgutil.extend_path() call required for multiple packages
- Enables other packages in hother namespace to be imported
@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@aquemy aquemy merged commit 4e8a7d4 into main Jan 1, 2026
5 checks passed
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.

1 participant