Rename package from pptx to power_pptx to avoid namespace collision#19
Conversation
The 1.x line shipped on PyPI as `power-pptx` but kept the importable package name `pptx`, which collides with `python-pptx` if both are installed in the same environment. Rename the importable package to `power_pptx` so the two distributions can coexist. - Move src/pptx/ -> src/power_pptx/ and rewrite all internal imports. - Update tests, examples, docs, features, and the bundled Claude skill to import from `power_pptx`. - Update pyproject.toml (pyright include, isort known-first-party, setuptools dynamic version attr), MANIFEST.in, Makefile, CI workflow, PR template, and CONTRIBUTING.md to reference the new package name. - README and HISTORY now document the breaking import change and the one-line migration (`from pptx ...` -> `from power_pptx ...`). - Bump version to 2.0.0. The PyPI distribution name is unchanged (`pip install power-pptx`). Public API surface is otherwise unchanged; full test suite (3110 tests) passes. https://claude.ai/code/session_014AxGX4cuxXXem8C5Fm1m7E
There was a problem hiding this comment.
Code Review
This pull request renames the importable package from pptx to power_pptx to prevent namespace collisions with the upstream python-pptx library, marking the transition to version 2.0.0. The changes involve a comprehensive update of the source code, documentation, examples, and project configuration. Review feedback focuses on maintaining historical accuracy by ensuring that release notes for version 1.1.0 and roadmap principles for the 1.x series continue to reference the original package name.
| 1.1.0 (2026-04-28) | ||
| ++++++++++++++++++ | ||
|
|
||
| This is the inaugural release under the ``power-pptx`` distribution name | ||
| on PyPI. It is a drop-in replacement for ``python-pptx`` 1.0.2: | ||
| ``import pptx`` continues to work and existing user code is unaffected. | ||
| ``import power_pptx`` continues to work and existing user code is unaffected. |
There was a problem hiding this comment.
It seems that the release notes for version 1.1.0 have been updated with the pptx -> power_pptx rename. This could be confusing, as release notes should reflect the state of the library at the time of that release. For version 1.1.0, the import name was still pptx. The new release notes for 2.0.0 correctly document the breaking change. It would be better to revert all the pptx -> power_pptx changes within the 1.1.0 release notes section to maintain historical accuracy.
| ## Guiding principles | ||
|
|
||
| 1. **Drop-in compatibility within 1.x.** `import pptx` keeps working. | ||
| 1. **Drop-in compatibility within 1.x.** `import power_pptx` keeps working. |
There was a problem hiding this comment.
This change seems incorrect. For version 1.x, the import name was pptx. The change to power_pptx is for version 2.0. This line should probably be reverted to its original state to maintain historical accuracy in the roadmap.
| 1. **Drop-in compatibility within 1.x.** `import power_pptx` keeps working. | |
| 1. **Drop-in compatibility within 1.x.** `import pptx` keeps working. |
Summary
This is a breaking change for version 2.0.0 that renames the importable package from
pptxtopower_pptx. This resolves a namespace collision issue when bothpython-pptx(which installs aspptx) andpower-pptxare present in the same environment.Starting with 2.0.0, users must update their imports from
from pptx import ...tofrom power_pptx import .... The package continues to be distributed aspower-pptxon PyPI.Changes
src/pptx/directory tosrc/power_pptx/power_pptxinstead ofpptxHISTORY.rstwith 2.0.0 release notes documenting this breaking changeROADMAP.mdand other reference materialspyproject.tomlto include the new package pathTest notes
All existing unit tests and integration tests continue to pass with the renamed imports. The change is purely a namespace rename with no functional modifications to the library itself.
https://claude.ai/code/session_014AxGX4cuxXXem8C5Fm1m7E