Sanic 21.12 will require changes in tests, and possibly in code.
Sanic 21.3 moved testing support from sanic.testing to a new module sanic-testing. This will require a different requirements file than Sanic 20.x to install sanic-testing.
There are other changes needed to support sanic-testing, such as changes to app registration and the test client. The changes are large enough that a new test file may be useful, rather than dynamically changing code based on the version.
There may be other changes in the framework itself. For example, this test:
fails with AttributeError: 'Router' object has no attribute 'routes_names'.
Currently, tests pass for Sanic 20.12.3, which is supported until December 2022. After this date, if we don't support Sanic 21.12, then we may want to drop Sanic support entirely.
Sanic 21.12 will require changes in tests, and possibly in code.
Sanic 21.3 moved testing support from
sanic.testing
to a new modulesanic-testing
. This will require a different requirements file than Sanic 20.x to installsanic-testing
.There are other changes needed to support
sanic-testing
, such as changes to app registration and the test client. The changes are large enough that a new test file may be useful, rather than dynamically changing code based on the version.There may be other changes in the framework itself. For example, this test:
https://github.com/mozilla-services/python-dockerflow/blob/5e30d692664f1831289ba52158a19fc38ed3a22f/tests/sanic/test_sanic.py#L98-L99
fails with
AttributeError: 'Router' object has no attribute 'routes_names'
.Currently, tests pass for Sanic 20.12.3, which is supported until December 2022. After this date, if we don't support Sanic 21.12, then we may want to drop Sanic support entirely.