Skip to content

Add deprecated warning on microsoft-agents-hosting-teams package import - #517

Merged
Rodrigo Brandão (rodrigobr-msft) merged 5 commits into
mainfrom
users/robrandao/deprecate-teams
Aug 3, 2026
Merged

Add deprecated warning on microsoft-agents-hosting-teams package import#517
Rodrigo Brandão (rodrigobr-msft) merged 5 commits into
mainfrom
users/robrandao/deprecate-teams

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

This pull request adds a deprecation warning to the microsoft-agents-hosting-teams package, informing users that it is obsolete and recommending migration to the microsoft-agents-hosting-msteams package.

Deprecation notice:

  • Added a logging warning at import time in __init__.py to notify users that microsoft-agents-hosting-teams is obsolete and to use microsoft-agents-hosting-msteams instead.

Copilot AI review requested due to automatic review settings August 3, 2026 20:13
@rodrigobr-msft Rodrigo Brandão (rodrigobr-msft) changed the title Add obsolete warning on microsoft-agents-hosting-teams package import Add deprecated warning on microsoft-agents-hosting-teams package import Aug 3, 2026
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) marked this pull request as ready for review August 3, 2026 20:14

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 an import-time deprecation notice to the legacy microsoft_agents.hosting.teams package to steer users toward the replacement microsoft-agents-hosting-msteams distribution.

Changes:

  • Emit a warning when microsoft_agents.hosting.teams is imported.
  • Add a module header docstring (copyright/license).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings August 3, 2026 20:58

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

libraries/microsoft-agents-hosting-teams/microsoft_agents/hosting/teams/init.py:11

  • Avoid logging via the root logger at import time; it bypasses the package/module logger hierarchy and makes it harder for consumers to filter/route this deprecation notice. Prefer a module-scoped logger (logging.getLogger(name)) and log through it. Also remove the trailing whitespace at the end of the final sentence.
logging.warning(
    "The `microsoft-agents-hosting-teams` package is deprecated. "
    "Please start using the `microsoft-agents-hosting-msteams` package "
    "for better support and future updates. "

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

libraries/microsoft-agents-hosting-teams/microsoft_agents/hosting/teams/init.py:12

  • Using logging.warning(...) logs on the root logger and bypasses the codebase’s typical module-scoped logger pattern (e.g., logger = logging.getLogger(__name__) then logger.warning(...)). Switching to a module logger also makes it easier for consumers to filter/disable this deprecation warning. Also, the final string segment currently ends with a trailing space; consider ending with a period and no trailing whitespace.
import logging

logging.warning(
    "The `microsoft-agents-hosting-teams` package is deprecated. "
    "Please start using the `microsoft-agents-hosting-msteams` package "
    "for better support and future updates. "
)

@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) merged commit ac5ba65 into main Aug 3, 2026
9 of 10 checks passed
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) deleted the users/robrandao/deprecate-teams branch August 3, 2026 21:09
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