-
Notifications
You must be signed in to change notification settings - Fork 98
fix: local struct shadows included module #324
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@aisk not sure if you are the current maintainer but I see you have the most commits in the last half year so please take a look when you can 🙏 |
|
Friendly bump - @cocolato tagging you as well since I see some recent activity from you. Some initial direction to this PR or the underlying issue would be great! |
|
thriftpy2/thriftpy2/parser/parser.py Lines 82 to 84 in 8e82f1c
thriftpy2/thriftpy2/parser/parser.py Lines 244 to 248 in 8e82f1c
p_seen_struct method overwrites the contents of the originally imported module via setattr. Although the current fix resolves this issue, I suggest using a prefix with setattr to better distinguish between the imported module and the struct. @aisk please take a look.
|
Thank you for reviewing! You're correct that The current fix preserves backward compatibility by using the already-available If you'd prefer a different approach, I'm happy to adjust, but I believe this is the least disruptive fix for users. Caveat - I am obviously very new to this project so it is possible I missed something in your recommendation. At the end of the day, any approach that fixes #323, either with this PR or a different PR, would be fine for me. |
aisk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to mark this as pending further discussion. Since we don’t have a mechanism to put a PR on hold, I’ve set it to Request Changes instead.
fixes: #323