-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Initial traceback setup to use selected syntax style (IPython Console) #22965
Conversation
Yep, I was thinking exactly the same. You should be able to use the That approach has the great advantage of being backwards compatible because the corresponding handler in spyder-kernels ( Also, since this requires the verbose traceback mode, you need to change that in the kernel too, specifically here: And you also probably need to update the code that allows to click on a traceback filename to open it in the editor due to that. |
Note: Could it be that this will also end up fixing #1052 ? |
Yep, it will! 🎉 |
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "75ebcac30" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "75ebcac30" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "589c471ae" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "589c471ae" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
Thanks @dalthviz for your work on this! A couple of quick comments:
|
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "f3211825d" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "f3211825d" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "d9e7bad05" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "d9e7bad05" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "6939c42df" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "6939c42df" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "753558ad1" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "753558ad1" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "07b9ca3e8" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "07b9ca3e8" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
|
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "db71627b9" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "db71627b9" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
--branch=spyder_22965 --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "20f181681" upstream: origin: "https://github.com/dalthviz/spyder-kernels.git" branch: "spyder_22965" commit: "20f181681" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
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.
One last tiny comment for you @dalthviz, the rest looks good to me.
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
…r-kernels.git --branch=master --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "07f24b6fd" upstream: origin: "https://github.com/spyder-ide/spyder-kernels.git" branch: "master" commit: "07f24b6fd" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
Note: Failing tests jobs (linux fast) seem like are being caused due to python/pythondotorg#2663 🤔 |
Ok, so we'll have to wait until that issue is solved. In the meantime, please remove your two last commits. |
And things seem to be working again, so we should be fine now. |
8eb22b8
to
6378f5c
Compare
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.
Great work, thanks @dalthviz!
@dalthviz, please open a follow-up PR to remove the As we discussed, that's necessary to not have repeated code in two places and it'll be included in 6.1 only. |
…up to use selected syntax style (IPython Console))
Backport PR #22965 on branch 6.x (PR: Initial traceback setup to use selected syntax style (IPython Console))
Description of Changes
Enable context mode tracebacks to follow currently selected syntax style. A preview:
Issue(s) Resolved
Fixes #22412
Fixes #1052
Notes
Probably the logic here to set the syntax style via the import of theVerboseTB
class and set the exception handler toverbose
(xmode
magic) should go overspyder-kernels
and be added as a kernel comm handler method? What do you think @ccordoba12 ?Requires changes over spyder-kernels: spyder-ide/spyder-kernels#521
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: dalthviz