diff --git a/docs/community/release-notes.md b/docs/community/release-notes.md index 0efc7fa6c2..e1fb87afd7 100644 --- a/docs/community/release-notes.md +++ b/docs/community/release-notes.md @@ -42,7 +42,8 @@ You can determine your currently installed version using `pip show`: ### 3.9.2 - IN DEVELOPMENT -... +* Resolve DeprecationWarning with markdown. [#6317][gh6317] +* Upgrade markdown to 3.0.1 to avoid deprecation issue. ### 3.9.1 diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index c800a5891f..5cef087254 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,6 +1,6 @@ # Optional packages which may be used with REST framework. psycopg2-binary==2.7.5 -markdown==2.6.11 +markdown==3.0.1 django-guardian==1.5.0 django-filter==1.1.0 coreapi==2.3.1 diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 5a4bcdf66c..77af69ddca 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -258,7 +258,7 @@ def repl(m): return ret.split("\n") def md_filter_add_syntax_highlight(md): - md.preprocessors.add('highlight', CodeBlockPreprocessor(), "_begin") + md.preprocessors.register(CodeBlockPreprocessor(), 'highlight', 40) return True else: def md_filter_add_syntax_highlight(md): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy