Skip to content

[WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml #42462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 11, 2025

This PR converts the azure-messaging-webpubsubclient package from using setup.py to the modern pyproject.toml configuration format, following the Azure SDK Python guidelines and the pattern established by other Azure SDK packages.

Changes Made

  • Replaced setup.py with complete pyproject.toml: Migrated all package metadata, dependencies, and build configuration from the legacy setup.py to a comprehensive pyproject.toml file
  • Dynamic version configuration: Set up dynamic version loading from azure.messaging.webpubsubclient._version.VERSION
  • Build system setup: Added proper build-system configuration with setuptools>=77.0.3 and wheel
  • Package discovery: Configured package finding with appropriate exclusions for tests*, azure, and azure.messaging namespace packages
  • Dependencies migration: Moved all runtime dependencies and optional dependencies (aio extra) to the new format
  • py.typed configuration: Properly configured the py.typed file location for type hint support

Key Requirements Addressed

Dynamic version file path: Correctly points to azure.messaging.webpubsubclient._version.VERSION
Python version requirement: Maintains >=3.8 compatibility
Repository URL: Set to "https://github.com/Azure/azure-sdk-for-python.git"
py.typed setup: Configured as pytyped = ["py.typed"]

The conversion follows the same pattern used by azure-eventhub and other modernized Azure SDK packages. All metadata, dependencies, and build configuration have been preserved while moving to the standardized pyproject.toml format.

Fixes #42461.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pypi.org
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/lib/python3.9/site-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-w7fgkff6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i REDACTED -- setuptools>=40.8.0 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] [WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml [WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml Aug 11, 2025
@Copilot Copilot AI requested a review from swathipil August 11, 2025 18:51
Copilot finished work on behalf of swathipil August 11, 2025 18:51
…in readme, and add doc*/stress* exclusions

Co-authored-by: swathipil <[email protected]>
Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pypi.org
    • Triggering command: /tmp/build-env-_7jbwplz/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/lib/python3.9/site-packages/pip/__pip-REDACTED__.py --python /tmp/build-env-_7jbwplz/bin/python install --use-pep517 --no-warn-script-location --no-compile -r /tmp/build-reqs-j_gd_8a5.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI requested a review from swathipil August 11, 2025 21:40
Copilot finished work on behalf of swathipil August 11, 2025 21:40
Copilot finished work on behalf of swathipil August 11, 2025 22:17
@Copilot Copilot AI requested a review from swathipil August 12, 2025 16:50
Copilot finished work on behalf of swathipil August 12, 2025 16:50
@swathipil swathipil requested a review from lmazuel August 12, 2025 19:45
@swathipil swathipil marked this pull request as ready for review August 12, 2025 19:45
@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 19:45
@swathipil swathipil requested a review from msyyc as a code owner August 12, 2025 19:45
@swathipil swathipil requested a review from iscai-msft as a code owner August 12, 2025 19:45
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR modernizes the azure-messaging-webpubsubclient package by migrating from the legacy setup.py configuration to the modern pyproject.toml format, aligning with current Python packaging standards and Azure SDK guidelines.

Key changes:

  • Complete migration from setup.py to pyproject.toml with all package metadata preserved
  • Dynamic version loading configuration pointing to the correct module path
  • Proper build system and package discovery setup with namespace package exclusions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
setup.py Complete removal of legacy setup.py file (76 lines deleted)
pyproject.toml Addition of comprehensive pyproject.toml configuration with all package metadata, dependencies, and build settings

]

[project.urls]
repository = "https://github.com/Azure/azure-sdk-for-python"
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

The repository URL should end with '.git' according to Azure SDK guidelines. Change to 'https://github.com/Azure/azure-sdk-for-python.git'

Copilot uses AI. Check for mistakes.

description = "Microsoft Azure Web PubSub Client Library for Python"
keywords = ["azure", "azure sdk"]
requires-python = ">=3.8"
license = "MIT"
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

The license field should use the SPDX license identifier format. Change to 'license = {text = "MIT License"}' to match the original setup.py format and provide better license information.

Suggested change
license = "MIT"
license = {text = "MIT License"}

Copilot uses AI. Check for mistakes.

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.

[WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml
2 participants