From 4549145d62b06a7e305ce436d27382013f620743 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 2 Jul 2026 17:22:20 +0200 Subject: [PATCH 1/7] Clarify version policy We will increase the patch version after a release. The minor version is increased when features are added. Also, use `dev0` instead of `dev`, since the former is the normalized version of the latter. --- CONTRIBUTING.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed56aba1..4597461c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,9 +25,11 @@ Starting with version 4.0.0, `typing_extensions` uses for more detail. ## Development version -After a release the version is increased once in [pyproject.toml](/pyproject.toml) and -appended with a `.dev` suffix, e.g. `4.0.1.dev`. -Further subsequent updates are not planned between releases. + +After a release the patch version is increased in [pyproject.toml](/pyproject.toml) and +appended with a `.dev0` suffix, e.g. `4.0.1.dev0`. + +When a new feature is added we will increase the minor version once between releases. For example, from 4.0.1.dev0 to 4.1.0.dev0. # Type stubs @@ -111,4 +113,4 @@ pipx run pre-commit run -a - Release automation will finish the release. You'll have to manually approve the last step before upload. -- After the release has been published on PyPI upgrade the version in number in [pyproject.toml](/pyproject.toml) to a `dev` version of the next planned release. For example, change 4.1.1 to 4.X.X.dev, see also [Development versions](#development-version). # TODO decide on major vs. minor increase. +- After the release has been published on PyPI upgrade the version in number in [pyproject.toml](/pyproject.toml) to a `dev` version of the next planned release. For example, change 4.1.1 to 4.1.2.dev0, see also [Development versions](#development-version). From 0dc7b8540cc13d58df74223645638ad39e17e1c5 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 2 Jul 2026 19:59:47 +0200 Subject: [PATCH 2/7] Remove the 'Development version' section --- CONTRIBUTING.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4597461c..74909f00 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,13 +24,6 @@ Starting with version 4.0.0, `typing_extensions` uses [Semantic Versioning](https://semver.org/). See the documentation for more detail. -## Development version - -After a release the patch version is increased in [pyproject.toml](/pyproject.toml) and -appended with a `.dev0` suffix, e.g. `4.0.1.dev0`. - -When a new feature is added we will increase the minor version once between releases. For example, from 4.0.1.dev0 to 4.1.0.dev0. - # Type stubs A stub file for `typing_extensions` is maintained @@ -113,4 +106,4 @@ pipx run pre-commit run -a - Release automation will finish the release. You'll have to manually approve the last step before upload. -- After the release has been published on PyPI upgrade the version in number in [pyproject.toml](/pyproject.toml) to a `dev` version of the next planned release. For example, change 4.1.1 to 4.1.2.dev0, see also [Development versions](#development-version). +- After the release has been published on PyPI upgrade the version in number in [pyproject.toml](/pyproject.toml) to a `dev` version of the next planned release. For example, change 4.1.1 to 4.1.2.dev0. From e29b457df31041fd429963507172e2ed6ccb4d4d Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 2 Jul 2026 20:11:43 +0200 Subject: [PATCH 3/7] More examples and guidance --- CONTRIBUTING.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74909f00..5d387b8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,15 +88,18 @@ pipx run pre-commit run -a # Workflow for PyPI releases -- Make sure you follow the versioning policy in the documentation - (e.g., release candidates before any feature release, do not release development versions) +- Make sure to release at least one release candidate (starting with `rc1`) before making a full release. E.g. release `4.2.0rc1` before releasing `4.2.0`. + When an urgent hotfix is necessary (and you bump only the patch version), you can skip the release candidates. - Ensure that GitHub Actions reports no errors. - Check that `CHANGELOG.md` accurately reflects all important changes committed to `main` since the previous release. - Update the version number in `typing_extensions/pyproject.toml` and in - `typing_extensions/CHANGELOG.md`. + `typing_extensions/CHANGELOG.md` by removing `.dev0` and potentially adding the `rcX` suffix: + - `4.1.0.dev0` → `4.1.0rc1` + - `4.1.0rc2.dev0` → `4.1.0rc2` or `4.1.0` when making a full release + - `4.1.1.dev0` → `4.1.1rc1` or `4.1.1` when making an urgent hotfix - Create a new GitHub release at https://github.com/python/typing_extensions/releases/new. Details: @@ -106,4 +109,6 @@ pipx run pre-commit run -a - Release automation will finish the release. You'll have to manually approve the last step before upload. -- After the release has been published on PyPI upgrade the version in number in [pyproject.toml](/pyproject.toml) to a `dev` version of the next planned release. For example, change 4.1.1 to 4.1.2.dev0. +- After the release has been published on PyPI upgrade the patch or rc version number in [pyproject.toml](/pyproject.toml) and append `.dev0`. For example: + - 4.1.1 → 4.1.2.dev0 + - 4.1.1rc1 → 4.1.1rc2.dev0 From fa0a7038f94e90a6355355fbebea3c3e0a3329eb Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 2 Jul 2026 20:13:52 +0200 Subject: [PATCH 4/7] Use consistent markup --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d387b8e..23d6e163 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,5 +110,5 @@ pipx run pre-commit run -a approve the last step before upload. - After the release has been published on PyPI upgrade the patch or rc version number in [pyproject.toml](/pyproject.toml) and append `.dev0`. For example: - - 4.1.1 → 4.1.2.dev0 - - 4.1.1rc1 → 4.1.1rc2.dev0 + - `4.1.1` → `4.1.2.dev0` + - `4.1.1rc1` → `4.1.1rc2.dev0` From 7bb48d2eac043f90626e7b03edc136224378f433 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Fri, 3 Jul 2026 15:02:11 +0200 Subject: [PATCH 5/7] Apply suggestions and link to the existing policy --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23d6e163..4305131f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,8 @@ pipx run pre-commit run -a # Workflow for PyPI releases -- Make sure to release at least one release candidate (starting with `rc1`) before making a full release. E.g. release `4.2.0rc1` before releasing `4.2.0`. - When an urgent hotfix is necessary (and you bump only the patch version), you can skip the release candidates. +- Make sure that the version in `pyproject.toml` and `CHANGELOG.md` follows the versioning policy outlined in + [the documentation](https://typing-extensions.readthedocs.io/en/latest/#versioning-and-backwards-compatibility). - Ensure that GitHub Actions reports no errors. @@ -97,9 +97,9 @@ pipx run pre-commit run -a - Update the version number in `typing_extensions/pyproject.toml` and in `typing_extensions/CHANGELOG.md` by removing `.dev0` and potentially adding the `rcX` suffix: - - `4.1.0.dev0` → `4.1.0rc1` + - `4.1.0.dev0` → `4.1.0rc1` for the initial release candidate - `4.1.0rc2.dev0` → `4.1.0rc2` or `4.1.0` when making a full release - - `4.1.1.dev0` → `4.1.1rc1` or `4.1.1` when making an urgent hotfix + - `4.1.1.dev0` → `4.1.1` when making a hotfix release - Create a new GitHub release at https://github.com/python/typing_extensions/releases/new. Details: @@ -111,4 +111,4 @@ pipx run pre-commit run -a - After the release has been published on PyPI upgrade the patch or rc version number in [pyproject.toml](/pyproject.toml) and append `.dev0`. For example: - `4.1.1` → `4.1.2.dev0` - - `4.1.1rc1` → `4.1.1rc2.dev0` + - `4.1.0rc1` → `4.1.0rc2.dev0` From d057821b0570cfed693d6537202e807c3318d724 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Fri, 3 Jul 2026 15:08:15 +0200 Subject: [PATCH 6/7] Also link to the versioning policy in the first section --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4305131f..83547557 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ CPython's `main` branch. # Versioning scheme Starting with version 4.0.0, `typing_extensions` uses -[Semantic Versioning](https://semver.org/). See the documentation +[Semantic Versioning](https://semver.org/). [See the documentation](https://typing-extensions.readthedocs.io/en/latest/#versioning-and-backwards-compatibility) for more detail. # Type stubs From 55d3b7ee138ebb57fa97d4925d67ae44277180b3 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Fri, 3 Jul 2026 16:22:51 +0200 Subject: [PATCH 7/7] Update CONTRIBUTING.md Co-authored-by: Alex Waygood --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83547557..3e84cc5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,7 +98,7 @@ pipx run pre-commit run -a - Update the version number in `typing_extensions/pyproject.toml` and in `typing_extensions/CHANGELOG.md` by removing `.dev0` and potentially adding the `rcX` suffix: - `4.1.0.dev0` → `4.1.0rc1` for the initial release candidate - - `4.1.0rc2.dev0` → `4.1.0rc2` or `4.1.0` when making a full release + - `4.1.0rc2.dev0` → `4.1.0rc2` or `4.1.0`, depending on whether the release is a second release candidate or a full release - `4.1.1.dev0` → `4.1.1` when making a hotfix release - Create a new GitHub release at https://github.com/python/typing_extensions/releases/new.