Skip to content

Port data-plane packages in sdk/core/ to pyproject.toml#45556

Open
Copilot wants to merge 5 commits intomainfrom
copilot/port-data-plane-packages-to-pyproject
Open

Port data-plane packages in sdk/core/ to pyproject.toml#45556
Copilot wants to merge 5 commits intomainfrom
copilot/port-data-plane-packages-to-pyproject

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

  • Migrate azure-core to use pyproject.toml
  • Migrate azure-core-experimental to use pyproject.toml
  • Migrate azure-core-tracing-opentelemetry to use pyproject.toml
  • Migrate corehttp to use pyproject.toml
  • Migrate azure-common to use pyproject.toml
  • Remove setup.py files from migrated packages
  • Validate migrations build correctly (all packages build sdist and wheel successfully)
  • Fix azure-common: add dependencies = [] to [project] section so ci_tools.parsing.ParsedSetup (used by apistub and other CI tools) doesn't fail with TypeError: 'NoneType' object is not iterable
  • Fix azure-core-experimental: switch to include = ["azure.core.experimental*"] in [tool.setuptools.packages.find] to avoid shipping namespace __init__.py files that overlap with azure-core
  • Fix azure-core-tracing-opentelemetry: switch to include = ["azure.core.tracing.ext.opentelemetry_span*"] to avoid shipping namespace __init__.py files that overlap with azure-core

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
Copilot AI changed the title [WIP] Port data-plane packages in core/ to use pyproject.toml Port data-plane packages in sdk/core/ to pyproject.toml Mar 6, 2026
@l0lawrence l0lawrence marked this pull request as ready for review March 6, 2026 18:53
Copilot AI review requested due to automatic review settings March 6, 2026 18:53
Copy link
Contributor

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

Migrates sdk/core/ data-plane packages from setup.py to PEP 517/518 pyproject.toml packaging, consolidating metadata (deps/extras/version/readme/package discovery) into a single declarative config per package.

Changes:

  • Removed legacy setup.py packaging scripts for core packages.
  • Added full PEP 621 [project] metadata plus dynamic version/readme configuration in pyproject.toml.
  • Defined optional dependency extras (e.g., aio, tracing, transport extras) in pyproject.toml.

Reviewed changes

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

Show a summary per file
File Description
sdk/core/corehttp/setup.py Removed legacy setuptools script in favor of pyproject.toml.
sdk/core/corehttp/pyproject.toml Added PEP 621 metadata, extras, dynamic version/readme, and package discovery config.
sdk/core/azure-core/setup.py Removed legacy setuptools script in favor of pyproject.toml.
sdk/core/azure-core/pyproject.toml Added PEP 621 metadata, extras, dynamic version/readme, and package discovery config.
sdk/core/azure-core-tracing-opentelemetry/setup.py Removed legacy setuptools script in favor of pyproject.toml.
sdk/core/azure-core-tracing-opentelemetry/pyproject.toml Added PEP 621 metadata + dynamic version/readme + package discovery config for tracing plugin.
sdk/core/azure-core-experimental/setup.py Removed legacy setuptools script in favor of pyproject.toml.
sdk/core/azure-core-experimental/pyproject.toml Added PEP 621 metadata + dynamic version/readme + package discovery config for experimental package.
sdk/core/azure-common/setup.py Removed legacy setuptools script in favor of pyproject.toml.
sdk/core/azure-common/pyproject.toml Added PEP 621 metadata + dynamic version/readme + package discovery config.

readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"}

[tool.setuptools.packages.find]
exclude = ["tests*", "samples*", "azure"]
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

[tool.setuptools.packages.find] will currently include packages like azure.core, azure.core.tracing, and azure.core.tracing.ext from this repo copy (those directories contain __init__.py here). Shipping those in the wheel would overwrite the real azure-core implementation (and its existing azure.core.tracing.ext) during installation, breaking tracing/runtime behavior. Restrict package discovery to only the plugin package (e.g., include = ["azure.core.tracing.ext.opentelemetry_span*"] or an explicit package list) so the wheel only adds opentelemetry_span and does not repackage/override parent packages.

Suggested change
exclude = ["tests*", "samples*", "azure"]
include = ["azure.core.tracing.ext.opentelemetry_span*"]
exclude = ["tests*", "samples*"]

Copilot uses AI. Check for mistakes.
@l0lawrence
Copy link
Member

@copilot apistub is failing for some pkgs help fix that

…ict package discovery for extension packages

Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 6, 2026

@copilot apistub is failing for some pkgs help fix that

Fixed in b8fb1fe. Two issues were causing apistub failures:

  1. azure-common: The [project] section had no dependencies key, which caused ci_tools.parsing.ParsedSetup (used by apistub and other CI tools) to fail with TypeError: 'NoneType' object is not iterable. Added dependencies = [].

  2. azure-core-experimental and azure-core-tracing-opentelemetry: Package discovery was using exclude which caused namespace __init__.py files (e.g. azure/core/__init__.py) to be included in the wheels, potentially interfering with azure-core at install time. Switched both to use include to only ship the actual extension packages (azure.core.experimental* and azure.core.tracing.ext.opentelemetry_span* respectively).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

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

  • scanning-api.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

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

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