Problem
Developer-experience quality-of-life improvements that don't fit any single feature epic but compound across all of them. python-pptx's API still rejects pathlib.Path inputs (scanny/python-pptx#1123), uses naive datetimes (scanny/python-pptx#957), has Python 3.10 collections deprecation hits (scanny/python-pptx#771), and lacks a clean shape-by-name lookup (scanny/python-pptx#798, #309, #532). The Font.color getter mutates XML by inserting <a:solidFill/> (scanny/python-pptx#1111, #1074) — a long-standing footgun. Slide.background._element returns the wrong element (scanny/python-pptx#1126). Dev-tooling is dated: the upstream is moving toward uv / ruff / pyright (semaverse-pptx fork demonstrates the path) but our fork still uses the older unittest+pytest+behave hybrid.
Sub-features
API ergonomics
Bug fixes that pollute every other epic if left unfixed
Dev-tooling modernization
Prior art
- Open PRs: scanny/python-pptx#1123 PathLike (clean, small). scanny/python-pptx#957 UTC datetimes. scanny/python-pptx#771 collections.abc. scanny/python-pptx#798
shapes.by_name. scanny/python-pptx#800 Mapping ABC. scanny/python-pptx#1131 PERCENT_40 typo. scanny/python-pptx#1104 DelimitedList (cleaner alternative to our pyparsing<3 pin).
- Forks:
- User issues this would close: #224, #309, #435, #532, #1074, #1111, #1126, #1127.
- Code paths: broad — touches
presentation.py, parts/image.py, dml/color.py, text/fonts.py, slide.py, oxml/slide.py, pyproject.toml, tox.ini, GitHub Actions workflows.
Acceptance criteria
Presentation(Path("deck.pptx")) works without TypeError.
font.color access on an unstyled run does NOT modify the underlying XML (assert with byte-diff).
slides[0].shapes.by_name("Title") returns the title shape.
pyright strict mode runs in CI with zero errors on the public API.
- All 2986+ pytest tests + 981+ behave scenarios continue passing.
Effort: M
Bundle of small wins that compound. Recommend cherry-picking the trivial ones first (scanny/python-pptx#1123 PathLike, scanny/python-pptx#1131 typo, scanny/python-pptx#771 collections) in a single "ergonomics 1" patch release, then bug fixes (Font.color mutation, slide.background) in a second, then dev-tooling modernization (Phase 3).
Problem
Developer-experience quality-of-life improvements that don't fit any single feature epic but compound across all of them. python-pptx's API still rejects
pathlib.Pathinputs (scanny/python-pptx#1123), uses naive datetimes (scanny/python-pptx#957), has Python 3.10collectionsdeprecation hits (scanny/python-pptx#771), and lacks a clean shape-by-name lookup (scanny/python-pptx#798, #309, #532). TheFont.colorgetter mutates XML by inserting<a:solidFill/>(scanny/python-pptx#1111, #1074) — a long-standing footgun.Slide.background._elementreturns the wrong element (scanny/python-pptx#1126). Dev-tooling is dated: the upstream is moving towarduv/ruff/pyright(semaverse-pptx fork demonstrates the path) but our fork still uses the older unittest+pytest+behave hybrid.Sub-features
API ergonomics
Presentation()andadd_picture()acceptpathlib.Path(closes scanny/python-pptx#1123 — clean cherry-pick)Shapes.by_name(name)lookup helper (closes scanny/python-pptx#798)Shapes.iter_leaf_shapes()traversal (closes scanny/python-pptx#435)ShapesandSlidePlaceholdersfulfillcollections.abc.Mapping(scanny/python-pptx#800)Shape.find_by_xpath()for power usersBug fixes that pollute every other epic if left unfixed
Font.colorgetter must not mutate XML on access (closes #1111, #1074)Slide.background._elementreturns<p:bg>not<p:cSld>(closes #1126)collections.abcimport paths (closes scanny/python-pptx#771)PERCENT_40enum typo (closes #1127)Dev-tooling modernization
uvfor dependency managementruff checkstrict gatespyrightstrict-mode gate to CIpytest-syrupysnapshot tests for XML fixtures (semaverse-pptx pattern)Prior art
shapes.by_name. scanny/python-pptx#800 Mapping ABC. scanny/python-pptx#1131 PERCENT_40 typo. scanny/python-pptx#1104DelimitedList(cleaner alternative to our pyparsing<3 pin).semaverse-ai/semaverse-pptx— uv / ruff / pyright / pytest-syrupy modernization. The reference for our dev-tooling phase.madflow/python-pptx— pure CI maintenance branch (latest Python versions, deprecation fixes).loadfix/python-pptxiter_leaf_shapes,Slide.clear_shapes.presentation.py,parts/image.py,dml/color.py,text/fonts.py,slide.py,oxml/slide.py,pyproject.toml,tox.ini, GitHub Actions workflows.Acceptance criteria
Presentation(Path("deck.pptx"))works without TypeError.font.coloraccess on an unstyled run does NOT modify the underlying XML (assert with byte-diff).slides[0].shapes.by_name("Title")returns the title shape.pyrightstrict mode runs in CI with zero errors on the public API.Effort: M
Bundle of small wins that compound. Recommend cherry-picking the trivial ones first (scanny/python-pptx#1123 PathLike, scanny/python-pptx#1131 typo, scanny/python-pptx#771 collections) in a single "ergonomics 1" patch release, then bug fixes (Font.color mutation, slide.background) in a second, then dev-tooling modernization (Phase 3).