Skip to content

Commit 2c2bab4

Browse files
authored
Create deprecation_process.md (Azure#29700)
* Create deprecation_process.md * Update deprecation_process.md * Update deprecation_process.md * Update deprecation_process.md * Update deprecation_process.md
1 parent 0ca4e7e commit 2c2bab4

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

doc/deprecation_process.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
This page can be linked using: [aka.ms/azsdk/python/deprecation-process](https://aka.ms/azsdk/python/deprecation-process)
2+
3+
# Overview
4+
5+
This page describes how to mark a package deprecated on PyPI. You likely need to read this if you are a package owner, and need to explain to your customers
6+
they shouldn't use the package you used to release anymore.
7+
8+
The overall idea is that PyPI do not support an official deprecation logic. We concluded that the best way was:
9+
- Change the classifier as Inactive, to showcase in metadata that this package is longer worked on
10+
- Add a disclaimer on the main Readme file to explain deprecation, and guide to migration guide to other package as necessary
11+
- Push a [post release](https://peps.python.org/pep-0440/#post-releases) to PyPI
12+
13+
# Step 1: Update in the repository
14+
15+
Clone the repository and udpate the following files of your package:
16+
- `README.MD` add a disclaimer using this syntax:
17+
18+
> This package is no longer being maintained. Use the [azure-mynewpackage](https://pypi.org/project/azure-mynewpackage/) package instead.
19+
>
20+
> For migration instructions, see the [migration guide](https://aka.ms/azsdk/python/migrate/my-new-package).
21+
22+
- `CHANGELOG.MD` add a new post version with the current date, and the same disclaimer. For instance
23+
24+
> ## 1.2.3.post1 (2023-03-31)
25+
>
26+
> This package is no longer being maintained. Use the [azure-mynewpackage](https://pypi.org/project/azure-mynewpackage/) package instead.
27+
>
28+
> For migration instructions, see the [migration guide](https://aka.ms/azsdk/python/migrate/my-new-package).
29+
30+
- `azure/mypackage/_version.py` : Change the version to the one used in the changelog (for instance `"1.2.3.post1"`). This file may be called `version.py` if your package is very old.
31+
- `sdk_packaging.toml` : You need to add `auto_update = false` if not already present to avoid the bot overriding your changes
32+
- `setup.py` change the `Development Status` classifier to `Development Status :: 7 - Inactive`. **Important: This needs to be your LAST commit on the PR. More on this at the bottom of this page if you want details.**.
33+
34+
Do a PR targeting the `main` branch. Post your PR in our [review channel for Python](https://teams.microsoft.com/l/channel/19%3a4175567f1e154a80ab5b88cbd22ea92f%40thread.skype/Language%2520-%2520Python%2520-%2520Reviews?groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47)
35+
36+
You're responsible to fix any CI issue related to this PR, if any. Note that `Inactive` packages are disabled from most CI verificiation, therefore the CI should be faster and
37+
have less requirements.
38+
39+
An example of PR can be found the [deprecation of application insights](https://github.com/Azure/azure-sdk-for-python/pull/23024/files)
40+
41+
Once the PR is merged, move to the next step.
42+
43+
# Step 2: Trigger a release
44+
45+
A release here is the same as usual, triggering the release pipeline of you SDK. More instruction can be found at: https://aka.ms/azsdk/release-checklist
46+
47+
**Important Note**: As CI don't build Inactive projects right now, you can't build and release. This is a classical chicken and egg problem: we don't want to lose time on testing Inactive projects, but you need at least have one run of build to release the Inactive project. It's important then to pass the variable "BUILD_INACTIVE=true" while triggering the release pipeline. But doing this may uncover issues that were not seen in your initial PR as the CI was disabled. To avoid most of those problems, it's highly recommended that you put the commit with "Inactive" LAST in your PR. In other words, push all changes to Readme and ChangeLog, wait to confirm the CI is green, and when everything is clean, push finally "Inactive" in the `setup.py`
48+

0 commit comments

Comments
 (0)