Add "ipykernel" to list of `co_filename`s to remove
{'login': 'gpucce', 'id': 32967787, 'node_id': 'MDQ6VXNlcjMyOTY3Nzg3', 'avatar_url': 'https://avatars.githubusercontent.com/u/32967787?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/gpucce', 'html_url': 'https://github.com/gpucce', 'followers_url': 'https://api.github.com/users/gpucce/followers', 'following_url': 'https://api.github.com/users/gpucce/following{/other_user}', 'gists_url': 'https://api.github.com/users/gpucce/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/gpucce/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/gpucce/subscriptions', 'organizations_url': 'https://api.github.com/users/gpucce/orgs', 'repos_url': 'https://api.github.com/users/gpucce/repos', 'events_url': 'https://api.github.com/users/gpucce/events{/privacy}', 'received_events_url': 'https://api.github.com/users/gpucce/received_events', 'type': 'User', 'site_admin': False}
[]
[]
I don't know how I could add some tests for this, although jupyter is not among the dependencies so at least that would need to be added. If someone can tell a recommended way I will try to do it! So testing by myself and looking around the jupyter codebase it looks like the `co_filename` of objects created within jupyter is of the form `f"{tempfile.tempdir}/ipykernel_{id1}/{id2}.py"` however I can't find the exact command setting it so I [asked in discourse](https://discourse.jupyter.org/t/co-filename-within-notebooks/16538). For now adapted the `co_filename` filter and added tests according to this I hope to get an answer and possibly fix based on that. Ok ! I think it's fine to just check if the parent folder is named like `ipykernel_*` then

see the source code of how it's created:

https://github.com/ipython/ipykernel/blob/7f73ff705510b35d1e2faad7f5a676c620ce08d4/ipykernel/compiler.py#L72-L75 Should look better now didn't notice the duplicated tests _The documentation is not available anymore as the PR was closed or merged._ Should work now on windows too I did the changes you suggested and tried to rebase, the first part went fine, the second less so :( 

If you have time to spare, can you tell me what should I do now to fix this? thanks Instead of rebasing you can just merge `main` into your branch, otherwise the GitHub preview of your PR shows changes of from `main`.

Feel free to close this PR and create a new one. Or alternatively your can force push to this PR with a new clean git history. I have force-pushed and merged main, only shows the right changes, if you can run CI one more time it should be ok now Hi, sorry I have been busy, the thing is I can't really understand why the test fail, besides the ugly thing I had done in the last commit to check if within CI smth stange happened with `os`, locally tests pass The CI wasn't passing when using the latest version `dill==0.3.6`. We have a separate function to dump CodeType objects for 0.3.6

I applied the same changes you did to this other function as well - it should be all good now > The CI wasn't passing when using the latest version `dill==0.3.6`. We have a separate function to dump CodeType objects for 0.3.6
> 
> I applied the same changes you did to this other function as well - it should be all good now

Thanks, it would have taken a long time to figure out :)
Should resolve #5157 
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/5169/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/5169', 'html_url': 'https://github.com/huggingface/datasets/pull/5169', 'diff_url': 'https://github.com/huggingface/datasets/pull/5169.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/5169.patch', 'merged_at': '2022-11-02T15:43:20Z'}