-
Notifications
You must be signed in to change notification settings - Fork 27
refactor: update markdown to 3.8 and adapt extension code for compatibility #303
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
refactor: update markdown to 3.8 and adapt extension code for compatibility #303
Conversation
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.
You need to run make upgrade
using Python 3.12
env to keep the requirements consistent across all open edX repositories.
Other than that the changes look good to merge.
07b5cae
to
e0ab895
Compare
Thanks for the pull request, @wgu-ram-chandra! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Hi @UsamaSadiq, earlier when I ran |
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.
Looks good to merge.
Thanks @UsamaSadiq! Could you please merge this PR when you get a chance? I don’t have the necessary permissions to do so. |
Sure. You may also need to bump the package version if you need this package updated in edx-platform. |
e0ab895
to
a325702
Compare
Hi @UsamaSadiq, I’ve made the changes you requested, including bumping the version in |
package version https://pypi.org/project/openedx-django-wiki/3.1.1/ has been released with this change on PyPI |
Thank you @UsamaSadiq! |
Purpose
This PR resolves a compatibility issue with the
markdown
dependency, which surfaced while addressing edx-platform issue #35271.Background
The
edx-platform
currently pinsmarkdown
to<3.4.0
. When attempting to lift that constraint and upgrademarkdown
to the latest version (3.8
), tests in this repository failed due to breaking changes introduced inmarkdown>=3.4.0
.As outlined in the markdown 3.4 release notes, key breaking changes include:
md_globals
parameter fromExtension.extendMarkdown()
.add()
method with.register()
in processor registrationmarkdown.util.etree
to use the standard library'sxml.etree.ElementTree
Below is a sample illustration of changes from the 3.4 release notes

Changes Made
Upgraded
markdown
to version3.8
inbase.in
andtest.in
Refactored custom Markdown extensions to:
md_globals
usageadd()
withregister()
for preprocessor and treeprocessor registration'>inline'
,'>html_block'
)Ensured compatibility with the updated Markdown processing API
Verified all tests pass after the upgrade
Follow-Up
Once this PR is merged, it will unblock and help resolve:
edx-platform issue #35271
References