pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/py-markdown



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Oct 25 15:55:35 UTC 2022

Modified Files:
        pkgsrc/textproc/py-markdown: Makefile PLIST distinfo

Log Message:
py-markdown: updated to 3.4.1

Python-Markdown 3.4 Release Notes

Python-Markdown version 3.4 supports Python versions 3.7, 3.8, 3.9, 3.10 and
PyPy3.

Backwards-incompatible changes

The `tables` extension now uses a `style` attribute instead of an `align` attribute for alignment.

The [HTML4 spec][spec4] specifically deprecates the use of the `align` attribute
and it does not appear at all in the [HTML5 spec][spec5]. Therefore, by default,
the [tables] extension will now use the `style` attribute (setting just the
`text-align` property) in `td` and `th` blocks.

[spec4]: https://www.w3.org/TR/html4/present/graphics.html#h-15.1.2
[spec5]: https://www.w3.org/TR/html53/tabular-data.html#attributes-common-to-td-and-th-elements
[tables]: ../extensions/tables.md

The former behavior is available by setting the `use_align_attribute`
configuration option to `True` when enabling the extension.

For example, to configure the old `align` behavior:

```python
from markdown.extensions.tables import TableExtension

markdown.markdown(src, extensions=[TableExtension(use_align_attribute=True)])
```

Backslash unescaping moved to Treeprocessor.

Unescaping backslash escapes has been moved to a Treeprocessor, which  enables
proper HTML escaping during serialization. However, it is recognized that
various third-party extensions may be calling the old class at
`postprocessors.UnescapePostprocessor`. Therefore, the old class remains in the
code base, but has been deprecated and will be removed in a future release. The
new class `treeprocessors.UnescapeTreeprocessor` should be used instead.

Previously deprecated objects have been removed

Various objects were deprecated in version 3.0 and began raising deprecation
warnings (see the [version 3.0 release notes] for details). Any of those objects
which remained in version 3.3 have been removed from the code base in version 3.4
and will now raise errors. The relevant objects are listed below.

[version 3.0 release notes]: release-3.0.md

| Deprecated Object                      | Replacement Object                  |
|----------------------------------------|-------------------------------------|
| `markdown.version`                     | `markdown.__version__`              |
| `markdown.version_info`                | `markdown.__version_info__`         |
| `markdown.util.etree`                  | `xml.etree.ElementTree`             |
| `markdown.util.string_type`            | `str`                               |
| `markdown.util.text_type`              | `str`                               |
| `markdown.util.int2str`                | `chr`                               |
| `markdown.util.iterrange`              | `range`                             |
| `markdown.util.isBlockLevel`           | `markdown.Markdown().is_block_level`|
| `markdown.util.Processor().markdown`   | `markdown.util.Processor().md`      |
| `markdown.util.Registry().__setitem__` | `markdown.util.Registry().register` |
| `markdown.util.Registry().__delitem__` |`markdown.util.Registry().deregister`|
| `markdown.util.Registry().add`         | `markdown.util.Registry().register` |

In addition, the `md_globals` parameter of
`Markdown.extensions.Extension.extendMarkdown()` is no longer recognized as a
valid parameter and will raise an error if provided.

New features

The following new features have been included in the 3.4 release:

* Some new configuration options have been added to the
  [footnotes](../extensions/footnotes.md) extension:

    * Small refactor of the `BACKLINK_TITLE` option; The use of `format()`
      instead of "old" `%d` formatter allows one to specify text without the
      need to have the number of the footnote in it (like footnotes on
      Wikipedia for example). The modification is backward compatible so no
      configuration change is required.

    * Addition of a new option `SUPERSCRIPT_TEXT` that allows one to specify a
      custom placeholder for the footnote itself in the text.
      Ex: `[{}]` will give `<sup>[1]</sup>`, `({})` will give `<sup>(1)</sup>`,
      or by default, the current behavior: `<sup>1</sup>`.

* The [Table of Contents](../extensions/toc.md) extension now accepts a
  `toc_class` parameter which can be used to set the CSS class(es) on the
  `<div>` that contains the Table of Contents.

* The CodeHilite extension now supports a `pygments_formatter` option that can
  be set to a custom formatter class.

    - If `pygments_formatter` is set to a string (ex: `'html'`), Pygments'
      default formatter by that name is used.
    - If `pygments_formatter` is set to a formatter class (or any callable
      which returns a formatter instance), then an instance of that class is
      used.

    The formatter class is now passed an additional option, `lang_str`, to
    denote the language of the code block. While Pygments' built-in
    formatters will ignore the option, a custom formatter assigned to the
    `pygments_formatter` option can make use of the `lang_str` to include the
    code block's language in the output.

Bug fixes

The following bug fixes are included in the 3.4 release:

* Extension entry-points are only loaded if needed.
* Added additional checks to the `<pre><code>` handling of
  `PrettifyTreeprocessor`.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/textproc/py-markdown/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/textproc/py-markdown/PLIST
