Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Pipfiles #197

Open
jayfk opened this issue Feb 1, 2017 · 17 comments
Open

Support Pipfiles #197

jayfk opened this issue Feb 1, 2017 · 17 comments

Comments

@jayfk
Copy link
Contributor

jayfk commented Feb 1, 2017

Pipfiles are on its way to be a thing.

It'd great if pyup could support this as soon as the internal API is stable: pypa/pipfile#57

@gsemet
Copy link

gsemet commented Jun 1, 2017

+1. Pyup should be able to read Pipfile.lock and update versions in it.

@wdv4758h
Copy link

any update ?

@tony
Copy link

tony commented Oct 29, 2017

Just moved to Pipfile on a few projects. Totally forgot about pyup

@audiolion
Copy link

is there any schedule for supporting Pipfiles?

@austinmcconnell
Copy link

I'll chime in as another who would love pipfile support. They're fantastic! I'm planning on switching all my personal projects to use pipfiles.

@jayfk
Copy link
Contributor Author

jayfk commented Jan 22, 2018

How exactly are you currently using pipenv in your projects?

Are you pinning your dependencies in your Pipfile? Are you committing Pipfile.lock to git? Best practices?

@chris48s
Copy link

I'd say the usage is similar to other package managers that use a lock file like composer (or npm more recently):

  • If your project is an end user-facing application, pin to a version in the Pipfile and commit the lockfile to formalise the second-order dependencies. This ensures deterministic installs across environments.
  • If your project is a package, specify a range in the Pipfile and don't commit the lock file. This ensures maximum compatibility with other libraries that share dependencies.

pypa/pipenv#598

@austinmcconnell
Copy link

My usage is slightly different for applications, but not my much. I don't pin versions in the Pipfile (I use "*" to match all), but I do commit the lockfile. That way I get the same deterministic installs across environments, but it's also easy to upgrade all packages and second-order dependencies with pipenv update.

I first learned about this "requirements-to-freeze" design philosophy in an article on Kenneth Reitz website here and adapted it to pipfiles.

I agree with what @chris48s said regarding pipfiles in packages.

@gsemet
Copy link

gsemet commented Jan 22, 2018

My usage is slightly different for applications, but not my much. I don't pin versions in the Pipfile (I use "*" to match all), but I do commit the lockfile
That's is the standard way of using Pipfile. you lock in Pipfile only in case of big imcompatibility between 2 modules. But it is always best to work by range and operators (>=, <=,...) in pipfile.

I also recommend to commit the lock file for application (you want to freeze all the dependencies so when user installs the python application, it installs exactly what the developer validated). For libs, you don't commit the lock files. I also generate manually the requirements.txt so external services that does not support Pipfile yet can still work (using pipenv-to-requirements.)

@jayfk
Copy link
Contributor Author

jayfk commented Jan 24, 2018

Okay, I'm currently working on basic support for Pipfiles. Still need to write some tests, but it's looking good so far.

One thing that will be horrible to support though is the combination pinned Pipfile + commited Pipfile.lock. This combination will force the bot to update the hash in Pipfile.lock on every update, resulting in merge conflicts if there's more than one update available.

I wrote about this potential issue in pypa/pipfile#9 (comment).

@gsemet
Copy link

gsemet commented Jan 24, 2018

hash is optional, you may not update it (just safer)

@jayfk
Copy link
Contributor Author

jayfk commented Jan 25, 2018

I've just pushed experimental support for pipenv to pyup.io. If you are using the CLI, you'll need to install from master.

To enable it, simply add your Pipfiles to your .pyup.yml:

requirements:
  - Pipfile
  - Pipfile.lock

The update should cover most of pipenvs workflows, but there are some caveats:

  • Formatting might be an issue. If there are any PRs that remove/add a lot of lines or change the Pipfiles formatting, please report them here.
  • The bot won't respect ranges set in a Pipfile when updating the Pipfile.lock.
  • The bot won't update the hash in Pipfile.lock.

Other than that, it should be pretty usable.

@gsemet
Copy link

gsemet commented Feb 6, 2018

I see the following error (link):

Error
Unknown Error

@edmorley
Copy link

Thank you for your work on this!

The bot won't respect ranges set in a Pipfile when updating the Pipfile.lock.

Unfortunately this is a blocker for us, since we have a few deps that have to be held back (eg Django<2 until we finish our Python 3 migration).

The bot won't update the hash in Pipfile.lock.

Is it just the overall lockfile hash that remains unchanged, or the per-package hashes? With our current requirements files, we make use of pip's hash-checking mode, so would need the latter.

What impact does not updating the overall lockfile hash have?

@gsemet
Copy link

gsemet commented Apr 11, 2018

hash is not that mandatory (it's the pypi server that exposes these hash). They however allow verification of integrity of the retrieve packet.

For the range/freeze syntax issue, it is kind of mandatory, limiting for any reason some version is perfectly legit, especially when need to banish a corrupted or vulnerable version.

@si14
Copy link

si14 commented Jun 25, 2018

Hey @jayfk! First of all, thanks for your great work! is there a chance to see full hash & range support in pyup in a near future? No pressure, just wondering so we can plan things around.

@djbrown
Copy link

djbrown commented Nov 22, 2020

For me Pipfile and Pipfile.lock are analyzed correctly with correct hash values.
Also there weren't any comments/complaints in years.
@jayfk @rafaelpivato maybe close this feature request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests