feat: add MODULE_NAME keyword to cython_transpile#92
Merged
Conversation
henryiii
marked this pull request as ready for review
July 9, 2026 21:43
Without it, Cython derives the module's dotted name from the filename and can only qualify it with the containing package if it can walk __init__ files from the source location, which isn't always possible (e.g. generated .pyx files outside the package tree). This affects __module__, pickling, and error messages. A first-class MODULE_NAME keyword forwards --module-name to the cython CLI. Assisted-by: ClaudeCode:claude-sonnet-5
henryiii
force-pushed
the
feat/module-name
branch
from
July 10, 2026 16:45
1bc62b2 to
df7e943
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖 AI text below 🤖
Adds a
MODULE_NAMEkeyword tocython_transpile()that forwards--module-nameto the Cython CLI. Without it, Cython derives the module's dotted name from the filename and can only qualify it with the containing package if it can walk__init__files from the source location — not always possible (e.g. a.pyxgenerated outside the package tree), which affects__module__, pickling, and error messages.The
multiple_packagestest fixture'spackage3case (previously passing--module-nameviaCYTHON_ARGS) now usesMODULE_NAMEdirectly, and the test asserts the generated.ccontains the fully-qualified name.Addresses item 2 of the first comment on #84.