When I run a Jupyter notebook without changing any code, it still shows a git diff if a newer Python version is used to run the notebook. This is due to the Python version being tracked in the notebook metadata.
To avoid these unnecessary diffs, I’d like to know:
Is it possible to prevent tracking the Python version in the notebook metadata?
Can the Python metadata be fixed to "version": 3" to help reduce clutter in the diffs?
The contents of the metadata is defined by the kernel which you are using, not by Jupyter applications themselves; in this particular case by ipykernel:
I do not find the version useful (but certianly there are many who do!) and codemirror_mode surely is some very outdated artifact of the past. It might be worth opening an issue on ipykernel to make inclusion of version configurable and maybe another one to clean up the unused metadata fields.