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

PR: Use an outstream with isatty() equal to True #305

Merged
merged 9 commits into from
Jul 28, 2021

Conversation

eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Jul 25, 2021

This PR is work to enable colored output (by default) in the Spyder console. See spyder-ide/spyder#1917, Textualize/rich#1221, ipython/ipykernel#683

Fixes #302

It adds traitlets as a new requirement, but since ipykernel already has this as a requirement this should have little impact.

@ccordoba12

@eendebakpt eendebakpt changed the title Make the SpyderKernel use an outstream with isatty()=True [WIP] Make the SpyderKernel use an outstream with isatty()=True Jul 25, 2021
@real-yfprojects
Copy link
Contributor

real-yfprojects commented Jul 26, 2021

It adds traitlets as a new requirement, but since ipykernel already has this as a requirement this should have little impact.

Interestingly the edited file already imports and uses traitlets directly, i don't know why it isn't included in requirements already, but using traitlets is therefore not a problem in this regard.

from traitlets.config.loader import Config, load_pyconfig_files

Besides that I would approve this PR.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Hey @eendebakpt, thanks for your help with this! I left an initial review for you.

setup.py Outdated Show resolved Hide resolved
spyder_kernels/console/outstream.py Outdated Show resolved Hide resolved
spyder_kernels/console/outstream.py Outdated Show resolved Hide resolved
spyder_kernels/console/start.py Outdated Show resolved Hide resolved
@eendebakpt eendebakpt changed the title [WIP] Make the SpyderKernel use an outstream with isatty()=True Make the SpyderKernel use an outstream with isatty()=True Jul 27, 2021
@eendebakpt
Copy link
Contributor Author

@ccordoba12 Thanks for the feedback. I addressed the comments.

@ccordoba12 ccordoba12 added this to the v2.1.0 milestone Jul 28, 2021
@ccordoba12 ccordoba12 changed the title Make the SpyderKernel use an outstream with isatty()=True PR: Use an outstream with isatty() equal to True Jul 28, 2021
@ccordoba12 ccordoba12 changed the base branch from master to 2.x July 28, 2021 02:41
@ccordoba12 ccordoba12 changed the base branch from 2.x to master July 28, 2021 02:42
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Hey @eendebakpt, I think this is almost ready! Besides the comment I left for you below, please make your branch to derive from our 2.x branch (instead of master), with the following commands:

git checkout 2.x
git checkout feat/isatty
git rebase --onto 2.x master feat/isatty
git push -f origin feat/isatty

That will allow me to include this feature in our next version of Spyder-kernels.

spyder_kernels/console/start.py Outdated Show resolved Hide resolved
eendebakpt and others added 7 commits July 28, 2021 09:59
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
@eendebakpt eendebakpt changed the base branch from master to 2.x July 28, 2021 08:06
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks for your help @eendebakpt!

@ccordoba12 ccordoba12 merged commit 4502e49 into spyder-ide:2.x Jul 28, 2021
ccordoba12 added a commit that referenced this pull request Jul 28, 2021
@eendebakpt eendebakpt deleted the feat/isatty branch July 28, 2021 19:05
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.

Add option to use custom Outstream in kernel app
3 participants