Skip to content

Conversation

@mjschultz
Copy link
Contributor

The current apply_markdown generates the following DeprecationWarnings:

markdown/__init__.py:143: DeprecationWarning: "safe_mode" is deprecated in Python-Markdown. Use an HTML sanitizer (like Bleach http://bleach.readthedocs.org/) if you are parsing untrusted markdown text. See the 2.6 release notes for more info

markdown/__init__.py:222: DeprecationWarning: Setting configs in the Named Extension string is deprecated. It is recommended that you pass an instance of the extension class to Markdown or use the "extension_configs" keyword. The current behavior will raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.

markdown/__init__.py:259: DeprecationWarning: Using short names for Markdown's builtin extensions is deprecated. Use the full path to the extension with Python's dot notation (eg: "markdown.extensions.headerid" instead of "headerid"). The current behavior will raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.

These three commits correct them per the Python-Markdown 2.6 release notes.

@jpadilla
Copy link
Contributor

jpadilla commented Nov 6, 2015

@mjschultz looks good to me, thanks!

@lovelydinosaur
Copy link
Contributor

Great. Which versions does this now work against? Do we need to double check that against what we current list as supported?

@mjschultz
Copy link
Contributor Author

It looks like extension_configs was introduced in python-markdown 2.5 which has been out for a year. I'm not sure what version(s) of markdown you'd like to support down to though?

Is there a way to automate this or should I manually verify markdown versions from current down to something?

@mjschultz
Copy link
Contributor Author

Here is what I have right now running ./runtests.py --fast:

env py2.7 py3.4
markdown==2.6.4 x x
markdown==2.5.2 x x
markdown==2.4.1 x x
markdown==2.3.1 x x
markdown==2.2.1 x x
markdown==2.1.1 x x
markdown==2.0.3

@lovelydinosaur
Copy link
Contributor

Okay. Currently the homepage lists 2.1.0+ as our requirement.
We could either:

  • Bump to 2.2 (Not ideal since it'd be in a minor release)
  • Ensure that the compat handles both styles dep on what's available.
  • Something else?

@mjschultz
Copy link
Contributor Author

Okay, it turns out in markdown 2.2 they changed the extensions framework a bit to permit external modules with more ease. This means that 2.1 would force a markdown.extensions in front of the headerid causing the errors.

I added some changes that check markdown.version and set the headerid extension path based on that. I updated the checklist above.

I also bumped the markdown version in requirements-optionals.txt.

@xordoquy
Copy link
Contributor

Closed in favor of #3842.
Thanks @mjschultz and sorry this didn't got merged faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants