Skip to content

Fix Python namespace package imports#159

Merged
hardbyte merged 4 commits into
mainfrom
brian/issue-158-python-parent-imports
May 22, 2026
Merged

Fix Python namespace package imports#159
hardbyte merged 4 commits into
mainfrom
brian/issue-158-python-parent-imports

Conversation

@hardbyte
Copy link
Copy Markdown
Contributor

Summary

  • import and bind parent Python packages whenever generated child modules reference parent-qualified types
  • add deferred same-root sibling placeholders plus intermediate package binding for deep namespace imports
  • sanitize generated Python class names for invalid namespace characters and avoid stdlib sys shadowing
  • clean stale generated files from CLI directory outputs via a generated-file manifest

Validation

Add regressions for parent namespace references, sanitized class names, and sys root namespaces. Also teach CLI directory output to remove stale generated files using a generated-file manifest while preserving non-generated user files.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

📖 Documentation Preview: https://reflectapi-docs-preview-pr-159.partly.workers.dev

Updated automatically from commit 1cbc381

Commit the remaining stale generated files removed by CLI cleanup and add the generated-file manifest expected by the Python codegen smoke test.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c91703e98

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread reflectapi-cli/src/main.rs Outdated
hardbyte added 2 commits May 22, 2026 10:57
Avoid following directory symlinks during legacy generated-file discovery and cover the behavior with a Python output-path regression test.
@hardbyte hardbyte merged commit 3c49389 into main May 22, 2026
6 checks passed
@hardbyte hardbyte deleted the brian/issue-158-python-parent-imports branch May 22, 2026 01:24
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