maint: close search.log handler + four CLI-noise warning fixes - #1496
Merged
Conversation
Five mechanical fixes from the 2026-08-06 full-suite -W all audit (#1495): - configure_handler now closes the search.log FileHandler beside the removeHandler in its finally block, ending the per-search ResourceWarning (44/run) and descriptor leak. - Fit.arrays/Fit.hdus carry the overlaps= annotations SQLAlchemy's SAWarning suggests: HDU extends Array by joined-table inheritance, so those relationships intentionally share the array.fit_id column. - Nautilus samples_info_from reads the log_z property instead of the deprecated evidence() method (which just returns log_z). - LBFGS no longer forwards the disp/iprint options scipy 1.15 deprecated for L-BFGS-B (removal slated for 1.18); the constructor still accepts both, and disp remains live for plain BFGS. - test_fork_context.py filters the fork-in-a-multi-threaded-process DeprecationWarning (CPython 3.12+) and JAX's equivalent RuntimeWarning module-locally — the fork-pinned pool is the module's subject. Full suite: 1884 passed, 3 skipped. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WXzGhe8dt8ANs4xaXHcuD
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five mechanical fixes from the 2026-08-06 full-suite
-W allCLI-noise audit, all noise-only with no behaviour change to fits: close thesearch.logFileHandlerthatconfigure_handlerremoved but never closed (44ResourceWarnings + a file-descriptor leak per suite run); annotate the intentionalFit.arrays/Fit.hdus/HDU.fitrelationship overlap with the exactoverlaps=strings SQLAlchemy'sSAWarningsuggests; swap nautilus's deprecatedevidence()call for the.log_zproperty it wraps; stop forwarding thedisp/iprintoptions scipy 1.15 deprecated for L-BFGS-B; and filter the unavoidable fork-in-a-multi-threaded-process warnings module-locally intest_fork_context.py.Closes #1495.
API Changes
None — internal changes only. (One observable nuance:
LBFGS.optionsno longer contains thedisp/iprintkeys; the constructor still accepts both anddispstays live for plainBFGS. See details below.)Test Plan
configure_handler-decorated calls under-W error::ResourceWarningrun clean, no handlers left on the root loggersa.orm.configure_mappers()emits zero warnings after theoverlaps=annotations (twoSAWarnings before, reproduced to copy the exact suggested strings)minimizecall passingdisp/iprintwarns; none after the fixevidence()verified to be a warn-then-return self.log_zwrapper — the swap is exactly equivalenttest_fork_context.pyruns warning-free;test_lbfgs.pyupdated to pin the new options contractFull API Changes (for automation & release notes)
Changed Behaviour
LBFGS.options— no longer includes thedisp/iprintkeys (scipy 1.15 deprecated both for the L-BFGS-B solver; removal slated for scipy 1.18). TheLBFGS.__init__parametersdispandiprintare still accepted and stored as attributes; they simply never reachscipy.optimize.minimizefor this method. PlainBFGSbehaviour is unchanged (dispstill forwarded).Migration
disp=True/iprintonaf.LBFGSlose scipy's Fortran-side verbose output, which scipy itself is removing.Generated by the PyAutoLabs agent workflow.
Generated by Claude Code