Skip to content

Upgrade to Python 3.11#14

Draft
olmos-keepsafe wants to merge 10 commits into
masterfrom
python311-upgrade
Draft

Upgrade to Python 3.11#14
olmos-keepsafe wants to merge 10 commits into
masterfrom
python311-upgrade

Conversation

@olmos-keepsafe

@olmos-keepsafe olmos-keepsafe commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Upgrades html-structure-diff to the shared Python 3.11 library/tool conventions while preserving its public parsing, rendering, and structural-diff behavior.

Changes

  • Standardize local development, packaging, and CI on Python 3.11.13.
  • Replace setup.py and setup.cfg with pyproject.toml.
  • Bump the package version from 1.0.0 to 1.1.0.
  • Apply and verify the complete pyupgrade ladder through --py311-plus.
  • Add native CircleCI 2.1 configuration.
  • Add reproducible runtime and development requirements generated with pip-compile.
  • Add package-oriented Makefile targets for setup, linting, tests, dependency checks, requirements generation, and package builds.
  • Add golden compatibility coverage for 12 behavior-sensitive Markdown scenarios.
  • Include Markdown and JSON test fixtures in the source distribution.
  • Add import, fixture, wheel-install, and package metadata smoke coverage.

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 existing Mistune 0.8.4 behavior remains pinned and covered by golden fixtures. Upgrading to Mistune 3.x is intentionally outside the scope of this pull request.

Downstream impact

Version 1.1.0 requires Python 3.11, so downstream consumers should update to this release as part of their own Python 3.11 migrations.

Known consumers:

  • content-validator directly imports sdiff APIs and currently references version 1.0.0. Its Python 3.11 migration should update the dependency to 1.1.0 and rerun its compatibility and integration proof.
  • email-service consumes sdiff transitively through content-validator. Its generated requirements currently reference the older 0.4.1 tag and will need to be regenerated after upgrading Python and content-validator.
  • translation-real-time-validaton also consumes sdiff transitively through content-validator and currently references the older 0.4.1 tag. Its Python 3.11 migration will need the same dependency refresh and service-level verification.

This pull request makes the Python 3.11-compatible library release available but does not update those downstream repositories or claim their service flows have been verified. Each consumer must run its own tests and integration proof after adopting the new package version.

Validation

  • 54 tests passed on Python 3.11.13.
  • 96% branch-aware coverage.
  • Flake8 passed.
  • All 12 golden compatibility scenarios passed.
  • Public API/import smoke passed.
  • pip check reported no broken requirements.
  • Python compile smoke passed.
  • Source distribution and wheel built successfully.
  • twine check passed for both distribution artifacts.
  • Isolated wheel installation and structural-diff smoke passed.
  • CircleCI configuration passed standard, --next, and processed-config validation.
  • Generated requirements were stable across consecutive runs.

Linear

BE-96: Upgrade html-structure to Python 3.11

Fixes BE-96

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.

1 participant