Upgrade to Python 3.11 - #76
Open
olmos-keepsafe wants to merge 11 commits into
Open
Conversation
Adds an empty-input CLI regression test and pyupgrade dev tooling. Updates Makefile proof targets and migration contract coverage notes. Applies pyupgrade rewrites across email_parser and tests.
olmos-keepsafe
marked this pull request as ready for review
August 28, 2026 02:00
Record the published 1.0.1 artifact and email-service dependency proof, correct the downstream libks 1.0.12 references, and update the current pypicloud node address.
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.
Key changes
setup.py/setup.cfgtopyproject.toml, targets Python 3.11.13, and advances the Python 3.11 release line from0.3.2to1.0.1.beautifulsoup4==4.15.0,Markdown==3.10.2,inlinestyler==0.2.5,lxml==6.0.2,parse==1.22.1,pystache==0.6.8, andcoverage==7.15.2.cssutils==2.11.1as the latest safe pin after proving2.13.0,2.14.0, and2.15.0fail to import through the missingencutilsmodule.lxml==6.0.2compatible with the current downstream email-service lock, which resolveslibks==1.0.12andks-email-parser==1.0.1together.CSSSelector.evaluatecompatibility alias for inlinestyler's legacy lxml selector calls.email_parser.link_shortenerprototype rather than retaining an undeclared directrequestsdependency; no package, CLI, test, or known downstream call site used it.nosetestswithpynose, moves Flake8 configuration intopyproject.toml, and removespyupgradeafter completing the one-time Python 3.6-through-3.11 migration ladder.make check-msgpacksource scan tomake lint.cimg/python:3.11.13,prepare_cache,lint, andtestjobs, exactv5virtualenv cache keys, coverage/test artifacts, and non-fatal Codecov upload.Proof run
make test: pass, 108 tests and 80% coverage; includes golden rendering, CLI/config smoke, empty-render failure, URL encoding, paragraph-attribute, bidi-link, and legacy-emphasis regressions.make lint: pass with Flake8 7.3.0, flake8-pyproject 1.2.4, and the fail-closed msgpack scan.venv/bin/python -m compileall email_parser tests: pass.venv/bin/pip check: pass with no broken requirements.setuptools==82.0.1/wheel==0.47.0build proof: pass.1.0.1wheel install, package-version assertion, import/render smoke, and CLI smoke: pass.emails:test_masterCLI render: pass for 913 emails, producing 2,739 subject/text/HTML files with exit code 0.0.3.2versus1.0.1production corpus comparison: 942 locale/variant cases with zero subject, visible-text, image,<strong>, or<em>mismatches. The 48 raw-text differences normalize to zero after removing the intentionally cleaned bidi URL wrappers.emails:mastercorpus: 1,130 locale/variant cases rendered without exceptions.ks-email-parser==1.0.1atfe66954.sdiff==2.0.0and Mistune 3.3.4:pip check, imports, and byte-identical fixture rendering pass without adding either package to this project's metadata.52ac4a9:prepare_cache,lint, andtestall pass.1.0.1points to52ac4a9;ks-email-parser==1.0.1is published internally and both pypicloud package lists have been rebuilt.Known gaps / follow-up work
emailsrepository: correct 11 pre-existing malformed URL destinations inemails:test_master. Affected cases areGDPR_Announcement(fr,zh-CN,zh-TW-Hant),family_vault_update_androidandfamily_vault_update_ios(ja,zh-CN,zh-TW-Hant), andUnlisted_announcement_LineUp_users(zh-CN,zh-TW-Hant). After correcting the XML, rerun the 0.3.2-versus-1.0.x corpus comparison and email-service CMS smoke.1.0.1dependency pin and lock refresh are complete.make teststill prints warnings from intentionally malformed XML fallback fixtures; those warnings are covered by passing tests.python311-service-upgrade-stacktasks are intentionally skipped because this repository is library/CLI-shaped: no Gunicorn, PasteDeploy, service INI, workers, Docker runtime, health endpoints, local service stack, or egress guard.Linear
Fixes BE-93