From d3bb54b7e5cfd9ae738b2e09bab402155d28addf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 02:40:29 +0000 Subject: [PATCH 1/2] docs: fix outdated commands, Python version, and file references in dev docs - release.md: replace non-existent build_package.py with 'python -m build' - engineering_assumptions.md: update CI Python version from 3.6 to 3.9 - eng_sys_checks.md: replace non-existent build_packages.py with 'python -m build' - static_type_checking.md: update py.typed setup to mention pyproject.toml approach - tests.md: replace setup.py/setup.cfg with pyproject.toml (matching current template) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- doc/dev/engineering_assumptions.md | 2 +- doc/dev/release.md | 4 ++-- doc/dev/static_type_checking.md | 3 ++- doc/dev/tests.md | 3 +-- doc/eng_sys_checks.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/dev/engineering_assumptions.md b/doc/dev/engineering_assumptions.md index 5debb67a2ae3..af5bc8f0f236 100644 --- a/doc/dev/engineering_assumptions.md +++ b/doc/dev/engineering_assumptions.md @@ -6,7 +6,7 @@ [bdist_wheel] universal=1 ``` -2. If a package does _not_ have `universal` set, then the default build will produce a wheel for `py3`. This is due to the fact that wheels are currently generated by a CI step running `Python 3.6`. +2. If a package does _not_ have `universal` set, then the default build will produce a wheel for `py3`. This is due to the fact that wheels are currently generated by a CI step running `Python 3.9`. ## Build diff --git a/doc/dev/release.md b/doc/dev/release.md index d3481ad5cc11..799909ed671b 100644 --- a/doc/dev/release.md +++ b/doc/dev/release.md @@ -39,10 +39,10 @@ Validate artifacts prior to clicking `approve` on the release stage for the pack To build a package manually: ``` -python .\build_package.py azure-mgmt-myservice +python -m build sdk//azure-mgmt-myservice ``` -This will a sdist and a wheel file. This requires `wheel` package installed in your environment. +This will produce a sdist and a wheel file. This requires the `build` package installed in your environment (`pip install build`). If you want to manually release on a regular basis, you should create a .pypirc: ``` diff --git a/doc/dev/static_type_checking.md b/doc/dev/static_type_checking.md index a936e2dea167..5a1a65f88229 100644 --- a/doc/dev/static_type_checking.md +++ b/doc/dev/static_type_checking.md @@ -114,7 +114,8 @@ given the expressiveness of Python as a language. So, in practice, what should y - include the path to the `py.typed` in the MANIFEST.in ([example](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/MANIFEST.in)). This is important as it ensures the `py.typed` is included in both the sdist/bdist. - - set `include_package_data=True` and `package_data={"azure.core": ["py.typed"]}` in the setup.py. + - for packages using `pyproject.toml`, add `pytyped = ["py.typed"]` under the `[tool.azure-sdk-build]` section. + For packages still using `setup.py`, set `include_package_data=True` and `package_data={"azure.core": ["py.typed"]}` in the setup.py. Note that the key should be the namespace of where the `py.typed` file is found. 2) Add type hints anywhere in the source code where unit tests are worth writing. Consider typing/mypy as "free" tests diff --git a/doc/dev/tests.md b/doc/dev/tests.md index 9dcccee69ab4..49f24aee47fa 100644 --- a/doc/dev/tests.md +++ b/doc/dev/tests.md @@ -57,8 +57,7 @@ In the root directory of our SDK, a number of mandatory files have been added. W - README.md. This is the description and guidance for customers or your SDK. Please see the guide on writing a README to make sure you have the complete [content requirements and formatting](https://review.learn.microsoft.com/help/platform/reference-document-sdk-client-libraries#readme). - CHANGELOG.md. This is where you will add the summary of changes for each new release. Please see [the guidance](https://azure.github.io/azure-sdk/policies_releases.html#changelog-guidance) for correct formatting. -- setup.py. This is the 'installer' for your Python SDK. Please see [the guide on Python packaging][packaging] for details on customizing this for a specific package. -- setup.cfg. This is an artifact used in building the Python package. Please see [the guide on Python packaging][packaging] for details. +- pyproject.toml. This is the package metadata and build configuration for your Python SDK. Please see [the guide on Python packaging][packaging] for details on customizing this for a specific package. - MANIFEST.in. This is an artifact used in building the Python package. Please see [the guide on Python packaging][packaging] for details. - dev_requirements.txt. This is for developers, and lists the packages required for running the tests and samples. See the dependency installation section below. - sdk_packaging.toml. This configuration is used by the packaging pipeline and no further modifications should be required. diff --git a/doc/eng_sys_checks.md b/doc/eng_sys_checks.md index 2d21c062ee29..19060f809d3f 100644 --- a/doc/eng_sys_checks.md +++ b/doc/eng_sys_checks.md @@ -430,7 +430,7 @@ Workflow of this test is as follows when running regression for an SDK package. Steps to manually run regression test locally: 1. Run below command from your git code repo to generate the wheel of package being developed. Currently we have restricted to have prebuilt wheel. -`./scripts/devops_tasks/build_packages.py --service= -d ` +`python -m build sdk// --outdir ` 2. Run below command to start regression test locally `./scripts/devops_tasks/test_regression.py azure-* --service= --whl-dir=` From 58f445ef054601553199622efe0db867d0aeccd9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 02:42:54 +0000 Subject: [PATCH 2/2] docs: fix py.typed section name and update Python minimum version to 3.9 - static_type_checking.md: fix incorrect section name [tool.azure-sdk-build] to the correct [tool.setuptools.package-data] for pyproject.toml py.typed config - tests.md: update minimum Python version from 3.8 to 3.9, matching azure-core, azure-template, and tool_usage_guide.md; add Python 3.13 Windows Store link Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- doc/dev/static_type_checking.md | 2 +- doc/dev/tests.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/dev/static_type_checking.md b/doc/dev/static_type_checking.md index 5a1a65f88229..5f180e0ed843 100644 --- a/doc/dev/static_type_checking.md +++ b/doc/dev/static_type_checking.md @@ -114,7 +114,7 @@ given the expressiveness of Python as a language. So, in practice, what should y - include the path to the `py.typed` in the MANIFEST.in ([example](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/MANIFEST.in)). This is important as it ensures the `py.typed` is included in both the sdist/bdist. - - for packages using `pyproject.toml`, add `pytyped = ["py.typed"]` under the `[tool.azure-sdk-build]` section. + - for packages using `pyproject.toml`, add `pytyped = ["py.typed"]` under the `[tool.setuptools.package-data]` section. For packages still using `setup.py`, set `include_package_data=True` and `package_data={"azure.core": ["py.typed"]}` in the setup.py. Note that the key should be the namespace of where the `py.typed` file is found. diff --git a/doc/dev/tests.md b/doc/dev/tests.md index 49f24aee47fa..4db15e91728b 100644 --- a/doc/dev/tests.md +++ b/doc/dev/tests.md @@ -30,11 +30,11 @@ testing infrastructure, and demonstrates how to write and run tests for a servic ## Set up your development environment -The Azure SDK Python team creates libraries that are compatible with Python 3.8 and up. We walk through setting up a -Python virtual environment for Python 3.8, but having a virtual environment for each minor version can make it +The Azure SDK Python team creates libraries that are compatible with Python 3.9 and up. We walk through setting up a +Python virtual environment for Python 3.9, but having a virtual environment for each minor version can make it easier to debug PRs locally. -- Python 3.8+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store ([3.8](https://www.microsoft.com/p/python-38/9mssztt1n39l), [3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US)) (Windows only). +- Python 3.9+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store ([3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US), [3.13](https://apps.microsoft.com/detail/9ncvdn91xzqp)) (Windows only). ```cmd