question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you see the delta between two Pipfile.lock files?

See original GitHub issue

I just pipenv update my project and would like to know exactly what packages have been updated. What is the recommand way to do that?

What I would expect to

I would expect something like this exist:

$ pipenv diff Pipfile1.lock Pipfile2.lock
> The following packages changed:
package1: old: 6.20, new: 6.21
package2: old: 3.2, new: 3.3

As Pipfile.lock file is really easy to parse (JSON), I would not be surprised if something like this already exist and I just missed it.

What I tried so far

  • Making a unix diff between the old Pipfile.lock and the new one does not really work, because you don’t see the name of the package that changes in the output.
  • Running pipenv graph before running pipenv update and saving the output to a file, for comparing them later. It kind of works, but the whole process is a bit complicated. Plus, if you forget to save the result of pipenv graph before updating, it’s too late.

EDIT

I made a very simple script to handle that: https://gist.github.com/ddahan/215472a4aa1805160aba0a77902e40da

Usage example:
$ /usr/local/bin/python3.6 pipenvdiff.py Pipfile.inprod.lock Pipfile.current.lock

django-cors-headers: 2.3.0 -> 2.4.0
django-extensions: 2.0.7 -> 2.1.0
faker: 0.8.16 -> 0.8.17
ipython: 6.4.0 -> 6.5.0
lxml: 4.2.3 -> 4.2.4
openpyxl: 2.5.4 -> 2.5.5
parso: 0.3.0 -> 0.3.1
stripe: 1.84.1 -> 2.4.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Aug 6, 2018

The fact that you do the update after you check isn’t really relevant. Things you get from pypi are cached and I don’t really foresee us designing around a theoretical edge case which I don’t think really occurs much, if ever. Outdated can and should check more than just the Pipfile though I definitely agree.

0reactions
matteiuscommented, Sep 3, 2022

I believe most folks check their Pipfile.lock into source control and see the deltas on PRs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How are Pipfile and Pipfile.lock used? - Stack Overflow
Getting Started. Start using pipenv is easy, in your project folder type... $ pipenv install · Pipfile. The Pipfile file is intended to...
Read more >
pipenv v/s requirements.txt. What is all about it? - LinkedIn
pipenv lock is used to create a Pipfile.lock, which declares all dependencies (and sub-dependencies) of your project, their latest available ...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look familiar if you are used ... Installing dependencies from Pipfile.lock...
Read more >
Advantages of Pipfile.lock Over requirements.txt - YouTube
There are two popular types of lock files in use right now: ` Pipfile. lock ` and `poetry.lock`. They are used by the...
Read more >
pipfile-util — utility for Rust // Lib.rs
Command line utility to create a diff of Pipfile.lock | Rust/Cargo package. ... A simple tool to compare changes in Pipfile.lock -files. By...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found