Skip to content

Deprecate last_needle functionality #69

Description

@pevogam

This functionality is an early implementation from the time we did not have image logging and could be confusing for newcomers that see both a last_needle and possibly some general image logging. It is also undermaintained with some incorrect type errors.

The best approach around it would be not to drop it entirely but to integrate it in the image logging as a "near minimal verbosity level" that just outputs images on find errors or similar behavior.

Activity

  1. pevogam commented on Feb 7, 2025

    @pevogam
    MemberAuthor

    Best approach so far is not to drop it entirely but to integrate it in the image logging as a "near minimal verbosity level" that just outputs images on find errors or similar behavior.

  2. changed the title [-]Deprecate last_needle functionality in Guibot[/-] [+]Deprecate last_needle functionality[/+] on Apr 3, 2025
  3. lormafe34 commented on Sep 29, 2026

    @lormafe34
    Contributor

    Hi @pevogam , I'd like to work on this.

    I found that the old functionality seems to be GlobalConfig.save_needle_on_error, which saves last_finderror_needle.png and last_finderror_haystack.png inline in region.py before raising FindError.

    My plan: route this through ImageLogger so that at the default ERROR level it dumps the needle/haystack only on find errors, then deprecate save_needle_on_error (with a DeprecationWarning).

    A couple of questions:

    1. Is this the right direction?
    2. Is it fine that the dumped file names change to the usual imglog naming instead of last_finderror_*.png?
  4. added 7 commits that reference this issue on Sep 30, 2026
    4d61fec
    0bb9773
    8a2bf8a
    1b08521
    52b2196
    541a2ef
    ce065a6
  5. added a commit that references this issue on Oct 10, 2026
    ca41bb8
  6. added a commit that references this issue on Oct 19, 2026
    a9555ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions