| 1 |
title: Release Notes for v2.3 |
| 2 |
|
| 3 |
Python-Markdown 2.3 Release Notes |
| 4 |
================================= |
| 5 |
|
| 6 |
We are pleased to release Python-Markdown 2.3 which adds one new extension, |
| 7 |
removes a few old (obsolete) extensions, and now runs on both Python 2 and |
| 8 |
Python 3 without running the 2to3 conversion tool. See the list of changes |
| 9 |
below for details. |
| 10 |
|
| 11 |
Python-Markdown supports Python versions 2.6, 2.7, 3.1, 3.2, and 3.3. |
| 12 |
|
| 13 |
Backwards-incompatible Changes |
| 14 |
------------------------------ |
| 15 |
|
| 16 |
* Support has been dropped for Python 2.5. No guarantees are made that the |
| 17 |
library will work in any version of Python lower than 2.6. As all supported |
| 18 |
Python versions include the ElementTree library, Python-Markdown will no |
| 19 |
longer try to import a third-party installation of ElementTree. |
| 20 |
|
| 21 |
* All classes are now "new-style" classes. In other words, all classes subclass |
| 22 |
from 'object'. While this is not likely to affect most users, extension |
| 23 |
authors may need to make a few minor adjustments to their code. |
| 24 |
|
| 25 |
* "safe_mode" has been further restricted. Markdown formatted links must be of a |
| 26 |
known white-listed scheme when in "safe_mode" or the URL is discarded. The |
| 27 |
white-listed schemes are: 'HTTP', 'HTTPS', 'FTP', 'FTPS', 'MAILTO', and |
| 28 |
'news'. Schemeless URLs are also permitted, but are checked in other ways - as |
| 29 |
they have been for some time. |
| 30 |
|
| 31 |
* The ids assigned to footnotes now contain a dash (`-`) rather than a colon |
| 32 |
(`:`) when `output_format` it set to `"html5"` or `"xhtml5"`. If you are |
| 33 |
making reference to those ids in your JavaScript or CSS and using the HTML5 |
| 34 |
output, you will need to update your code accordingly. No changes are |
| 35 |
necessary if you are outputting XHTML (the default) or HTML4. |
| 36 |
|
| 37 |
* The `force_linenos` configuration setting of the CodeHilite extension has been |
| 38 |
marked as **Pending Deprecation** and a new setting `linenums` has been added |
| 39 |
to replace it. See documentation for the [CodeHilite Extension] for an |
| 40 |
explanation of the new `linenums` setting. The new setting will honor the old |
| 41 |
`force_linenos` if it is set, but it will raise a `PendingDeprecationWarning` |
| 42 |
and will likely be removed in a future version of Python-Markdown. |
| 43 |
|
| 44 |
[CodeHilite Extension]: ../extensions/code_hilite.md |
| 45 |
|
| 46 |
* The "RSS" extension has been removed and no longer ships with Python-Markdown. |
| 47 |
If you would like to continue using the extension (not recommended), it is |
| 48 |
archived on [GitHub](https://gist.github.com/waylan/4773365). |
| 49 |
|
| 50 |
* The "HTML Tidy" Extension has been removed and no longer ships with |
| 51 |
Python-Markdown. If you would like to continue using the extension (not |
| 52 |
recommended), it is archived on |
| 53 |
[GitHub](https://gist.github.com/waylan/5152650). Note that the underlying |
| 54 |
library, uTidylib, is not Python 3 compatible. Instead, it is recommended that |
| 55 |
the newer [PyTidyLib] (version 0.2.2+ for Python 3 comparability - install |
| 56 |
from GitHub not PyPI) be used. As the API for that library is rather simple, |
| 57 |
it is recommended that the output of Markdown be wrapped in a call to |
| 58 |
PyTidyLib rather than using an extension (for example: |
| 59 |
`tidylib.tidy_fragment(markdown.markdown(source), options={...})`). |
| 60 |
|
| 61 |
[PyTidyLib]: http://countergram.github.io/pytidylib/ |
| 62 |
|
| 63 |
What's New in Python-Markdown 2.3 |
| 64 |
--------------------------------- |
| 65 |
|
| 66 |
* The entire code base now universally runs in Python 2 and Python 3 without any |
| 67 |
need for running the 2to3 conversion tool. This not only simplifies testing, |
| 68 |
but by using Unicode_literals, results in more consistent behavior across |
| 69 |
Python versions. Additionally, the relative imports (made possible in Python 2 |
| 70 |
via absolute_import) allows the entire library to more easily be embedded in a |
| 71 |
sub-directory of another project. The various files within the library will |
| 72 |
still import each other properly even though 'markdown' may not be in Python's |
| 73 |
root namespace. |
| 74 |
|
| 75 |
* The [Admonition Extension] has been added, which implements [rST-style][rST] |
| 76 |
admonitions in the Markdown syntax. However, be warned that this extension is |
| 77 |
experimental and the syntax and behavior is still subject to change. Please |
| 78 |
try it out and report bugs and/or improvements. |
| 79 |
|
| 80 |
[Admonition Extension]: ../extensions/admonition.md |
| 81 |
[rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions |
| 82 |
|
| 83 |
* Various bug fixes have been made. See the [commit |
| 84 |
log](https://github.com/Python-Markdown/markdown/commits/master) for a |
| 85 |
complete history of the changes. |