You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should print "$x" and not interpolates it. The same is true for things in {} like %pyinstrument print("hello {len('world')}") (%time print("hello {len('world')}") works as expected).
While I'm not sure why this happens, I think moving to the now officially supported way to do this ast_mod would fix it (at the very least a simple test shows ast_mod does not have this bug).
Would it be ok to make a PR to move to this, knowing it only works for IPython 8.15+ (release notes)? If not, maybe we can do a version check and newer IPython versions use this and older code falls back to what we have today as most users don't seem to have run into this.
The text was updated successfully, but these errors were encountered:
Hi,
We came across a bug in the jupyter magic (https://github.com/joerick/pyinstrument/blob/main/pyinstrument/magic/magic.py):
This should print "$x" and not interpolates it. The same is true for things in
{}
like%pyinstrument print("hello {len('world')}")
(%time print("hello {len('world')}")
works as expected).While I'm not sure why this happens, I think moving to the now officially supported way to do this ast_mod would fix it (at the very least a simple test shows ast_mod does not have this bug).
Would it be ok to make a PR to move to this, knowing it only works for IPython 8.15+ (release notes)? If not, maybe we can do a version check and newer IPython versions use this and older code falls back to what we have today as most users don't seem to have run into this.
The text was updated successfully, but these errors were encountered: