Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[mypyc] fix name generation for modules with similar full names#18001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 2 commits intopython:masterfromaatle:mypyc-module-name
Oct 21, 2024

Conversation

@aatle
Copy link
Contributor

Fixesmypyc/mypyc#1071
Adds a test to cover this case

Building certain package layouts now succeeds instead of failing. The behavior for all package layouts not affected by the error is unchanged.

Innamegen.make_module_translation_map(names), if argumentnames have"foo" and"foo.foo", all suffixes found for"foo" are also found for"foo.foo". This means that modulefoo has no unique suffixes, which currently causes anAssertionError.
The fix forces a module to take the last, fullest suffix if none are unique. It is guaranteed that no other module will also take the same suffix because they either will have a unique suffix to take, or they will take the fullest suffix for their name which is always going to be different.

P.S. 'suffix' or 'prefix'?

Copy link
Collaborator

@JukkaLJukkaL left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Looks good.

@JukkaLJukkaL merged commit5bae05d intopython:masterOct 21, 2024
@aatleaatle deleted the mypyc-module-name branchNovember 5, 2024 01:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@JukkaLJukkaLJukkaL approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AssertionError when building modules with similar names

2 participants

@aatle@JukkaL

[8]ページ先頭

©2009-2025 Movatter.jp