Skip to content

Rename package from pptx to power_pptx to avoid namespace collision#19

Merged
CodeHalwell merged 1 commit intomasterfrom
claude/rename-power-pptx-import-exts4
Apr 29, 2026
Merged

Rename package from pptx to power_pptx to avoid namespace collision#19
CodeHalwell merged 1 commit intomasterfrom
claude/rename-power-pptx-import-exts4

Conversation

@CodeHalwell
Copy link
Copy Markdown
Owner

Summary

This is a breaking change for version 2.0.0 that renames the importable package from pptx to power_pptx. This resolves a namespace collision issue when both python-pptx (which installs as pptx) and power-pptx are present in the same environment.

Starting with 2.0.0, users must update their imports from from pptx import ... to from power_pptx import .... The package continues to be distributed as power-pptx on PyPI.

Changes

  • Renamed src/pptx/ directory to src/power_pptx/
  • Updated all internal imports throughout the codebase to use power_pptx instead of pptx
  • Updated documentation, examples, and test files to reflect the new import name
  • Updated HISTORY.rst with 2.0.0 release notes documenting this breaking change
  • Updated ROADMAP.md and other reference materials
  • Updated pyproject.toml to include the new package path
  • Updated CI configuration and build manifests

Test 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

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
Copilot AI review requested due to automatic review settings April 29, 2026 05:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@CodeHalwell CodeHalwell merged commit 9ee79b1 into master Apr 29, 2026
5 checks passed
@CodeHalwell CodeHalwell deleted the claude/rename-power-pptx-import-exts4 branch April 29, 2026 05:37
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread HISTORY.rst
Comment on lines 38 to +43
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment thread ROADMAP.md
## 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
1. **Drop-in compatibility within 1.x.** `import power_pptx` keeps working.
1. **Drop-in compatibility within 1.x.** `import pptx` keeps working.

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.

3 participants