Skip to content

maint: close search.log handler + four CLI-noise warning fixes - #1496

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/pyautofit-cli-noise-fixes-vqs7mg
Aug 18, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/pyautofit-cli-noise-fixes-vqs7mg

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Five mechanical fixes from the 2026-08-06 full-suite -W all CLI-noise audit, all noise-only with no behaviour change to fits: close the search.log FileHandler that configure_handler removed but never closed (44 ResourceWarnings + a file-descriptor leak per suite run); annotate the intentional Fit.arrays/Fit.hdus/HDU.fit relationship overlap with the exact overlaps= strings SQLAlchemy's SAWarning suggests; swap nautilus's deprecated evidence() call for the .log_z property it wraps; stop forwarding the disp/iprint options scipy 1.15 deprecated for L-BFGS-B; and filter the unavoidable fork-in-a-multi-threaded-process warnings module-locally in test_fork_context.py.

Closes #1495.

API Changes

None — internal changes only. (One observable nuance: LBFGS.options no longer contains the disp/iprint keys; the constructor still accepts both and disp stays live for plain BFGS. See details below.)

Test Plan

  • Full suite on Python 3.13 / scipy 1.17.1 / SQLAlchemy 2.0.52 / nautilus 1.0.5: 1884 passed, 3 skipped
  • Handler leak: 50 configure_handler-decorated calls under -W error::ResourceWarning run clean, no handlers left on the root logger
  • sa.orm.configure_mappers() emits zero warnings after the overlaps= annotations (two SAWarnings before, reproduced to copy the exact suggested strings)
  • scipy deprecation reproduced on 1.17.1: any L-BFGS-B minimize call passing disp/iprint warns; none after the fix
  • nautilus 1.0.5 evidence() verified to be a warn-then-return self.log_z wrapper — the swap is exactly equivalent
  • test_fork_context.py runs warning-free; test_lbfgs.py updated to pin the new options contract
Full API Changes (for automation & release notes)

Changed Behaviour

  • LBFGS.options — no longer includes the disp / iprint keys (scipy 1.15 deprecated both for the L-BFGS-B solver; removal slated for scipy 1.18). The LBFGS.__init__ parameters disp and iprint are still accepted and stored as attributes; they simply never reach scipy.optimize.minimize for this method. Plain BFGS behaviour is unchanged (disp still forwarded).

Migration

  • No action needed. Users who set disp=True/iprint on af.LBFGS lose scipy's Fortran-side verbose output, which scipy itself is removing.

Generated by the PyAutoLabs agent workflow.


Generated by Claude Code

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
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 18, 2026 — with Claude
@Jammy2211
Jammy2211 merged commit 7d4d931 into main Aug 18, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the claude/pyautofit-cli-noise-fixes-vqs7mg branch August 25, 2026 18:13
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
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.

maint: close search.log handler + four CLI-noise warning fixes

2 participants