Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add option to hide native kernel sources#18155

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
arjxn-py wants to merge8 commits intojupyterlab:main
base:main
Choose a base branch
Loading
fromarjxn-py:hide-native-kernel-sources

Conversation

@arjxn-py
Copy link
Member

@arjxn-pyarjxn-py commentedNov 26, 2025
edited
Loading

References

xref:#18077 (comment) &#18077 (comment)

This PR introduces a new boolean setting,hideFilteredKernelSources, that controls whether filtered kernel sources are hidden automatically in the Kernel Sources panel.

Code changes

User-facing changes

Screen.Recording.2025-11-27.at.15.13.43.mp4

Backwards-incompatible changes

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch onbinder, follow this link:Binder

Co-authored-by: Darshan Poudel <pranishpoudel10@gmail.com>
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if storing all these kernel sources like this is ideal.
What do you think,@krassowski@martinRenou ?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. I suggested in#18077 (comment) to make a JEP for it.

A hardcoded list is the only thing we can do for now.

Copy link
Member

Choose a reason for hiding this comment

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

How was it generated? I guess a python script? Could JupyterLab run this script at build time or startup time to populate this json file from the actual kernel version available since we have a dependency on ipykernel anyways? Or if not, why is it a bad idea?

Copy link
Member

@martinRenoumartinRenouDec 12, 2025
edited
Loading

Choose a reason for hiding this comment

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

Arjun generated this from the value ofsys.modules right after booting the kernel in both ipykernel and xeus-python, and merged the results.

I'm not sure I have an opinion about generating that list at build time using ipykernel, on one side it would make xeus-python behave a bit differently as we would see the xeus-python Python sources listed, but that's probably not too bad.

Also to note that it's unlikely that this lists get outdated on a fast occurrence.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, fine to keep as-is then, if this would take more time then I think the time is better spent prepping the JEP.

martinRenou reacted with thumbs up emoji
.compositeasboolean;

if(hide){
service.model.kernelSources.hiddenSources=filtersData;
Copy link
Contributor

@brichetbrichetDec 9, 2025
edited
Loading

Choose a reason for hiding this comment

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

Maybe this is implementation details, sorry if it is the case 😄, but I think that there is no need for settings the list of hidden sources from here.

The list of "native kernel sources" is (and will be) always static: currently it comes from a JSON file, and (maybe after a JEP), it will come from the debugger service. In any case, it should not change after initialisation.
When it will come from the debugger service, this statement will be removed, because the list will not be fetched from here, as far as I understand.

IMO, we should only set a flag here (e.g.hideNativeKernelSource), and set the list of native kernel source in the constructor of the model.

arjxn-py reacted with heart emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks for the comprehensive review@brichet, I'll update this today

Copy link
Member

Choose a reason for hiding this comment

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

I think this was not updated yet, right?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Sorry for the delay I pushed a refactor in8bda2a2

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@krassowskikrassowskikrassowski left review comments

@brichetbrichetbrichet left review comments

@Darshan808Darshan808Darshan808 left review comments

+1 more reviewer

@martinRenoumartinRenoumartinRenou left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@arjxn-pyarjxn-py

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@arjxn-py@krassowski@martinRenou@brichet@Darshan808

[8]ページ先頭

©2009-2025 Movatter.jp