refactor: update markdown to 3.8 and adapt extension code for compatibility#303
Conversation
UsamaSadiq
left a comment
There was a problem hiding this comment.
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. DetailsWhere 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 |
|
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
markdowndependency, which surfaced while addressing edx-platform issue #35271.Background
The
edx-platformcurrently pinsmarkdownto<3.4.0. When attempting to lift that constraint and upgrademarkdownto 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_globalsparameter fromExtension.extendMarkdown().add()method with.register()in processor registrationmarkdown.util.etreeto use the standard library'sxml.etree.ElementTreeBelow is a sample illustration of changes from the 3.4 release notes

Changes Made
Upgraded
markdownto version3.8inbase.inandtest.inRefactored custom Markdown extensions to:
md_globalsusageadd()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