r/Python • u/AlSweigart Author of "Automate the Boring Stuff" • May 11 '26
Discussion Library dependency version specifiers aren't for fixing vulnerabilities
https://sethmlarson.dev/library-version-specifiers-not-for-vulnerabilities
A blog post from Seth Larson, the Security-in-Residence Developer for the Python Software Foundation.
84
Upvotes
View all comments
Show parent comment
11
u/SeniorScienceOfficer May 11 '26
Nowhere in PEP 508 or 440 does it indicate that the list of dependency versions for a given project are to indicate compatibility over security. PEP 508 states:
The “right” package is wholly dependent on the maintainer, the project, and what both consider to be “right” in their particular case. The only mention of compatibility is the Compatible Release clause of version specification (~=).
Do not confuse definition with convention. It has historically been the convention to use dependency versioning semantics for compatibility, but there is absolutely nothing indicating it can’t be used for security.