Modern Python Projects Transcripts
Chapter: Managing Python project
Lecture: Pin your dependencies!

Login or purchase this course to watch this video and the rest of the course contents.
0:00 In the previous lesson, we saw that we can tell pip to, install whatever latest version it can find or to install a specific version.
0:09 Installing a specific version is called Pinning Dependencies. And always make sure to pin dependencies on your production servers,
0:17 all of them. If you don't, you might install different packages on your production, then you use during the development,
0:25 and those different versions might not work properly. And you won't realize that they are not working properly, because when you're on tests,
0:33 you use a different versions of dependencies, so your application will be broken. And even if you have 100% test coverage,
0:41 you won't know that. So always pin your dependencies on the production server, to the exact patch version. So no Django>=2.2 or Django<3
0:53 But be very specific, install Django 3.1.2 because this is the version that you tested and you know that it will work.

Talk Python's Mastodon Michael Kennedy's Mastodon