You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add empty init.py to model/ and mcp_client/ directories across all 6 Python framework templates, ensuring imports work correctly regardless of working directory or packaging method.
/strands review this PR and make sure that we are not missing anything. Don't make any changes. Look to see if we are missing these things anywhere else.
I think we are also missing __init__.py in one other subpackage. The src/assets/python/strands/capabilities/memory/ has no __init__.py. This directory contains session.py, and the strands main.py template imports it as:
from memory.session import get_memory_session_manager
Template Rendering Logic: The BaseRenderer.ts (lines 55-59) copies the capabilities/memory/ directory to memory/ in the project root when hasMemory=true
Import Dependency: The strands/base/main.py (line 6) contains:
I think we are also missing __init__.py in one other subpackage. The src/assets/python/strands/capabilities/memory/ has no __init__.py. This directory contains session.py, and the strands main.py template imports it as:
from memory.session import get_memory_session_manager
Thanks for catching this @aidandaly24 I addressed this in the following commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add empty init.py to model/ and mcp_client/ directories across all 6 Python framework templates, ensuring imports work correctly regardless of working directory or packaging method.
Related Issue
Closes #335
Documentation PR
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.