fix(ci): normalize package names to underscores for PyPI compliance#730
Conversation
PyPI rejects sdist uploads with hyphenated filenames (PEP 625). Changed all 37 pyproject.toml name fields from hyphens to underscores (e.g., agent-governance-toolkit -> agent_governance_toolkit). PyPI treats these as equivalent package names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🤖 AI Agent: code-reviewer
Review Feedback
🔴 CRITICAL
No critical issues identified in this pull request.
🟡 WARNING
- Potential Breaking Change in Package Names:
- Changing package names from hyphenated to underscored format may cause issues for users who rely on the previous package names in their dependency files (e.g.,
requirements.txt,setup.py, orpyproject.toml). - Impact: Users upgrading to the new version may encounter
ModuleNotFoundErroror dependency resolution failures if they do not update their dependency references. - Recommendation: Add a clear note in the changelog and release documentation about this change. Consider providing migration instructions for users.
- Changing package names from hyphenated to underscored format may cause issues for users who rely on the previous package names in their dependency files (e.g.,
💡 SUGGESTIONS
-
Backward Compatibility Alias:
- To minimize disruption for existing users, consider publishing the packages under both the old hyphenated names and the new underscored names for a transitional period. This can be achieved by using the
provides-extrafield inpyproject.tomlor by creating alias packages.
- To minimize disruption for existing users, consider publishing the packages under both the old hyphenated names and the new underscored names for a transitional period. This can be achieved by using the
-
Automated Dependency Update:
- Provide a script or tool that helps users update their dependency files (e.g.,
requirements.txt) to replace the old hyphenated package names with the new underscored names.
- Provide a script or tool that helps users update their dependency files (e.g.,
-
Testing for Package Name Changes:
- Ensure that all CI/CD pipelines and tests are updated to reflect the new package names. Verify that the changes do not break any existing workflows or integrations.
-
PyPI Upload Validation:
- Before merging this PR, verify that the updated package names are accepted by PyPI. This ensures the changes resolve the issue described in PEP 625.
-
Documentation Update:
- Update all documentation, including README files, examples, and tutorials, to reflect the new package names. This will help users avoid confusion when referencing the packages.
-
Versioning Strategy:
- Consider incrementing the major version number for all affected packages to signal a breaking change in package names. This aligns with semantic versioning practices.
-
Deprecation Notice:
- If alias packages are not feasible, include a deprecation notice in the README files of the old packages, directing users to the new package names.
Summary
The changes in this PR address compliance with PEP 625 for PyPI package naming conventions, which is a necessary and valid update. However, the changes introduce potential breaking changes for users relying on the previous hyphenated package names. To mitigate these issues, it is recommended to provide clear documentation, migration tools, and possibly alias packages during a transitional period. Ensure thorough testing and validation before merging this PR.
🤖 AI Agent: security-scanner — Security Review of PR: `fix(ci): normalize package names to underscores for PyPI compliance`Security Review of PR:
|
PyPI rejects sdist uploads with hyphenated filenames (PEP 625). Changed all 37 pyproject.toml name fields from hyphens to underscores. PyPI treats these as equivalent package names.