Add Python 3.12 support#282
Conversation
xblock-sdk v0.9.0 includes a breaking change for XBlock versions before 2.0 but there is no upper constraint included in the requirements for this for all XBlock versions. Thus, all our tests have been failing since the release of xblock-sdk==0.9.0 on 2024-03-21. Update our test matrix to include XBlock versions 1.7 / 1.8 / 1.9 and add an upper constraint for xblock-sdk. The Open edX Quince release is using XBlock v1.8, which does pin the xblock-sdk to v0.7.0 so in this case we only need to add the constrait to our test runs.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #282 +/- ##
==========================================
- Coverage 95.43% 95.43% -0.01%
==========================================
Files 24 24
Lines 1973 1972 -1
==========================================
- Hits 1883 1882 -1
Misses 90 90 ☔ View full report in Codecov by Sentry. |
f346503 to
73b8006
Compare
|
I believe that to unbreak the tests on Python 3.12, you'll still need to add |
a6a642d to
70c216d
Compare
fghaas
left a comment
There was a problem hiding this comment.
Just a few thoughts here.
| - name: Install dependencies | ||
| run: | | ||
| pip install "tox<4" tox-gh-actions tox-pip-version | ||
| pip install "tox<4" tox-gh-actions tox-pip-version setuptools-scm |
There was a problem hiding this comment.
I think this addition is also not necessary, since we do pull in setuptools-scm via setup.py and base.txt now.
There was a problem hiding this comment.
I think I tried that and I got "Module not found" errors, but I will try again now.
There was a problem hiding this comment.
I tried again, and even with setuptools-scm in base.txt, gh-actions was missing this and all tests failed. So, I think we need this addition here.
There was a problem hiding this comment.
I completely understand that I'm nitpicking here, but I think mrtmm#9 has a more correct fix for this. :) What do you think?
There was a problem hiding this comment.
Sure, looks good. I merged and squashed it, not sure why the PR didn't close, I think I should have pushed the branch before squashing it.
3ed3dd1 to
2a5d7a6
Compare
* Add support for Python 3.12 * Also, update the GitHub Actions workflow matrix so that we test all supported pip versions with Python 3.8–3.11, but only pip 23 on Python 3.12.
fghaas
left a comment
There was a problem hiding this comment.
Looks good to me now, thanks!
Update test matrix:
Add support for Python 3.12