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

Add support for latest pipenv version solves #716

Open andidev opened this issue 2 years ago • 1 comments

As mentioned in issue #716 pipenv lock --requirements --keep-outdated command no longer works and throws an error since --requirements flag has been deprecated and is now removed in latest version of pipenv (versions larger then or equal to 2022.8.13). In this fix pipenv requirements --hash is now called after pipenv lock --keep-outdated instead of passing the removed --requirements flag.

Tested to serverless deploy with this fix and it works.

andidev avatar Sep 03 '22 15:09 andidev

would be awesome if this PR could be reviewed fast. Thank you for your work @andidev .

FelipeBarrosCruz avatar Sep 07 '22 02:09 FelipeBarrosCruz

Any update on this issue? I am impacted by this issue and it looks like the PR is languishing while waiting for a review.

toxygene avatar Sep 26 '22 14:09 toxygene

Thanks a lot, @andidev - it looks like there are some failing tests, but I believe it's a problem with the whole test suite in general. I'll try to stabilize it in the coming days and we can come back to this PR

pgrzesik avatar Sep 27 '22 17:09 pgrzesik

Hey @andidev 👋 I think the tests should be pretty stable now, do you think you could rebase against the current main branch? Thanks in advance 🙇

pgrzesik avatar Sep 29 '22 21:09 pgrzesik

@pgrzesik done!

andidev avatar Sep 30 '22 02:09 andidev

Hey @andidev, thanks a lot. It looks like the tests on CI are failing, could you please look into that?

pgrzesik avatar Sep 30 '22 22:09 pgrzesik

@pgrzesik yeah so it was some prettier stuff not formatted. would recommend to add githooks to autoformat on commit.

andidev avatar Oct 01 '22 02:10 andidev

Hey @andidev - it failed on prettier in the first job, but other too also failed with tests that failed, please see: https://github.com/serverless/serverless-python-requirements/actions/runs/3155560666/jobs/5138325172

As for autoformatting on commit - that's a good suggestion for an improvement 👍

pgrzesik avatar Oct 01 '22 07:10 pgrzesik

Looks like pipenv is pinned at version 2021.11.5 for the tests:

  • https://github.com/andidev/serverless-python-requirements/blob/support-latest-pipenv/.github/workflows/validate.yml#L61
  • https://github.com/andidev/serverless-python-requirements/blob/support-latest-pipenv/.github/workflows/integrate.yml#L48

rwestergren avatar Oct 01 '22 13:10 rwestergren

@pgrzesik so I updated to latest version of pipenv in tests. I aslo created a PR for configuring to run eslint and prettier on a pre-commit hook, see PR #731

andidev avatar Oct 01 '22 16:10 andidev

@andidev Created a PR for your fork to fix the pipenv tests - was missing a Pipfile.lock file:

Pipfile.lock must exist to use --keep-outdated!

https://github.com/andidev/serverless-python-requirements/pull/1

Had a successful run on my fork (ignore the commit message failure): https://github.com/rwestergren/serverless-python-requirements/actions/runs/3165785814/jobs/5155070848

rwestergren avatar Oct 01 '22 20:10 rwestergren

So it should be possible to merge now. @rwestergren thanks!

andidev avatar Oct 02 '22 04:10 andidev

What's the current status of this? Currently using @andidev's feature branch, merging this PR would unblock me.

evanatlas avatar Oct 17 '22 15:10 evanatlas

Hey @evanatlas, there are still some outstanding issues with the proposed implementation that are blocking finalization. @andidev Do you think you'll have time to address them in the coming days? If not, I can pick it up and finalize this PR probably by the end of the week. Let me know 💯

pgrzesik avatar Oct 17 '22 21:10 pgrzesik

@pgrzesik Sorry for late response here. No I don't. Have too much work elsewhere unfortunately. Please feel free to finalize it.

andidev avatar Oct 23 '22 15:10 andidev

Thanks, @andidev, as you can see I kinda already did, I'm planning to release a new major version of the plugin in the coming days so I wanted to include that as it will include a breaking change for people on older pipenv versions. Thanks a lot for your work on this 🙇

pgrzesik avatar Oct 23 '22 15:10 pgrzesik

Thanks everyone for addressing this issue. I'm looking forward to the release.

ronkorving avatar Oct 25 '22 03:10 ronkorving