Skip to content

fix: include typing markers in package wheels - #578

Merged
Lily Du (lilyydu) merged 1 commit into
microsoft:mainfrom
russlan23:fix/package-typing-markers
Aug 31, 2026
Merged

Lily Du (lilyydu) merged 1 commit into
microsoft:mainfrom
russlan23:fix/package-typing-markers

Conversation

@russlan23

Copy link
Copy Markdown
Contributor

Fixes #560

What changed

Adds py.typed to each of the seven published microsoft_teams distributions and removes the obsolete ignore rule that prevented these markers from being tracked.

The regression test builds every workspace wheel and verifies that each artifact contains its package marker. Runtime behavior is unchanged.

Validation

  • pytest packages — 1101 passed
  • ruff format --check — clean
  • ruff check — clean
  • pyright — 0 errors, 0 warnings
  • Echo example startup/shutdown smoke test — passed

Copilot AI lite review requested due to automatic review settings August 27, 2026 04:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds PEP 561 typing markers (py.typed) across the published microsoft_teams workspace distributions so type checkers treat them as typed packages, and adds a regression test that validates the markers are present in built wheels.

Changes:

  • Add py.typed markers to each of the seven microsoft_teams_* distributions.
  • Remove the .gitignore rule that prevented py.typed from being tracked.
  • Add a test that builds all workspace wheels and asserts each expected marker is included in the artifact.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/m365extensions/src/microsoft_teams/m365extensions/py.typed Adds typing marker for microsoft_teams.m365extensions.
packages/graph/src/microsoft_teams/graph/py.typed Adds typing marker for microsoft_teams.graph.
packages/common/src/microsoft_teams/common/py.typed Adds typing marker for microsoft_teams.common.
packages/cards/src/microsoft_teams/cards/py.typed Adds typing marker for microsoft_teams.cards.
packages/botbuilder/src/microsoft_teams/botbuilder/py.typed Adds typing marker for microsoft_teams.botbuilder.
packages/apps/src/microsoft_teams/apps/py.typed Adds typing marker for microsoft_teams.apps.
packages/api/src/microsoft_teams/api/py.typed Adds typing marker for microsoft_teams.api.
packages/api/tests/unit/test_wheel_typing_markers.py Regression test that wheel builds contain the expected py.typed files.
.gitignore Stops ignoring py.typed so markers can be committed.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@russlan23

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@lilyydu Lily Du (lilyydu) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks for making the change!

The only wrinkle: #560 asks for "no type error" on from microsoft_teams.cards import AdaptiveCard, and this will change it fromreportMissingTypeStubs to reportPrivateImportUsage rather than clearing it. This is a separate issue though, moreso b/c of the generated file - will look into this internally.

@lilyydu
Lily Du (lilyydu) merged commit 4142b6e into microsoft:main Aug 31, 2026
5 checks passed
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.

[Bug]: packages are missing py.typed files

3 participants