serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

Plugin not compatible with =>2022.8.13 of pipenv

Open tylerzisk opened this issue 3 years ago • 2 comments

Issue Description

Currently the plugin is not compatible with any version of pipenv > 2022.8.13 as they have changed how the requirements.txt command is used.

The plugin currently calls pipenv lock --requirements --keep-outdated and starting with 2022.8.13 they have removed the -requirements and --keep-outdated flags and consolidated to pipenv requirements.

Not blaming the plugin as this seems like a very dumb and breaking change on part of the maintainers of pipenv.

The current workaround I have employed to my company's codebases is to set the install step of pipenv to use version 2022.8.5, as it is the last with the old syntax usage:

pip install pipenv==2022.8.5

Per their documentation: Screen Shot 2022-08-15 at 1 22 14 PM

tylerzisk avatar Aug 15 '22 19:08 tylerzisk

I'd recommend calling pipenv requirements --hash as the equivalent of this. Maybe the hash is a new feature but it helps maintain the protection against package confusion attacks.

I'm now doing this manually before calling serverless package though I also have to delete my pipfile and pipfile.lock as part of the build to make sure that this plugin uses the requirements.txt instead of the pipfile

mungojam avatar Aug 18 '22 21:08 mungojam

A temporary workaround to solve this issue is to install the plugin through the PR branch with

npm install andidev/serverless-python-requirements#support-latest-pipenv

andidev avatar Sep 03 '22 16:09 andidev

A temporary workaround to solve this issue is to install the plugin through the PR branch with

npm install andidev/serverless-python-requirements#support-latest-pipenv

Hey, I've added a PR to fix an issue I've hadd with git packages being the sources.

willscavforlabkeys avatar Oct 04 '22 21:10 willscavforlabkeys

I'm closing as https://github.com/serverless/serverless-python-requirements/pull/718 should resolve the issue

pgrzesik avatar Oct 24 '22 20:10 pgrzesik