Skip to content
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

Fix Variables for python types with unexpected __qualname__ behavior #6364

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

petetronic
Copy link
Collaborator

@petetronic petetronic commented Feb 14, 2025

Addresses issue #6237

dfply.base.Intention has a bad implementation of __getattr__ which impacts calls to built-in attributes such as __qualname__. Instead of returning a str it incorrectly returns a new instance of Intention(). This breaks our inspection logic and stopped Variables from working once objects of this type were encountered.

This change adds some simple defensive code to the utility used by our Inspectors that summarize variables.

Added a simple unit test to cover this case.

Release Notes

New Features

  • N/A

Bug Fixes

QA Notes

Added a unit test to cover the general problem, but this fix covers the specific type mentioned in the customer issue.

from dfply import *

Addresses issue #6237

dfply.base.Intention has a bad implementation of __getattr__ which impacts
calls to built-in attributes such as __qualname__. Instead of returning
a str it incorrectly returns a new instance of Intention(). This breaks
our inspection logic and stopped Variables from working once objects of
this type were encountered.

This change adds some simple defensive code to the utility used by our
Inspectors that summarize variables.

Added a simple unit test to cover this case.
Copy link

github-actions bot commented Feb 14, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

isabelizimm
isabelizimm previously approved these changes Feb 14, 2025
Copy link
Contributor

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

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

one small change, but otherwise looks good! 🚀

@petetronic petetronic merged commit 84519f4 into main Feb 14, 2025
28 checks passed
@petetronic petetronic deleted the issue/6237 branch February 14, 2025 20:55
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variables pane does not refresh when variables are changed after from dfply import *
2 participants