Upgrade to Python 3.11 - #14
Draft
olmos-keepsafe wants to merge 20 commits into
Draft
Conversation
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.
Summary
Upgrades
html-structure-diffto Python 3.11 and establishes the Python-3.11-onlysdiff==2.0.0line on Mistune 3.3.4 while preserving the package’s public parsing, rendering, and structural-diff behavior.Changes
setup.pyandsetup.cfgwithpyproject.toml.--py311-plus.pip-compile.make mistune-compatworkflow that creates a fresh Mistune 0.8.4 oracle under/tmp, runs the comparison, and removes it afterward.This repository is a library/tool rather than a service, so service-only migration work such as Docker Compose, Gunicorn, backing services, and runtime health checks is intentionally excluded.
Compatibility
The Mistune 3.3.4 adapter preserves the documented
sdiffparser, renderer, model, structural-diff, link-diff, HTML, list, link/image, and Zendesk behavior previously produced with Mistune 0.8.4.Compatibility is protected by:
make testrun.One intentional improvement fixes a Mistune 0.8-era bug where constructing a Zendesk parser mutated shared
MdParserrules and could break later plain-parser instances. Private Mistune 0.8 implementation classes and attributes are not part of the supportedsdiffpublic API.Downstream impact
sdiff==2.xrequires Python 3.11. Downstream consumers should adopt this release only as part of their own Python 3.11 migrations and rerun their service-level compatibility and integration proof.Known consumers:
content-validatordirectly importssdiffAPIs and currently references the pre-Mistune-upgrade immutable revision. Its Python 3.11 migration should move to the final 2.x tag or immutable revision. Its local suite passed against this branch with 65 tests passing and one expected skip.email-serviceconsumessdifftransitively throughcontent-validator. It should update after migrating to Python 3.11 and adopting a compatiblecontent-validatorrelease.translation-real-time-validatonalso consumessdifftransitively throughcontent-validatorand will need the same dependency refresh and service-level verification.Consumers that have not migrated to Python 3.11 should remain on the legacy
sdiffrelease line.This pull request makes the Python 3.11/Mistune 3-compatible library available but does not modify or deploy downstream repositories.
Validation
sdiff/parser.pyreached 100% statement and 99% branch coverage.pip checkreported no broken requirements.twine checkpassed for both package artifacts.--next, and processed-config validation.content-validatorproof passed: 65 tests and one expected skip.git diff --checkpassed.Linear
BE-96: Upgrade html-structure to Python 3.11
Fixes BE-96