Repository navigation
Conversation
Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16911
Markdown 3.11.4 changed the inline delimiter cache API within the supported version range, causing stubtest to report five mismatches.
Target Markdown 3.11.4 and later compatible patch releases, replace the removed cache method with
build_cache, match the newget_cached_resultsignature, and declareEvaluatedTextas astrsubclass.Upstream implementation
Tests:
/bin/sh -c 'source .venv-313/bin/activate && python tests/regr_test.py Markdown --python-version 3.13 --verbosity VERBOSE'.Result: source .venv/bin/activate && UV_PYTHON=3.13.17 xvfb-run -a python tests/stubtest_third_party.py --ci-platforms-only --num-shards 4 --shard-index 3: exploratory exit 1. Markdown reproduced the five stubtest mismatches before the edit. ldap3 and pycups had unrelated local dependency-installation failures. Other tested distributions passed or were skipped by the runner.
Result: source .venv-313/bin/activate && UV_PYTHON=3.13.17 xvfb-run -a python tests/stubtest_third_party.py --ci-platforms-only Markdown: base exit 1, 5 errors across 33 modules with Markdown 3.11.4.
Result: source .venv-313/bin/activate && python tests/regr_test.py Markdown --python-version 3.13 --verbosity VERBOSE: base exit 1 with 6 diagnostics for the missing class and stale delimiter cache API.
Result: source .venv-313/bin/activate && python tests/regr_test.py Markdown --python-version 3.13 --verbosity VERBOSE: patched exit 0, Test completed successfully!
Result: source .venv-313/bin/activate && UV_PYTHON=3.13.17 xvfb-run -a python tests/stubtest_third_party.py --ci-platforms-only Markdown: patched exit 0, Markdown... success (4.78 s).
Result: source .venv-313/bin/activate && UV_PYTHON=3.13.17 xvfb-run -a python -u tests/runtests.py --run-stubtest stubs/Markdown: patched exit 0. Pre-commit, repository structure, Pyright, ty, pyrefly, mypy, stubtest, and both regression runners passed.
Result: PYTHONPATH=/tmp/oss-scout-markdown-3113 .venv-313/bin/python /tmp/oss-scout-markdown-cache-check.py && PYTHONPATH=/tmp/oss-scout-markdown-3114 .venv-313/bin/python /tmp/oss-scout-markdown-cache-check.py: exit 0. Both upstream versions produced the expected HTML for all four inputs. The 3.11.4 trace observed cache reads with no position and with position 26.
Regression coverage:
stubs/Markdown/@tests/test_cases/check_inlinepatterns.py.Drafted by Codex.