Thanks for the reply! I ended up forking the DRF repo and commenting out the lines causing me trouble...
As for the prevention of upgrading, I don't entirely understand it myself but my boss has said that it would be a few months working changing over to Markdown 3. We have built an extension of the markdown package that a lot of our projects rely on: https://verto.readthedocs.io/en/latest/ I believe this is why it's a hassle to upgrade right now. I'm stuck on a new problem now with serializing and abstract classes.... :( On Thursday, September 19, 2019 at 8:43:29 AM UTC+12, Ryan Kilby wrote: > > The compat code is executed at import time, so there's no trivial way to > override this. If you can't upgrade Markdown, then you'll need to downgrade > to DRF 3.9.x > > Out of curiosity, what's preventing you from upgrading to Markdown 3.x? > > On Tuesday, September 17, 2019 at 2:42:18 PM UTC-7, Courtney Bracefield > wrote: >> >> Hi there, >> >> I have Markdown 2.6 installed on my project and it is not feasible to >> update to version 3.0+ at this time. >> >> Thus in compat.py it successfully imports Markdown, however it breaks on >> line 213 because the highlight markdown preprocessor now uses register >> instead of add. >> >> The error is: >> >> Exception Type: AttributeError >> Exception Value: 'OrderedDict' object has no attribute 'register' >> >> Exception Location: /docker_venv/lib/python3.6/site-packages/ >> rest_framework/compat.py in md_filter_add_syntax_highlight, line 213 >> >> >> How can I get around this? >> >> Relevant issues/PRs I found: >> https://github.com/encode/django-rest-framework/pull/6722 >> https://github.com/encode/django-rest-framework/pull/6412 >> >> Thanks! >> > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/a5697398-5b07-4426-b3df-e428c1a1e901%40googlegroups.com.