Closed frankenjoe closed 3 years ago
Merging #23 (df8541f) into master (dc747b5) will not change coverage. The diff coverage is
100.0%
.
Impacted Files | Coverage Δ | |
---|---|---|
audobject/core/resolver.py | 100.0% <100.0%> (ø) |
Do you know where user defined functions have the source code stored? So basically where is inspect
looking for it?
I'm asking, because at the moment we need to first check for __source__
and if that does not exist call inspect
. If we could store the source code at the correct position it wouldn't be necessary. Or does inspect
really path files to find the source code?
Do you know where user defined functions have the source code stored?
They don't store it, so we only have the byte code, that's why we need to attach the source code to it.
Or does
inspect
really path files to find the source code?
Yes, as far as I understood it, inspect
really looks at the source file. But since we don't have a source file for dynamically generated functions it fails.
OK, thanks, then I guess we have to go indeed with the proposed hack here ;)
Closes #22
To solve #22 we attach the source code of a dynamically created function to it.