Dependencies: they’re always changing.
Software is in such continuous flux.
With this stream of change,
maintainers can take a helpful step
to inform users
of dependency versions
at the time of a release.
By including a
requirements.txt in a release,
a maintainer can notify users
of the state of the world
when the package was released.
(or “distributions” if you want to use the official term)
A rule of thumb is to exclude version numbers
to avoid causing conflicts between packages.
If my package says it requires
and your package says it requires
then users can run into trouble.
Users who want to have to both my package and your package
may run into trouble when installing.
By including a
when you release a Python package
you can tell users
“Here are the versions of dependencies
that I used
when I declared my software fit for release.”
Many strange environments exist in the world
and including your dependency versions
in a separate file
can help future software archeologists
figure out how to make your software work
in strange places.
If you want to chat about this with me, I'm @mblayman on Twitter.
Our brains are amazingly flexible. My trip to the dentist taught me a lesson about human behavior and abilities.
Matt is the lead software engineer at Storybird.
Always eager to talk about Python and other technology topics, Matt organizes Python Frederick in Frederick, Maryland (NW of Washington D.C.) and seeks to grow software skills for people in his community.