Skip to content

[WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml with Python 3.9+ support #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

Merged
merged 6 commits into from
Aug 14, 2025

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*, doc*, stress*, samples*, 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
  • Python version support updated: Dropped Python 3.8 support, added Python 3.13 classifier, and updated minimum requirement to Python 3.9+

Key Requirements Addressed

Dynamic version file path: Correctly points to azure.messaging.webpubsubclient._version.VERSION
Python version requirement: Updated to >=3.9 with support through Python 3.13
Repository URL: Set to "https://github.com/Azure/azure-sdk-for-python"
py.typed setup: Configured as pytyped = ["py.typed"]
Package exclusions: Comprehensive exclusions prevent unintended files from being included in the wheel distribution

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 and updating Python version support.

Fixes #42461.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@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

Copilot finished work on behalf of swathipil August 13, 2025 18:57
Copy link
Member

@msyyc msyyc left a comment

Choose a reason for hiding this comment

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

looks good to me.

@Copilot Copilot AI changed the title [WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml [WebPubSubClient] Convert azure-messaging-webpubsubclient package from setup.py to pyproject.toml with Python 3.9+ support Aug 14, 2025
Copilot finished work on behalf of swathipil August 14, 2025 15:42
Copilot finished work on behalf of swathipil August 14, 2025 15:47
@swathipil swathipil enabled auto-merge (squash) August 14, 2025 15:54
@swathipil
Copy link
Member

/check-enforcer override

@swathipil swathipil merged commit 9869606 into main Aug 14, 2025
19 checks passed
@swathipil swathipil deleted the copilot/fix-42461 branch August 14, 2025 16:08
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
5 participants