Bring back the old version variable · Pull Request #709 · Python-Markdown/markdown (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation3 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
To fix an AttributeError for backward-compatibility:
if markdown.version <= '2.2':
AttributeError: module 'markdown' has no attribute 'version'
In this case from django-rest-framework.
I'm really annoyed by this. I only want to have the __version__
variable, but a version variable name that is not consistent across versions is not very useful. Sigh.
Thanks for the patch.
Yeah, I feel your pain. My first reaction was to submit a PR to django-restframework, but then realized this will be a common problem with other code that uses Python-Markdown. The backwards-compatibility woes of a popular library. ;-)
This was referenced
Sep 24, 2018
waylan added a commit to waylan/markdown that referenced this pull request
waylan added a commit that referenced this pull request
buserp added a commit to DDMAL/Rodan that referenced this pull request
2 participants