Skip to content

Fix Markdown version deprecation warning #6629

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

Closed
wants to merge 1 commit into from

Conversation

kevinmarsh
Copy link

The Markdown package deprecated markdown.version replacing it with markdown.__version__ in the 3.0 release (addressed in this PR). This fixes this deprecation warning I was getting when running pytest on my project using djangorestframework==3.9.3 with markdown==3.1 installed:

/usr/local/lib/python2.7/site-packages/rest_framework/test.py:21: in <module>
    from rest_framework.compat import coreapi, requests
/usr/local/lib/python2.7/site-packages/rest_framework/compat.py:192: in <module>
    if markdown.version <= '2.2':
/usr/local/lib/python2.7/site-packages/markdown/pep562.py:241: in __getattr__
    return self._get_attr(name)
/usr/local/lib/python2.7/site-packages/markdown/__init__.py:83: in __getattr__
    stacklevel=(3 if PY37 else 4)
E   DeprecationWarning: 'version' is deprecated. Use '__version__' instead.

The tests passed for both markdown==3.1 and markdown==2.6.11

@rpkilby
Copy link
Member

rpkilby commented May 1, 2019

Closing as a duplicate of #6576. In short, we're going to remove the version check and just bump the minimum version requirement of markdown.

@rpkilby rpkilby closed this May 1, 2019
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.

2 participants