-
Notifications
You must be signed in to change notification settings - Fork 571
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Mistune v3 #1820
Update to Mistune v3 #1820
Conversation
Any plans to backport that PR for 6.5.x? |
6871973
to
bc04451
Compare
You should try discussing that in #1809. Anyway, Mistune 2.0 took a very long release cycle:
So maybe when version 3.0 lands it won't make sense to use nbconvert 6.5 anymore. |
No, while we (mainly @TiagodePAlves) did our best to preserve backward compatibility, there are just too many differences between the versions, which is what is prompting us to move to 7.0 in the first place. |
Just tested this PR and looks like it is not possible to apply it on top of 6.5.3 + /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-nbconvert-Update-to-Mistune-v3.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
2 out of 4 hunks FAILED -- saving rejects to file nbconvert/filters/markdown_mistune.py.rej
1 out of 1 hunk FAILED -- saving rejects to file pyproject.toml.rej
6 out of 6 hunks FAILED -- saving rejects to file nbconvert/filters/markdown_mistune.py.rej
1 out of 1 hunk FAILED -- saving rejects to file nbconvert/filters/markdown_mistune.py.rej
2 out of 3 hunks FAILED -- saving rejects to file nbconvert/filters/markdown_mistune.py.rej |
Also, there is a built-in math plugin in mistune v3. Can you review it? If there should be something required to change, please let me know. |
https://pypi.org/project/mistune/3.0.0/ is out now! |
Incompatible w/ mistune-3, see jupyter/nbconvert#1820. Closes: https://bugs.gentoo.org/908377 Signed-off-by: Sam James <sam@gentoo.org>
Just updated to Mistune v3. There are a lot of changes for Now, the |
Check links is failing because |
Oh, makes sense. I think it should be okay to support both, I just hadn't considered it. |
Ok, I had to keep two versios of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thank you! I'll make a new minor release early next week.
Mistune v3 is already in Pre-Release on PyPi, with a few incompatibilities. Not a lot of changes on our side, besides moving regexes to new variables and updating methods to the new API.
I haven't tested on older Python versions (< 3.10) yet, just waiting for a proper release.
Highlights in Mistune Code
re.Scanner
(see commits), we can even used named groups now!