From 1ce68dc4a62687ce3a6c06dd5d9966487e319321 Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Tue, 21 Mar 2023 19:06:24 -0700 Subject: [PATCH 1/6] pipx: Document parameters supported with state=latest --- plugins/modules/pipx.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index 343d3d57718..d2cdf39599c 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -57,7 +57,7 @@ install_deps: description: - Include applications of dependent packages. - - Only used when I(state=install), I(state=upgrade), or I(state=inject). + - Only used when I(state=install), I(state=latest), I(state=upgrade), or I(state=inject). type: bool default: false inject_packages: @@ -69,7 +69,7 @@ force: description: - Force modification of the application's virtual environment. See C(pipx) for details. - - Only used when I(state=install), I(state=upgrade), I(state=upgrade_all), or I(state=inject). + - Only used when I(state=install), I(state=upgrade), I(state=upgrade_all), I(state=latest), or I(state=inject). type: bool default: false include_injected: @@ -81,12 +81,12 @@ index_url: description: - Base URL of Python Package Index. - - Only used when I(state=install), I(state=upgrade), or I(state=inject). + - Only used when I(state=install), I(state=upgrade), I(state=latest), or I(state=inject). type: str python: description: - Python version to be used when creating the application virtual environment. Must be 3.6+. - - Only used when I(state=install), I(state=reinstall), or I(state=reinstall_all). + - Only used when I(state=install), I(state=latest), I(state=reinstall), or I(state=reinstall_all). type: str executable: description: From bc1058e019da5fc5f25e423577a4092efb0e6d80 Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Tue, 21 Mar 2023 19:17:09 -0700 Subject: [PATCH 2/6] pipx: Support "include_injected" with states "upgrade" and "latest" - Contrary to documentation, "include_injected" doesn't appear to have worked with state=upgrade since it was introduced. - Add support for include_injected with "latest", since "latest" is specified as being install+upgrade. --- plugins/modules/pipx.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index d2cdf39599c..8bb113b7ff0 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -75,7 +75,8 @@ include_injected: description: - Upgrade the injected packages along with the application. - - Only used when I(state=upgrade) or I(state=upgrade_all). + - Only used when I(state=upgrade), I(state=upgrade_all), or I(state=latest). + - I(state=upgrade) and I(state=latest) added in community.general 6.5.0. type: bool default: false index_url: @@ -254,7 +255,7 @@ def state_upgrade(self): if self.vars.force: self.changed = True - with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: + with self.runner('state include_injected index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: ctx.run() self._capture_results(ctx) @@ -307,7 +308,7 @@ def state_latest(self): ctx.run(state='install', name_source=[self.vars.name, self.vars.source]) self._capture_results(ctx) - with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: + with self.runner('state include_injected index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx: ctx.run(state='upgrade') self._capture_results(ctx) From 18c777b30e3e916b52f688c311e46c5ce0f82c48 Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Tue, 21 Mar 2023 19:55:33 -0700 Subject: [PATCH 3/6] Add changelog fragment --- changelogs/fragments/6212-pipx-include-injected.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/6212-pipx-include-injected.yml diff --git a/changelogs/fragments/6212-pipx-include-injected.yml b/changelogs/fragments/6212-pipx-include-injected.yml new file mode 100644 index 00000000000..31f2196d930 --- /dev/null +++ b/changelogs/fragments/6212-pipx-include-injected.yml @@ -0,0 +1,2 @@ +bugfixes: + - pipx - Ensure ``include_injected`` parameter works with ``state=upgrade`` and ``state=latest`` (https://github.com/ansible-collections/community.general/pull/6212). From 7bdf41de1b2d836b1f48fd032204ec25eaf0e2af Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Sun, 26 Mar 2023 07:42:01 -0700 Subject: [PATCH 4/6] Update plugins/modules/pipx.py Co-authored-by: Felix Fontein --- plugins/modules/pipx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index 8bb113b7ff0..e64d73703b6 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -76,7 +76,7 @@ description: - Upgrade the injected packages along with the application. - Only used when I(state=upgrade), I(state=upgrade_all), or I(state=latest). - - I(state=upgrade) and I(state=latest) added in community.general 6.5.0. + - This is used with I(state=upgrade) and I(state=latest) since community.general 6.5.0. type: bool default: false index_url: From 107446d9144bfed11def76c6d987327eb20153f1 Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Sun, 26 Mar 2023 07:43:20 -0700 Subject: [PATCH 5/6] Update changelog fragment Co-authored-by: Felix Fontein --- changelogs/fragments/6212-pipx-include-injected.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/6212-pipx-include-injected.yml b/changelogs/fragments/6212-pipx-include-injected.yml index 31f2196d930..cfe85d93264 100644 --- a/changelogs/fragments/6212-pipx-include-injected.yml +++ b/changelogs/fragments/6212-pipx-include-injected.yml @@ -1,2 +1,2 @@ -bugfixes: - - pipx - Ensure ``include_injected`` parameter works with ``state=upgrade`` and ``state=latest`` (https://github.com/ansible-collections/community.general/pull/6212). +minor_changes: + - pipx - ensure ``include_injected`` parameter works with ``state=upgrade`` and ``state=latest`` (https://github.com/ansible-collections/community.general/pull/6212). From 4ba90cabbd5b8a56d572d3b4d59c10144ce188af Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Tue, 28 Mar 2023 09:35:58 -0700 Subject: [PATCH 6/6] pipx: Update to correct target release of community.general --- plugins/modules/pipx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/pipx.py b/plugins/modules/pipx.py index e64d73703b6..3f356968323 100644 --- a/plugins/modules/pipx.py +++ b/plugins/modules/pipx.py @@ -76,7 +76,7 @@ description: - Upgrade the injected packages along with the application. - Only used when I(state=upgrade), I(state=upgrade_all), or I(state=latest). - - This is used with I(state=upgrade) and I(state=latest) since community.general 6.5.0. + - This is used with I(state=upgrade) and I(state=latest) since community.general 6.6.0. type: bool default: false index_url: