-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set markdown to None in module cache to prevent it being imported by DRF. #11897
Set markdown to None in module cache to prevent it being imported by DRF. #11897
Conversation
Build Artifacts
|
2a415cf
to
d96bc00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirming manual qa checks out
Similarly to above, installing EXE asset on Windows 11 did complete eventually, but gave 2 errors, with apparently no user facing consequences, as I was able to go through the setup wizard, and import the facility from the Ubuntu VM. Zipped home folder:
|
Smoke test on pex and dmg work with no errors |
Merging to cut an rc2 and test the pi build from there |
96c528b
into
learningequality:release-v0.16.x
Summary
Django REST Framework automatically attempts to import the markdown module if available.
The version we use checks the
version
attribute, however the latest versions of the markdown module use version instead of version, and an error happens at runtime.Fix this by setting markdown to None in module cache.
This means that when DRF tries to import markdown, it will raise an ImportError and DRF will carry on, rather than trying to check the version.
References
Fixes #11895
Reviewer guidance
This is best tested in a fresh virtual environment using Python 3.11.
First download the whl file from this PR and install it into the virtual environment
pip install <path to whl file
.Then install markdown:
pip install markdown
Confirm that running Kolibri does not immediately give an error (as it does in the issue referenced).
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)