Interview Prep/Python for DevOps/Environments, dependencies & packaging

What do version specifiers like `~=`, `==`, `>=,<` mean?

BeginnerConceptEnvironments, dependencies & packaging
Answer
  • ==1.35.2: exactly that version.
  • >=1.35,&lt;2: range; allows minor and patch upgrades but not the next major.
  • ~=1.35.2: compatible release, means >=1.35.2,&lt;1.36; ~=1.35 means >=1.35,&lt;2.
  • !=1.35.3: exclude a broken version.

Applications pin exactly via a lock file; libraries use ranges so they do not create resolution conflicts for their users.

All Python for DevOps questions Roadmap: Python for automation

More on Environments, dependencies & packaging