Skip to content

Remove dead json_clean / jsonutil module#1503

Open
erikgaas wants to merge 1 commit intoipython:mainfrom
erikgaas:remove-json-clean
Open

Remove dead json_clean / jsonutil module#1503
erikgaas wants to merge 1 commit intoipython:mainfrom
erikgaas:remove-json-clean

Conversation

@erikgaas
Copy link

@erikgaas erikgaas commented Mar 6, 2026

Summary

Some preliminary exploration trying to get more up to speed with the codebase.

json_clean() has been a no-op since jupyter_client >= 7 (released 2021). Since ipykernel now requires jupyter_client>=8.8.0, this code can never execute.

Changes

  • Remove ipykernel/jsonutil.py entirely
  • Remove all json_clean() call sites in kernelbase.py (7 calls + import)
  • Remove tests/test_jsonutil.py (all tests were already skipIf(jupyter_client >= 7))

No behavioral change — every removed json_clean() call was returning its input unchanged.

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

import math
Copy link
Author

Choose a reason for hiding this comment

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

unused imports

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.

1 participant