Skip to content

[Epic] Modernization & Ergonomics — PathLike, UTC datetimes, dev-tooling #29

@MHoroszowski

Description

@MHoroszowski

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

  • Migrate to uv for dependency management
  • Continue ruff format pass (already done in our fork v1.2.0); add ruff check strict gates
  • Add pyright strict-mode gate to CI
  • Convert remaining unittest-style tests to flat pytest
  • Optional: pytest-syrupy snapshot tests for XML fixtures (semaverse-pptx pattern)
  • CI matrix: cover Python 3.9 through 3.13 (already done) + 3.14 once stable

Prior art

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dxFeature area: dxepicMulti-feature roadmap epicprior-art:forkActive community fork has shipped thisprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P0Highest user demand or strategic valuestatus:quick-winHigh user demand, small implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions