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: Skip static partial method instrumentation #364

Closed
wants to merge 1 commit into from

Conversation

dustinbyrne
Copy link
Contributor

Previously, static partial methods would raise an exception: AttributeError: 'functools.partial' object has no attribute 'module'

Fixes #320

@kgilpin
Copy link
Contributor

kgilpin commented Jul 30, 2024

What does Navie say about this issue?

Previously, static partial methods would raise an exception:
AttributeError: 'functools.partial' object has no attribute '__module__'
@dustinbyrne dustinbyrne force-pushed the fix/static-partial-methods branch from eb1e527 to 8d1d2a5 Compare July 30, 2024 20:33
@apotterri
Copy link
Contributor

I'm currently working on a less-intrusive fix for this issue. I think I'd like to see how that pans out before we make these changes to importer.py.

I'll add the your test case to my changes and make sure it works with them. Thanks!

@dustinbyrne
Copy link
Contributor Author

dustinbyrne commented Jul 30, 2024

What does Navie say about this issue?

I used Navie for the basis of this fix. It wasn't able to solve the issue outright, as it turned out that actually replicating the issue was the difficult bit, but watching it try to solve it was enough for me to implement the fix. I didn't intend to pick this issue up, but I used it as a test bed for something else and ultimately got far enough that I figured I should finish it.

Logs are here:
https://gist.github.com/dustinbyrne/26a1a26fa79ac6f4292ca3ab4afb2abd

@kgilpin
Copy link
Contributor

kgilpin commented Jul 30, 2024

I guess we need Navie to summarize these chats :-)

@dustinbyrne dustinbyrne closed this Aug 2, 2024
@dustinbyrne dustinbyrne deleted the fix/static-partial-methods branch August 2, 2024 14:13
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.

'functools.partial' objects used as static methods cause crash
3 participants