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.

Automatically generate Pipfile.lock on install/uninstall

See original GitHub issue

It’s not clear to me why pipenv lock is a separate command that the user must remember to invoke. This introduces something easily forgettable into the pipenv workflow which can ultimately lead to, say, committing but forgetting to add your dependencies (which is a pitfall already true of normal pip/virtualenv workflows).

It would be great to have the lockfile automatically regenerated on pipenv install and pipenv uninstall. This brings pipenv more in line with tools like Yarn and Bundler, which make it hard to get your dependency info into an inaccurate state.

E.g. running yarn add underscore will both insert underscore into package.json and add a locked version to yarn.lock. I think it’s natural that pipenv install requests should add requests to the Pipfile and the new locked versions to Pipfile.lock.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
kennethreitzcommented, Sep 2, 2017

That involved way too much work, but i’m happy with the results 😃

2reactions
Koboldcommented, Jul 7, 2017

Just echoing feedback as an end user that the separate lock command is surprising given what I’d expect coming from other deterministic package management solutions, and not totally foolproof.

yarn is a model example here and as I feel it, automated management of the lock file is the distinct user interface improvement of yarn over npm. You could make earlier versions of npm behave deterministically, but remembering to shrinkwrap was always a pain.

Just adding an additional voice in support of this issue. I totally understand the performance constraints, and thanks to everyone for all the work that’s gone into pipenv!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Pipfile | PyCharm Documentation - JetBrains
This file is essential for using Pipenv. When you create a Pipenv environment either for a new or an existing project, the Pipfile...
Read more >
pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >
pipenv Documentation
Automatically loads .env files, if they exist. The main commands are install, uninstall, and lock, which generates a Pipfile.lock.
Read more >
Announcing Pipenv! - Kenneth Reitz
Also automatically updates pip. The main commands are install, uninstall, and lock, which generates a Pipfile.lock.
Read more >
pipenv Documentation - manpages.ubuntu!
Automatically loads .env files, if they exist. The main commands are install, uninstall, and lock, which generates a Pipfile.lock.
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