pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/py-markdown-it-py



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Jun  6 08:21:18 UTC 2023

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

Log Message:
py-markdown-it-py: update to 3.0.0.

## 3.0.0 - 2023-06-03

⚠️ This release contains some minor breaking changes in the internal API and improvements to the parsing strictness.

**Full Changelog**: <https://github.com/executablebooks/markdown-it-py/compare/v2.2.0...v3.0.0>

### ⬆️ UPGRADE: Drop support for Python 3.7

Also add testing for Python 3.11

### ⬆️ UPGRADE: Update from upstream markdown-it `12.2.0` to `13.0.0`

A key change is the addition of a new `Token` type, `text_special`, which is used to represent HTML entities and backslash escaped characters.
This ensures that (core) typographic transformation rules are not incorrectly applied to these texts.
The final core rule is now the new `text_join` rule, which joins adjacent `text`/`text_special` tokens,
and so no `text_special` tokens should be present in the final token stream.
Any custom typographic rules should be inserted before `text_join`.

A new `linkify` rule has also been added to the inline chain, which will linkify full URLs (e.g. `https://example.com`),
and fixes collision of emphasis and linkifier (so `http://example.org/foo._bar_-_baz` is now a single link, not emphasized).
Emails and fuzzy links are not affected by this.

* ♻️ Refactor backslash escape logic, add `text_special` [#276](https://github.com/executablebooks/markdown-it-py/pull/276)
* ♻️ Parse entities to `text_special` token [#280](https://github.com/executablebooks/markdown-it-py/pull/280)
* ♻️ Refactor: Add linkifier rule to inline chain for full links [#279](https://github.com/executablebooks/markdown-it-py/pull/279)
* ‼️ Remove `(p)` => `§` replacement in typographer [#281](https://github.com/executablebooks/markdown-it-py/pull/281)
* ‼️ Remove unused `silent` arg in `ParserBlock.tokenize` [#284](https://github.com/executablebooks/markdown-it-py/pull/284)
* 🐛 FIX: numeric character reference passing [#272](https://github.com/executablebooks/markdown-it-py/pull/272)
* 🐛 Fix: tab preventing paragraph continuation in lists [#274](https://github.com/executablebooks/markdown-it-py/pull/274)
* 👌 Improve nested emphasis parsing [#273](https://github.com/executablebooks/markdown-it-py/pull/273)
* 👌 fix possible ReDOS in newline rule [#275](https://github.com/executablebooks/markdown-it-py/pull/275)
* 👌 Improve performance of `skipSpaces`/`skipChars` [#271](https://github.com/executablebooks/markdown-it-py/pull/271)
* 👌 Show text of `text_special` in `tree.pretty` [#282](https://github.com/executablebooks/markdown-it-py/pull/282)

### ♻️ REFACTOR: Replace most character code use with strings

The use of `StateBase.srcCharCode` is deprecated (with backward-compatibility), and all core uses are replaced by `StateBase.src`.

Conversion of source string characters to an integer representing the Unicode character is prevalent in the upstream JavaScript implementation, to improve performance.
However, it is unnecessary in Python and leads to harder to read code and performance deprecations (during the conversion in the `StateBase` initialisation).

See [#270](https://github.com/executablebooks/markdown-it-py/pull/270), thanks to [@hukkinj1](https://github.com/hukkinj1).

### ♻️ Centralise indented code block tests

For CommonMark, the presence of indented code blocks prevent any other block element from having an indent of greater than 4 spaces.
Certain Markdown flavors and derivatives, such as mdx and djot, disable these code blocks though, since it is more common to use code fences and/or arbitrary indenting is desirable.
Previously, disabling code blocks did not remove the indent limitation, since most block elements had the 3 space limitation hard-coded.
This change centralised the logic of applying this limitation (in `StateBlock.is_code_block`), and only applies it when indented code blocks are enabled.

This allows for e.g.

```md
<div>
  <div>

    I can indent as much as I want here.

  <div>
<div>
```

See [#260](https://github.com/executablebooks/markdown-it-py/pull/260)

### 🔧 Maintenance changes

Strict type annotation checking has been applied to the whole code base,
[ruff](https://github.com/charliermarsh/ruff) is now used for linting,
and fuzzing tests have been added to the CI, to integrate with Google [OSS-Fuzz](https://github.com/google/oss-fuzz/tree/master/projects/markdown-it-py) testing, thanks to 
[@DavidKorczynski](https://github.com/DavidKorczynski).

* 🔧 MAINTAIN: Make type checking strict [#](https://github.com/executablebooks/markdown-it-py/pull/267)
* 🔧 Add typing of rule functions [#283](https://github.com/executablebooks/markdown-it-py/pull/283)
* 🔧 Move linting from flake8 to ruff [#268](https://github.com/executablebooks/markdown-it-py/pull/268)
* 🧪 CI: Add fuzzing workflow for PRs [#262](https://github.com/executablebooks/markdown-it-py/pull/262)
* 🔧 Add tox env for fuzz testcase run [#263](https://github.com/executablebooks/markdown-it-py/pull/263)
* 🧪 Add OSS-Fuzz set up by @DavidKorczynski in [#255](https://github.com/executablebooks/markdown-it-py/pull/255)
* 🧪 Fix fuzzing test failures [#254](https://github.com/executablebooks/markdown-it-py/pull/254)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/py-markdown-it-py/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/py-markdown-it-py/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/py-markdown-it-py/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-it-py/Makefile
diff -u pkgsrc/textproc/py-markdown-it-py/Makefile:1.3 pkgsrc/textproc/py-markdown-it-py/Makefile:1.4
--- pkgsrc/textproc/py-markdown-it-py/Makefile:1.3      Sun Mar  5 07:27:37 2023
+++ pkgsrc/textproc/py-markdown-it-py/Makefile  Tue Jun  6 08:21:18 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2023/03/05 07:27:37 adam Exp $
+# $NetBSD: Makefile,v 1.4 2023/06/06 08:21:18 wiz Exp $
 
-DISTNAME=      markdown-it-py-2.2.0
+DISTNAME=      markdown-it-py-3.0.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    textproc python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=m/markdown-it-py/}
@@ -15,7 +15,7 @@ DEPENDS+=     ${PYPKGPREFIX}-mdurl>=0.1:../.
 
 USE_LANGUAGES= # none
 
-PYTHON_VERSIONS_INCOMPATIBLE=  27
+PYTHON_VERSIONS_INCOMPATIBLE=  27 37
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \

Index: pkgsrc/textproc/py-markdown-it-py/PLIST
diff -u pkgsrc/textproc/py-markdown-it-py/PLIST:1.1 pkgsrc/textproc/py-markdown-it-py/PLIST:1.2
--- pkgsrc/textproc/py-markdown-it-py/PLIST:1.1 Mon Feb 20 10:52:16 2023
+++ pkgsrc/textproc/py-markdown-it-py/PLIST     Tue Jun  6 08:21:18 2023
@@ -1,14 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1 2023/02/20 10:52:16 adam Exp $
+@comment $NetBSD: PLIST,v 1.2 2023/06/06 08:21:18 wiz Exp $
 bin/markdown-it-${PYVERSSUFFIX}
-${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER
-${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
-${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.markdown-it
-${PYSITELIB}/${WHEEL_INFODIR}/METADATA
-${PYSITELIB}/${WHEEL_INFODIR}/RECORD
-${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED
-${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
-${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json
-${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
 ${PYSITELIB}/markdown_it/__init__.py
 ${PYSITELIB}/markdown_it/__init__.pyc
 ${PYSITELIB}/markdown_it/_compat.py
@@ -103,6 +94,8 @@ ${PYSITELIB}/markdown_it/rules_core/smar
 ${PYSITELIB}/markdown_it/rules_core/smartquotes.pyc
 ${PYSITELIB}/markdown_it/rules_core/state_core.py
 ${PYSITELIB}/markdown_it/rules_core/state_core.pyc
+${PYSITELIB}/markdown_it/rules_core/text_join.py
+${PYSITELIB}/markdown_it/rules_core/text_join.pyc
 ${PYSITELIB}/markdown_it/rules_inline/__init__.py
 ${PYSITELIB}/markdown_it/rules_inline/__init__.pyc
 ${PYSITELIB}/markdown_it/rules_inline/autolink.py
@@ -117,12 +110,16 @@ ${PYSITELIB}/markdown_it/rules_inline/en
 ${PYSITELIB}/markdown_it/rules_inline/entity.pyc
 ${PYSITELIB}/markdown_it/rules_inline/escape.py
 ${PYSITELIB}/markdown_it/rules_inline/escape.pyc
+${PYSITELIB}/markdown_it/rules_inline/fragments_join.py
+${PYSITELIB}/markdown_it/rules_inline/fragments_join.pyc
 ${PYSITELIB}/markdown_it/rules_inline/html_inline.py
 ${PYSITELIB}/markdown_it/rules_inline/html_inline.pyc
 ${PYSITELIB}/markdown_it/rules_inline/image.py
 ${PYSITELIB}/markdown_it/rules_inline/image.pyc
 ${PYSITELIB}/markdown_it/rules_inline/link.py
 ${PYSITELIB}/markdown_it/rules_inline/link.pyc
+${PYSITELIB}/markdown_it/rules_inline/linkify.py
+${PYSITELIB}/markdown_it/rules_inline/linkify.pyc
 ${PYSITELIB}/markdown_it/rules_inline/newline.py
 ${PYSITELIB}/markdown_it/rules_inline/newline.pyc
 ${PYSITELIB}/markdown_it/rules_inline/state_inline.py
@@ -131,11 +128,18 @@ ${PYSITELIB}/markdown_it/rules_inline/st
 ${PYSITELIB}/markdown_it/rules_inline/strikethrough.pyc
 ${PYSITELIB}/markdown_it/rules_inline/text.py
 ${PYSITELIB}/markdown_it/rules_inline/text.pyc
-${PYSITELIB}/markdown_it/rules_inline/text_collapse.py
-${PYSITELIB}/markdown_it/rules_inline/text_collapse.pyc
 ${PYSITELIB}/markdown_it/token.py
 ${PYSITELIB}/markdown_it/token.pyc
 ${PYSITELIB}/markdown_it/tree.py
 ${PYSITELIB}/markdown_it/tree.pyc
 ${PYSITELIB}/markdown_it/utils.py
 ${PYSITELIB}/markdown_it/utils.pyc
+${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.markdown-it
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json
+${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt

Index: pkgsrc/textproc/py-markdown-it-py/distinfo
diff -u pkgsrc/textproc/py-markdown-it-py/distinfo:1.2 pkgsrc/textproc/py-markdown-it-py/distinfo:1.3
--- pkgsrc/textproc/py-markdown-it-py/distinfo:1.2      Sun Mar  5 07:27:37 2023
+++ pkgsrc/textproc/py-markdown-it-py/distinfo  Tue Jun  6 08:21:18 2023
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.2 2023/03/05 07:27:37 adam Exp $
+$NetBSD: distinfo,v 1.3 2023/06/06 08:21:18 wiz Exp $
 
-BLAKE2s (markdown-it-py-2.2.0.tar.gz) = acc8bf0cd757c6027db4716829bb250f594d43c2fdc61ba7885621f666397536
-SHA512 (markdown-it-py-2.2.0.tar.gz) = 3b9b8d91dd21cdc750025588fe489ad82b1f9003fdb50b179c4657f2c1fdc3a69c32d7532896fc2303a544e4576dada30ea7ec139024983aa693f93d17df3a34
-Size (markdown-it-py-2.2.0.tar.gz) = 67120 bytes
+BLAKE2s (markdown-it-py-3.0.0.tar.gz) = 6dce14563475d1c36927e0b3b9b81923a37e6b8d7c9626967d9fd858383e5488
+SHA512 (markdown-it-py-3.0.0.tar.gz) = a862b450ad1d530320d9ece7b2dc370152105c568e9d79df622aaba84b986a3e24326f6cbca313d66edf9a61823d91076b815f81b978fae663d6d7cc239a5ac1
+Size (markdown-it-py-3.0.0.tar.gz) = 74596 bytes



Home | Main Index | Thread Index | Old Index