Skip to content

fix bugs in Python test scripts#815

Merged
jgm merged 2 commits intocommonmark:masterfrom
mldangelo:fix-python-test-bugs
Dec 20, 2025
Merged

fix bugs in Python test scripts#815
jgm merged 2 commits intocommonmark:masterfrom
mldangelo:fix-python-test-bugs

Conversation

@mldangelo
Copy link
Copy Markdown
Contributor

This fixes two bugs in the test infrastructure:

normalize.py - urllib.quote and urllib.unquote were moved to urllib.parse in Python 3 and no longer exist in the urllib module. This causes an AttributeError when the code path is triggered.

cmark.py - The C function cmark_markdown_to_html(text, len, options) takes 3 arguments, but argtypes only defined 2. Added c_int for the options parameter.

Thanks for maintaining CommonMark!

urllib.quote and urllib.unquote were moved to urllib.parse in Python 3.
cmark_markdown_to_html takes 3 arguments (text, len, options) but argtypes
only defined 2. Added c_int for the options parameter.
@jgm jgm merged commit c31a288 into commonmark:master Dec 20, 2025
@jgm
Copy link
Copy Markdown
Member

jgm commented Dec 20, 2025

thanks for this!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants