no. ``~2`` is equivalent to ``~2.0`` or ``2.*``. The semantic versionning operator never allows changing major version as this implies BC break.

I would use ``~2.3`` or ``~2.4`` in the doc. It makes sense to allow future versions, but it does not make sense to allow 2.0 while your code won't run with it