Skip to content

Make Markdown 2.6 the minimum compatible version #6576

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

Merged
merged 6 commits into from
May 9, 2019
Merged

Make Markdown 2.6 the minimum compatible version #6576

merged 6 commits into from
May 9, 2019

Conversation

timgates42
Copy link
Contributor

@timgates42 timgates42 commented Apr 8, 2019

The latest version of Markdown now displays a deprecation warning if
accessing markdown.version, by careful use of checking the type and
existence of markdown.__version__ it is possible to handle the changes
to markdown over various releases where markdown.__version__ at first
did not exist before being a module and finally being just a string.

@carltongibson carltongibson added this to the 3.10 Release milestone Apr 8, 2019
@carltongibson
Copy link
Collaborator

Related to #6412. For 3.10 we may just want to bump the required markdown version. (?)

@rpkilby
Copy link
Member

rpkilby commented Apr 8, 2019

Agreed - markdown 2.2 dates to 2012, and 2.5 to 2014. I don't think we need to support versions that outdated.

@timgates42
Copy link
Contributor Author

Ok satisfied the linter, happy if you want to stop supporting old versions otherwise feel free to approve and merge my commit to avoid the warning

@timgates42
Copy link
Contributor Author

I had a look at requiring markdown>2.6 but markdown is only an optional extra not a requirement so you can't add a requirements markdown>=2.6 that I can see, the option would be to alter the documentation to hint markdown >= 2.6 was required and perhaps add a warning for lower markdown versions or raise an exception or simply refuse processing markdown if the library is too low. None seem great options, I think the current PR might be the lesser evil.

@timgates42
Copy link
Contributor Author

I made an alternative at https://github.com/timgates42/django-rest-framework/commit/64b311a8163b66a4527d2f02b8efb5adec30b745 which adjusts the documentation and drops support but not sure I like it

@rpkilby
Copy link
Member

rpkilby commented May 1, 2019

@timgates42 let's go with https://github.com/timgates42/django-rest-framework/commit/64b311a8163b66a4527d2f02b8efb5adec30b745, although I would remove the version change from rest_framework.__init__

@timgates42
Copy link
Contributor Author

Thanks @rpkilby adjusted accordingly.

@rpkilby rpkilby changed the title Adjust Markdown Version Checks to Avoid Warning Make Markdown 2.6 the minimum compatible version May 9, 2019
@rpkilby
Copy link
Member

rpkilby commented May 9, 2019

Thanks @timgates42!

@rpkilby rpkilby merged commit 564fadd into encode:master May 9, 2019
@timgates42
Copy link
Contributor Author

Your welcome @rpkilby thanks for helping me get this in and get rid of the deprecation warning.

@rpkilby
Copy link
Member

rpkilby commented May 9, 2019

🥂

terencehonles pushed a commit to terencehonles/django-rest-framework that referenced this pull request Oct 8, 2020
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants