Skip to content

refactor(rename): rename import package from messaging to messagekit#1

Merged
firstunicorn merged 1 commit into
masterfrom
rename/messagekit
Apr 19, 2026
Merged

refactor(rename): rename import package from messaging to messagekit#1
firstunicorn merged 1 commit into
masterfrom
rename/messagekit

Conversation

@firstunicorn

Copy link
Copy Markdown
Owner

Summary

  • Rename Python import package from messaging to messagekit and PyPI distribution from python-eventing to messagekit
  • Achieves PEP 423 compliance: distribution name = import name
  • Updates 205 files: source directory, all imports, configs, docs

Verification

  • ruff check: all passed
  • mypy: no issues in 121 source files
  • lint-imports: 1 contract kept, 0 broken
  • pytest: 228/228 passed, 84.93% coverage (above 80% threshold)
  • Serena MCP: zero orphaned messaging references in .py files

Not modified (intentional)

  • .specstory/ - dialogue history
  • memories/ - AI lessons
  • GitHub workflow YML files - no direct messaging references
  • GitHub URLs - repo rename is separate task

## Starting point: PEP 423 violation

The library used `python-eventing` as distribution name but `messaging` as
import package name. This violates PEP 423's recommendation that distribution
and import names should match. The mismatch caused recurring confusion in
documentation and onboarding.

## Changes

### Package rename
- Renamed `src/messaging/` directory to `src/messagekit/` via git mv
- Updated all Python imports across 146+ files in src/, tests/, scripts/
- Fixed @patch() string targets that reference module paths

### Distribution name (pyproject.toml)
- `name = "python-eventing"` -> `name = "messagekit"`
- `packages = [{include = "messaging"}]` -> `include = "messagekit"`
- Updated `known_first_party` for deptry and isort
- Updated all coverage threshold paths

### Configuration files
- setup.cfg: all per-file-ignores paths
- .importlinter: root_package and layer references
- docs/source/conf.py: autoapi_dirs path
- .vulture-whitelist.py: comment paths

### Documentation
- README.md: install commands, import examples, naming explanation,
  comparison table, architecture diagrams
- 12 docs/*.md files: import paths, file references, prose

## Result

Distribution name and import name are now both `messagekit`, achieving
PEP 423 compliance. All linters pass (ruff, mypy, lint-imports). Full
test suite passes (228/228). GitHub URLs unchanged (repo rename separate).
@firstunicorn firstunicorn marked this pull request as ready for review April 19, 2026 16:04
@firstunicorn firstunicorn merged commit 1fc2be9 into master Apr 19, 2026
6 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