chore: update actions and test with python 311 #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support to Python 3.8 and 3.11, drops support for the previous version of Python, and fixes the issues related to this support.
Changes
np.complex
to usecomplex
based on a deprecation in numpy 1.20. Ref: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsimp
withimportlib
because imp was deprecated in Python 3.4. Ref: https://docs.python.org/3/whatsnew/3.4.html#importlibpygments
for the doc, and addvs-min
as the code theme to maintain the docpycon
highlight.asXML()
function because it was deprecated and usexml
and a custom function. Ref: https://github.com/pyparsing/pyparsing/blob/96d44647450463a7b9c0962b03f3aeb0d1f165d5/CHANGES#L1183dicttoxml
, which already has the function, but when using thepython_lib.zip
file, Studio doesn't encounter that requirement, and we should add it in the openedx sandbox requirements or add it as a codejail requirement and build the image. I propose using the XML package and creating a function to avoid that path.How to test
Code
Integration
Environment
Data
For more info:
tutor dev do importdemocourse -h
Test
python_lib.zip
and add this one:python_lib.zip
Note
If you want to create your python_lib from this version, you can clone the repo, enter in it, and then:
Doc
cd
.pip install -r requirements.txt
.mkdocs serve
.Screencasts
I test the StringGraders, MatrixGraders, and SumGraders in the following video:
Screencast.from.2024-11-07.18-23-57.webm
Things checked
Following work