From 2397b7d136d0df13f346e9e901e037eba056d4e7 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 21 Jan 2024 22:06:47 -0500 Subject: [PATCH] Handle pre flag --- pipenv/cli/command.py | 3 +++ pipenv/routines/uninstall.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py index 45792e2d3b..e4f7bf5142 100644 --- a/pipenv/cli/command.py +++ b/pipenv/cli/command.py @@ -284,6 +284,8 @@ def uninstall(ctx, state, all_dev=False, all=False, **kwargs): """Uninstalls a provided package and removes it from Pipfile.""" from pipenv.routines.uninstall import do_uninstall + pre = state.installstate.pre + retcode = do_uninstall( state.project, packages=state.installstate.packages, @@ -293,6 +295,7 @@ def uninstall(ctx, state, all_dev=False, all=False, **kwargs): lock=False, all_dev=all_dev, all=all, + pre=pre, pypi_mirror=state.pypi_mirror, categories=state.installstate.categories, ctx=ctx, diff --git a/pipenv/routines/uninstall.py b/pipenv/routines/uninstall.py index 7ccb8dfeb9..27e65cf7d2 100644 --- a/pipenv/routines/uninstall.py +++ b/pipenv/routines/uninstall.py @@ -45,6 +45,7 @@ def do_uninstall( lock=False, all_dev=False, all=False, + pre=False, pypi_mirror=None, ctx=None, categories=None, @@ -128,7 +129,7 @@ def do_uninstall( project=project, lockfile={}, category=pipfile_category, - pre=False, # TODO Handle pre-releases here + pre=pre, allow_global=system, pypi_mirror=pypi_mirror, )