Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@scottschreckengaust
Copy link
Member

@scottschreckengaust scottschreckengaust commented Dec 26, 2025

Summary

Namespace package configuration for PEP420.

Changes

Added this line to all the src/**/awslabs/__init__.py files:

__path__ = __import__('pkgutil').extend_path(__path__, __name__)`

Without this configuration, test suites fail and build issues occur because Python cannot properly resolve which package owns the 'awslabs' namespace.

The extend_path() function implements PEP 420 namespace packages, allowing multiple distributions to contribute modules to the same namespace. This ensures that:

  1. Both source and sibling servers can coexist in the same Python environment
  2. Import statements like 'from awslabs.OMEGA_mcp_server import ...' work correctly
  3. Test discovery and execution functions properly across both packages
  4. Build processes complete successfully without namespace collision errors

This is the standard solution for namespace packages in Python and is required for proper multi-package namespace support in the awslabs ecosystem.

Please provide a summary of what's being changed

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N)

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Signed-off-by: Scott Schreckengaust <[email protected]>
@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.54%. Comparing base (71a9597) to head (ceaf1b9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2005   +/-   ##
=======================================
  Coverage   90.53%   90.54%           
=======================================
  Files         861      919   +58     
  Lines       64686    64744   +58     
  Branches    10407    10407           
=======================================
+ Hits        58566    58624   +58     
  Misses       3784     3784           
  Partials     2336     2336           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@scottschreckengaust scottschreckengaust self-assigned this Dec 26, 2025
@scottschreckengaust scottschreckengaust added the ready-for-merge Folks believe this is ready to merge label Dec 26, 2025
@scottschreckengaust scottschreckengaust moved this from To triage to In review in awslabs/mcp Project Dec 26, 2025
@scottschreckengaust scottschreckengaust added this pull request to the merge queue Dec 27, 2025
Merged via the queue into main with commit 2bf7c83 Dec 27, 2025
235 checks passed
@scottschreckengaust scottschreckengaust deleted the fix/init-file branch December 27, 2025 00:14
@github-project-automation github-project-automation bot moved this from In review to Done in awslabs/mcp Project Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge Folks believe this is ready to merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants