In requirements.txt, what does tilde equals (~=) mean?
<p>In the <code>requirements.txt</code> for a Python library I am using, one of the requirements is specified like:</p>

<pre><code>mock-django~=0.6.10
</code></pre>

<p>What does <code>~=</code> mean?</p>

<p>It means it will select the lastest version of the package, greater or equal to 0.6.10, but still in the 0.6.* version, so it won't download the 0.7.0 for example. It ensures you will get security fixes but keep backward-compatibility, if the package maintener respects the semantic versionning (which state that breaking changes should occurs only in major versions).</p>

<p>Or, as said by the PEP 440:</p>

<blockquote>
  <p>For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses:</p>
  
  <p><code>&gt;= V.N, == V.*</code></p>
</blockquote>

<ul>
<li><a href="https://www.python.org/dev/peps/pep-0440/#compatible-release">Definition in the PEP 440</a></li>
<li><a href="https://pip.pypa.io/en/stable/reference/pip_install/#example-requirements-file">Complete example here in the documentation</a></li>
</ul>

python requirements.txt