cvs rdiff -u -r1.17 -r1.18 pkgsrc/textproc/py-markdown/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/py-markdown/Makefile
diff -u pkgsrc/textproc/py-markdown/Makefile:1.25 pkgsrc/textproc/py-markdown/Makefile:1.26
--- pkgsrc/textproc/py-markdown/Makefile:1.25   Wed Jan  5 15:41:25 2022
+++ pkgsrc/textproc/py-markdown/Makefile        Tue Oct 25 15:55:35 2022
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2022/01/05 15:41:25 wiz Exp $
+# $NetBSD: Makefile,v 1.26 2022/10/25 15:55:35 adam Exp $
 
-DISTNAME=      Markdown-3.2.2
+DISTNAME=      Markdown-3.4.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:tl}
-PKGREVISION=   2
 CATEGORIES=    textproc python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=M/Markdown/}
 
@@ -13,11 +12,16 @@ LICENSE=    modified-bsd
 
 TEST_DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
 
-PYTHON_VERSIONS_INCOMPATIBLE=  27
+USE_LANGUAGES= # none
 
 USE_PKG_RESOURCES=     yes
 
-USE_LANGUAGES= # none
+PYTHON_VERSIONS_INCOMPATIBLE=  27
+
+.include "../../lang/python/pyversion.mk"
+.if ${_PYTHON_VERSION} < 310
+DEPENDS+=      ${PYPKGPREFIX}-importlib-metadata>=4.4.0:../../devel/py-importlib-metadata
+.endif
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \

Index: pkgsrc/textproc/py-markdown/PLIST
diff -u pkgsrc/textproc/py-markdown/PLIST:1.10 pkgsrc/textproc/py-markdown/PLIST:1.11
--- pkgsrc/textproc/py-markdown/PLIST:1.10      Mon Nov  1 21:43:46 2021
+++ pkgsrc/textproc/py-markdown/PLIST   Tue Oct 25 15:55:35 2022
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2021/11/01 21:43:46 wiz Exp $
+@comment $NetBSD: PLIST,v 1.11 2022/10/25 15:55:35 adam Exp $
 bin/markdown_py${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -81,12 +81,12 @@ ${PYSITELIB}/markdown/extensions/toc.pyo
 ${PYSITELIB}/markdown/extensions/wikilinks.py
 ${PYSITELIB}/markdown/extensions/wikilinks.pyc
 ${PYSITELIB}/markdown/extensions/wikilinks.pyo
+${PYSITELIB}/markdown/htmlparser.py
+${PYSITELIB}/markdown/htmlparser.pyc
+${PYSITELIB}/markdown/htmlparser.pyo
 ${PYSITELIB}/markdown/inlinepatterns.py
 ${PYSITELIB}/markdown/inlinepatterns.pyc
 ${PYSITELIB}/markdown/inlinepatterns.pyo
-${PYSITELIB}/markdown/pep562.py
-${PYSITELIB}/markdown/pep562.pyc
-${PYSITELIB}/markdown/pep562.pyo
 ${PYSITELIB}/markdown/postprocessors.py
 ${PYSITELIB}/markdown/postprocessors.pyc
 ${PYSITELIB}/markdown/postprocessors.pyo

Index: pkgsrc/textproc/py-markdown/distinfo
diff -u pkgsrc/textproc/py-markdown/distinfo:1.17 pkgsrc/textproc/py-markdown/distinfo:1.18
--- pkgsrc/textproc/py-markdown/distinfo:1.17   Mon Nov  1 21:43:46 2021
+++ pkgsrc/textproc/py-markdown/distinfo        Tue Oct 25 15:55:35 2022
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.17 2021/11/01 21:43:46 wiz Exp $
+$NetBSD: distinfo,v 1.18 2022/10/25 15:55:35 adam Exp $
 
-BLAKE2s (Markdown-3.2.2.tar.gz) = 66b3f1cfc741330c43f178471bcf5a70f1cd41407f31b919e4da0925db8d6049
-SHA512 (Markdown-3.2.2.tar.gz) = 72ce79b0daed4df2d09a458dad24da3e303143307640fb15d15cb10edc6c641d422dcf5043380c1572c4b9ed8f5fc11ec52e28928d8215d687309e4ce9ae3d7c
-Size (Markdown-3.2.2.tar.gz) = 299658 bytes
+BLAKE2s (Markdown-3.4.1.tar.gz) = d44dfd12c45346a47e266daa3bdb8a3e53842bc2df7fb9c40cd3911d989eda14
+SHA512 (Markdown-3.4.1.tar.gz) = 73b0006ac8aaf281a2dbc2c14534853dbb7ab26a620f3961975279feb83334b6868fa4bbcd30767189201a0c84e502dacd16783de3808393699ace0cbaab30a8
+Size (Markdown-3.4.1.tar.gz) = 322554 bytes



Home | Main Index | Thread Index | Old Index