Skip to content

[pull] main from ipython:main#127

Merged
pull[bot] merged 7 commits into
AKJUS:mainfrom
ipython:main
Jun 13, 2026
Merged

[pull] main from ipython:main#127
pull[bot] merged 7 commits into
AKJUS:mainfrom
ipython:main

Conversation

@pull

@pull pull Bot commented Jun 13, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

claude added 7 commits June 13, 2026 13:13
sqlite3.Connection used as a context manager only commits or rolls
back, it does not close the connection. `ipython history trim/clear`
therefore still had open handles on history.sqlite when unlinking and
renaming it, which fails with PermissionError on Windows and leaves
history.sqlite.new* files behind.

Wrap both connections in contextlib.closing so they are closed before
any file shuffling, and add a regression test running the trim and
clear subcommands in a subprocess.

Fixes #15241

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
The test created a HistoryManager backed by a real file but never
stopped its HistorySavingThread. The thread briefly holds a strong
reference to the manager inside its polling loop, so the instance
could survive the gc.collect() in the hmmax fixture teardown,
making the instance-leak assertion fail intermittently.

Stop the saving thread and close the database like the other tests
in this file do, and drop the unreachable `HistoryManager.__max_inst`
assignment that name-mangling never applied anyway.

Fixes #15161

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
Honor PEP 263 coding cookies when reading module sources for the
autoreload diffing logic, the way the import system does, instead of
assuming utf-8. Sources that declare another encoding were read as
empty (the UnicodeDecodeError is caught and logged), disabling
hot-patching for those modules, and the logged traceback was noisy on
the first %load_ext autoreload.

The regression test fails with the previous explicit utf-8 reading.

Closes #15193 (the original cp1252 crash reported there was already
fixed by reading with an explicit encoding, this handles the
remaining non-utf-8 sources).

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
inspect_object is not called anywhere in IPython anymore, so
registering handlers on it has no effect, and a search of public
repositories found no external users (unlike complete_object, which
pyflyby, riptable and maiev register completers on, and which is
unchanged).

Emit a DeprecationWarning through a module __getattr__ so that simply
importing the name warns, which also covers consumers that only call
.register().

First step towards #15068.

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
xml.etree.ElementTree.ParseError is a SyntaxError subclass that
leaves .text set to None; IPython 9.6.0 raised an AssertionError in
ListTB._format_exception_only when rendering it. The guard was added
as part of #15012, but without a test; this locks the behavior in.

The test fails if the None check in _format_exception_only is
removed.

Closes #15024

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
…h quoting

oinspect: guard __custom_documentations__ lookup with isinstance(dict) so
objects like polars Expr (which return self for any attribute access via
__getattr__) no longer raise TypeError when inspected with ?. Fixes #15072.

oinspect: fix inspect.Parameter.empty comparison in MIME-hook path; the
previous code accidentally compared against the property descriptor object
rather than the sentinel, making the required-parameter filter a no-op.

test_interactiveshell: wrap sys.executable and self.fname in shlex.quote()
so test_exit_code_signal survives when the source path contains spaces.
Fixes #15100.

https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
@pull pull Bot locked and limited conversation to collaborators Jun 13, 2026
@pull pull Bot added the ⤵️ pull label Jun 13, 2026
@pull pull Bot merged commit fdbdf1c into AKJUS:main Jun 13, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant