Skip to content

fix(python): ship PEP 561 markers for all published packages - #584

Merged
mehulp93 merged 5 commits into
mainfrom
fix/python-pep561-packages
Jul 29, 2026
Merged

fix(python): ship PEP 561 markers for all published packages#584
mehulp93 merged 5 commits into
mainfrom
fix/python-pep561-packages

Conversation

@mehulp93

Copy link
Copy Markdown
Collaborator

Summary

  • add py.typed markers to all eight published Python integration packages
  • add a repository-wide package contract checker that validates source markers and built wheel/sdist contents
  • run the artifact check in Python PR CI and both Python release workflows
  • document the marker as part of the integration package contract and update each package changelog

Why

The integration sources are annotated and pass their strict mypy configurations, but their published wheels do not declare PEP 561 support. Type checkers therefore report import-untyped and treat package APIs as Any after installation.

This includes the zep-adk change proposed in #552 and applies the same fix to every published Python integration package. zep-ingest was already correctly marked; the new guard covers it as well.

Validation

  • built wheels and sdists for all nine published Python libraries and verified py.typed is present and empty in every artifact
  • installed each wheel in an isolated mypy environment and confirmed all nine imports are recognized as typed
  • ran the repository-wide source marker check
  • ran Ruff and strict mypy on the new checker
  • ran actionlint on the modified workflows

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning — .github/workflows/test-integrations.yml, trigger/detect-changes hunks

Changes to .github/actions/test-python/action.yml now trigger this workflow, but none of the dorny/paths-filter Python filters match that path. Consequently, test-python is skipped and modifications to the shared action are never exercised; only the source-marker job runs. Add the shared action path to each Python filter or introduce a dedicated smoke test for the composite action.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No actionable findings.

The py.typed markers are correctly placed inside each Hatchling-managed package and should be included in both wheels and source distributions. Changelog and repository guidance updates are consistent.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No actionable findings. The PEP 561 markers should be included by Hatchling in both wheels and source distributions, and the Ruff exclusion is valid.

@socket-security

socket-security Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​ag2@​1.0.1 ⏵ 0.14.076 -19100100100100

View full report

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion — integrations/ag2/python/pyproject.toml:25

The new ag2>=0.9.0,<1 constraint conflicts with the README’s documented requirement of ag2>=0.9.0, which implies 1.x compatibility. Update the README requirement to ag2>=0.9.0,<1 so users see the actual supported range.

No correctness or security issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No actionable findings. The changes appear correct, secure, and consistent with repository conventions.

@mehulp93
mehulp93 merged commit e20a553 into main Jul 29, 2026
37 checks passed
@mehulp93
mehulp93 deleted the fix/python-pep561-packages branch July 29, 2026 22:15
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.

1 participant