Skip to content

Remove orphaned _process_win32_controller module#15258

Open
Carreau wants to merge 9 commits into
mainfrom
claude/affectionate-euler-l5l0ff
Open

Remove orphaned _process_win32_controller module#15258
Carreau wants to merge 9 commits into
mainfrom
claude/affectionate-euler-l5l0ff

Conversation

@Carreau

@Carreau Carreau commented Jun 13, 2026

Copy link
Copy Markdown
Member

This Windows backend (~574 lines) has not been wired into any code path
for years: the only reference was a commented-out import in
_process_win32.py, and it was already excluded from mypy and pytest
collection. The active Windows path is _process_win32.system() via
process_handler.

Remove the module, the dead commented-out import, and its now-stale
mypy-exclude and pytest --ignore entries.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8

claude added 9 commits June 13, 2026 12:06
This Windows backend (~574 lines) has not been wired into any code path
for years: the only reference was a commented-out import in
_process_win32.py, and it was already excluded from mypy and pytest
collection. The active Windows path is _process_win32.system() via
process_handler.

Remove the module, the dead commented-out import, and its now-stale
mypy-exclude and pytest --ignore entries.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
None of these are exported (not in any __all__) or referenced anywhere
in the package, tests, docs, or examples:

- utils/text.py: _col_chunks, _find_optimal, _get_or_default -- leftovers
  of the old columnize() implementation that no longer exists (drop the
  now-unused Dict/TypeVar imports too).
- utils/frame.py: extract_vars, extract_vars_above, debugx.
- core/display.py: _webpxy -- a WEBP-header reader that was never wired
  into Image._retina_shape() (which only branches on PNG/JPEG/GIF).
- extensions/autoreload.py: StrongRef -- module only uses weakref.ref.
- terminal/embed.py: _Sentinel -- unused, and its __repr__ returned the
  builtin repr rather than self.repr, proving it was never exercised.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
Drop ~50 dead module-level imports flagged by `ruff check --select F401`
across implementation modules (e.g. a large stale `from ast import ...`
block in magics/execution.py, and unused typing/stdlib imports in
ultratb.py, text.py, io.py, and others).

Re-export facades were deliberately left untouched: utils/process.py, the
`.capture` re-exports in utils/io.py (relied on by the test suite), the
testing decorator re-exports, and the package __init__ re-exports.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
Delete four unreferenced scripts (no CI, docs, Makefile, or pre-commit
reference any of them):

- check_sources.py: ImportErrors on the first line -- it imports the
  long-removed IPython.external.path. Its tab/CR checks are now handled
  by pre-commit and .editorconfig.
- testupload: Python-2-era helper (from __future__, execfile) that scp'd
  releases to the retired archive.ipython.org host; superseded by PyPI
  trusted publishing.
- make_tarball.py: git-archive tarball builder superseded by
  `python -m build` + retar.py.
- autoformat_file: one-off pyupgrade/black --target py36 migration helper;
  its job is long done and recorded in .git-blame-ignore-revs.

Also drop the now-unused archive_* SSH constants and the execfile() shim
from toollib.py (only testupload used them); build_release still uses
sh/cd/get_ipdir/build_command.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
- pyproject.toml: drop nine pytest `--ignore` entries that point at files
  removed long ago (IPython/html/widgets/*, IPython/terminal/console.py,
  IPython/utils/daemonize.py, IPython/kernel, IPython/consoleapp.py,
  IPython/lib/kernel.py, IPython/utils/signatures.py,
  IPython/utils/version.py), and the matching `IPython.utils.version`
  mypy override for a module that no longer exists.
- setup.cfg: remove the [velin] section -- velin is not used anywhere in
  CI, pre-commit, or docs.
- setup.py: drop the obsolete 2017-era pip-version probe (pip >= 9.0.1)
  from the Python-version guard, and remove the unused bdist_rpm branch.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
Source files default to UTF-8 since Python 3 (PEP 3120), so the
`# -*- coding: utf-8 -*-` / `# encoding: utf-8` magic comments are no-ops.
Strip them from the 51 package modules that still carried one (the
generated core/latex_symbols.py and its generator tools/gen_latex_symbols.py
are updated together to stay consistent).

Also fix two docstrings that documented a parameter type as `basestring`
(a Python 2 builtin that no longer exists) -> `str`; in text.py the
docstring even contradicted the function's own `str` signature.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
These modules have no internal consumers and only exist as compatibility
redirects:

- utils/eventful.py, utils/log.py: one-line re-export shims that warn and
  `from traitlets.{eventful,log} import *`.
- utils/jsonutil.py: re-export shim to jupyter_client.jsonutil, which is
  not even a dependency of IPython -- importing it already failed in a
  base install.
- utils/_process_cli.py: the IronPython (sys.platform == 'cli') process
  backend. IronPython has no Python 3.11 support, so the branch selecting
  it in process.py was unreachable. Drop the module and the 'cli' branch.

Also drop the corresponding pytest --ignore and mypy override entries.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
The vendored pickleshare copy carried Python-2 import shims that are dead
on Python 3.11+: the `collections.abc`->`collections` and
`cPickle`->`pickle` try/except fallbacks (the except branches can never
run), plus an unused `sys` import. Replace them with the direct imports.

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
Correct user-facing docs that pointed at modules, paths, and APIs which
have moved or been removed (each verified against the current tree):

- config/eventloops.rst: the kernel event-loop integration guide used
  IPython.kernel.zmq.* paths; that code lives in ipykernel now (the
  sibling wrapperkernels.rst already uses ipykernel). Update the
  :meth:/:func:/:mod: targets and the "included in IPython" prose.
- interactive/reference.rst: fix the removed IPython.frontend.terminal.embed
  cross-reference (-> IPython.terminal.embed); update the post-mortem
  example off the deprecated color_scheme='Linux' kwarg to theme_name='linux'
  and drop a stray "# TODO: theme" marker left in the sample; point the
  embed-kernel frontend commands at `jupyter qtconsole`/`jupyter console`.
- development/how_ipython_works.rst: `ipython console` -> `jupyter console`.
- config/details.rst: fix the cwd_prompt.py example path (the file is at
  examples/utils/, not the nonexistent IPython/example/utils/).
- config/custommagics.rst: drop a `from __future__ import print_function`
  from the custom-magic example.
- CONTRIBUTING.md: drop the reference to IPython.parallel (spun out to
  ipyparallel years ago).

https://claude.ai/code/session_01GcLWP2cXXDrS49q2kjdcW8
@Carreau Carreau force-pushed the claude/affectionate-euler-l5l0ff branch from 878d280 to 22f3887 Compare June 15, 2026 05:27
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.

2 participants