fix: sanic dependencies for tests#1320
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #1320 +/- ##
=======================================
Coverage 90.96% 90.96%
=======================================
Files 222 222
Lines 7501 7501
=======================================
Hits 6823 6823
Misses 678 678 ☔ View full report in Codecov by Sentry. |
| - name: Run tests for HTTP Mode adapters (ASGI) | ||
| run: | | ||
| # Requires async test dependencies | ||
| pytest tests/adapter_tests/asgi/ --junitxml=reports/test_adapter_asgi.xml | ||
| - name: Run tests for HTTP Mode adapters (asyncio-based libraries) | ||
| run: | | ||
| pytest tests/adapter_tests_async/ --junitxml=reports/test_adapter_async.xml |
There was a problem hiding this comment.
Some tests were getting skipped because pytest-asyncio was not installed, moving these after pip install -r requirements/testing.txt makes the tests not skip
|
|
||
| # Sanic and its dependencies | ||
| # Note: Sanic imports tracerite with wild card versions | ||
| tracerite<1.1.2; python_version<="3.8" # older versions of python are not compatible with tracerite>1.1.2 |
There was a problem hiding this comment.
tracerite does not specify which versions of python it supports, in version 1.1.2 the project invokes from importlib.resources import files which is only supported as of python 3.9. tracerite>=1.1.2 therefore requires: Python >=3.9
sanic uses a wildcard to import tracerite ("tracerite>=1.0.0"), which make pip install the latest version of tracerite even though it is incompatible with python 3.8
To solve this we first install tracerite<1.1.2 to satisfy sonics requirement of tracerite>=1.0.0
There was a problem hiding this comment.
Wildness with a wildcard but these are helpful comments! 🙏
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin LGTM! Thanks so much for finding both the right dependencies and ordering of steps 🧪 ✨
|
|
||
| # Sanic and its dependencies | ||
| # Note: Sanic imports tracerite with wild card versions | ||
| tracerite<1.1.2; python_version<="3.8" # older versions of python are not compatible with tracerite>1.1.2 |
There was a problem hiding this comment.
Wildness with a wildcard but these are helpful comments! 🙏
Summary
Fix sanic dependencies for testing
Testing
Run the ci pipeline
Category
slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapter/docsRequirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.shafter making the changes.