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

Don't hide .so files by default #1457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nokados
Copy link

@nokados nokados commented Sep 1, 2024

It's confusing that the .so files are hidden. They appear, for example, when compiling Python code, and it becomes unclear that the compiled files will be executed because Jupyter gives the impression that they don't exist. There is an issue on GitHub and a question on Stack Overflow.

This PR removes .so files from the default list.

@vidartf
Copy link
Member

vidartf commented Jan 30, 2025

For context, I see this was added here (260afd7, PR: ipython/ipython#5938) back in 2014 . I can't see any direct motivation for it in the commit message or PR. I'm not sure if Min has any obvious historical context?

@minrk
Copy link
Contributor

minrk commented Feb 3, 2025

I'm not sure if Min has any obvious historical context?

It's very old, but I think it was just to hide obviously-not-openable files that are common in Python (e.g. compiled modules). I don't have a strong opinion and don't feel any great need to keep this. Expectations for JupyterLab are very different than for notebook UI in the olden days. .so should definitely be treated the same as .dylib, though, as they are the same file type for different platforms.

@krassowski
Copy link
Collaborator

I guess this backs to pre-Jupyter days when IPython did not support C++ kernels?

@minrk
Copy link
Contributor

minrk commented Feb 3, 2025

I don't think kernels are necessarily relevant, since it's about the UI - you can't open/edit .so files, so why show them (originally, we only listed notebooks when that was the only file we could open, but that hasn't been true for ages). But either way in a JupyterLab IDE-like experience, it's probably more expected to see most files, even if you can't open them.

@krassowski
Copy link
Collaborator

I think they are relevant in the sense that C++ kernel is a valid use case of Jupyter, and if you are teaching a lesson on compilers/C you may want the .so files to show up.

Also, there is a hex editor for JupyterLab/Notebook e.g. https://github.com/ericsnekbytes/hexlab

@minrk
Copy link
Contributor

minrk commented Feb 3, 2025

Yeah, that makes sense. It also makes sense to see .so files if you are teaching Cython, etc. I'm +1 on this change, I just think it should just include .dylib, too.

@@ -126,7 +126,6 @@ def _notary_default(self):
"*.pyc",
"*.pyo",
".DS_Store",
"*.so",
"*.dylib",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"*.dylib",

Suggesting this change as per #1457 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants