Tests error due to pinned schemathesis version 3.19.* / Docker rebuild fails
juhoinkinen opened this issue · 1 comments
Running unit tests fail with the following error:
...
File "/home/local/jmminkin/.cache/pypoetry/virtualenvs/annif-ul-EXdhi-py3.8/lib/python3.8/site-packages/schemathesis/lazy.py", line 9, in <module>
from hypothesis.internal.escalation import format_exception, get_interesting_origin, get_trimmed_traceback
ImportError: cannot import name 'get_interesting_origin' from 'hypothesis.internal.escalation' (/home/local/jmminkin/.cache/pypoetry/virtualenvs/annif-ul-EXdhi-py3.8/lib/python3.8/site-packages/hypothesis/internal/escalation.py)
This originates from a change in Hypothesis, which makes it incompatible with Schemathesis: HypothesisWorks/hypothesis#3804. On Schemathesis side this is already fixed and the release v3.21.1 includes it, but because in Annif the Schemathesis version is pinned to 3.19.*, the fix does not propagate in use.
For development and future releases the Schemathesis version pinning can be just updated or removed, but this is not possible in rebuilds of the Annif 1.0 Docker image (see failed, manually triggered rebuild attempt), because for that no code changes are made.
Depending on the need to keep the Annif 1.0 Docker image up-to-date and on the schedule of 1.1 release, we could consider releasing Annif 1.0.1, where Schemethesis version pinning is removed or updated.
But for avoiding these kind of problems in the future the version pinning policy should be thought from this point of view: now the dev dependencies are fully unpinned except black and schemathesis.
Depending on the need to keep the Annif 1.0 Docker image up-to-date and on the schedule of 1.1 release, we could consider releasing Annif 1.0.1, where Schemethesis version pinning is removed or updated.
But for avoiding these kind of problems in the future the version pinning policy should be thought from this point of view: now the dev dependencies are fully unpinned except black and schemathesis.
For simply fixing the unit tests and releasing Annif v1.0.1, I switch to pin only Schemathesis major version (i.e. 3.*.*
).