Skip to content

Upgrade to Python 3.11#39

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

Upgrade to Python 3.11#39
olmos-keepsafe wants to merge 4 commits into
masterfrom
python311-upgrade

Conversation

@olmos-keepsafe
Copy link
Copy Markdown

@olmos-keepsafe olmos-keepsafe commented May 12, 2026

Key changes

  • Migrates packaging from setup.py / setup.cfg to pyproject.toml, sets Python policy to 3.11, and bumps the package version to 1.0.0.
  • Hard-pins runtime/dev dependencies and upgrades Python 3.11 blockers, including aiohttp, the nose/flake8 toolchain, parse==1.22.0, and sdiff@1.0.0.
  • Confirms msgpack is not a content-validator dependency or source/test concern, so libks msgpack compatibility wrappers are not applicable here.
  • Replaces nose with pynose, moves Flake8 config into pyproject.toml, and keeps sample-style PYNOSE_SHARED_FLAGS plus CI coverage/xUnit artifact flags.
  • Adds fixture-backed golden compatibility tests for markdown diff shape, Java placeholders, and URL extraction.
  • Adds a minimal content-validator CLI help/version smoke surface because package metadata already declared the console script.
  • Updates Makefile, README, Travis, requirements, git hook wiring, and a repo-specific migration contract.
  • Adds CircleCI using the python311-service-upgrade-stack sample shape: prepare_cache, lint, and test jobs; Python 3.11.13; v3-pip- / v3-venv- cache fallbacks; test/coverage artifacts; and non-fatal Codecov upload.
  • Splits CircleCI restore/save cache anchors so restore_cache only receives keys, while save_cache receives key plus paths.

Proof run

  • python3.11 --version: Python 3.11.13
  • make clean: pass
  • make dev: pass
  • make ci-dev-install: pass with package-index/GitHub access
  • make lint: pass
  • make test: pass, 65 tests, 1 skipped, coverage total 84%
  • CI=1 make test: pass, 65 tests, 1 skipped; writes build/coverage/coverage.xml and build/test/results.xml
  • CI=1 make test-only: pass for CircleCI test-job command shape
  • venv/bin/python -m compileall validator tests: pass
  • Import smoke for validator, validator.checks.url, aiohttp==3.13.5, beautifulsoup4==4.14.3, lxml==6.1.0, Markdown==3.10.2, parse==1.22.0, and sdiff==1.0.0: pass
  • venv/bin/content-validator --help: pass
  • venv/bin/content-validator --version: pass
  • venv/bin/pip check: pass
  • venv/bin/python -m build .: pass with network-enabled isolated build dependency resolution
  • circleci config validate .circleci/config.yml: pass after cache schema split
  • git diff --check: pass

Known gaps

  • Dependency install/build proof requires package index and GitHub access for package resolution and the tagged sdiff dependency.
  • Downstream consumers still need their own requirements updates and validation against content-validator==1.0.0.
  • Service-only python311-service-upgrade-stack tasks remain intentionally skipped because this repo has no Paste/Gunicorn/INI/healthcheck/worker/Docker runtime surface.

Modified Makefile test targets to use shared pynose coverage flags and CI XML/xunit artifact output.

Added migration contract details for the python311-service-upgrade-stack guardrail audit, no-stack deviations, dependency upgrade rationale, intentionally retained pins, and refreshed proof results.

Removed no files in this follow-up; it only documents and verifies the branch against the shared skill.
Bump remaining content-validator runtime pins to latest proven-safe versions: parse 1.22.0 and sdiff 1.0.0.

Adapt CircleCI from the python311-service-upgrade-stack sample with prepare_cache, lint, test, cache fallback keys, artifacts, and Codecov fallback.

Align Makefile CI install targets and refresh the migration contract with latest-version, msgpack not-applicable, CircleCI, and proof evidence.
Split restore_cache and save_cache option anchors so each CircleCI step receives only supported keys.
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