#1108734 ansible: _AnsibleActionDone are deprecated

#1108734#5
Date:
2025-07-04 07:34:02 UTC
From:
To:
Hi,

after upgrade to this version i got deprecation warning (wrapped):

   [DEPRECATION WARNING]: Importing '_AnsibleActionDone' is deprecated. \
     This feature will be removed from ansible-core version 2.23. Return \
     directly from action plugins instead.

The only place where i found import _AnsibleActionDone is in file
ansible_collections/ansible/posix/plugins/action/patch.py, which is part
of ansible package.

regards

#1108734#10
Date:
2025-07-04 19:25:25 UTC
From:
To:
Hi Slavko,

Do you have a minimal reproduce for this error? You didn't mention what you've run.

Greets,
Lee

#1108734#15
Date:
2025-07-04 20:51:55 UTC
From:
To:
Hi,

Dňa Fri, 04 Jul 2025 21:25:25 +0200 Lee Garrett <debian@rocketjump.eu>
napísal:

It was a little challenge for me, as it is triggered by next task (than
it is reported), but finally i was able to isolate it, playbook:

    - name: Reproduce bug 1108734
      hosts: ...
      gather_facts: yes
      become: yes

      tasks:
      - name: Some patch
        patch:
          src: patches/some.patch
          basedir: /some/dir
          strip: 2
        when: false

In really i have another condition, forced false is enough to show
warning (anyway original always results in false, as i noticed now).

My ansible.cfg file is simple, and commenting all lines (except of
inventory=..., BTW static dir) has no effect. I checked porting notes,
but i didn't find anything related,

regards

#1108734#20
Date:
2025-11-15 14:43:13 UTC
From:
To:
Thanks. I've provided upstream with a fix and will add it to the next point
release: https://github.com/ansible-collections/ansible.posix/pull/687

Could you test it to ensure it still functions for your use case with the patch?