Skip to content

Clarify version policy#777

Open
srittau wants to merge 4 commits into
python:mainfrom
srittau:contrib-versions
Open

Clarify version policy#777
srittau wants to merge 4 commits into
python:mainfrom
srittau:contrib-versions

Conversation

@srittau

@srittau srittau commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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.

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.
@srittau

srittau commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@AlexWaygood Could you have a look whether this makes sense?

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.26%. Comparing base (f29cd28) to head (fa0a703).
⚠️ Report is 2 commits behind head on main.

@@           Coverage Diff           @@
##             main     #777   +/-   ##
=======================================
  Coverage   97.26%   97.26%           
=======================================
  Files           3        3           
  Lines        7860     7860           
=======================================
  Hits         7645     7645           
  Misses        215      215           
Flag Coverage Δ
3.10 88.85% <ø> (ø)
3.10.4 88.85% <ø> (ø)
3.11 88.02% <ø> (ø)
3.11.0 87.27% <ø> (ø)
3.12 87.96% <ø> (ø)
3.12.0 87.95% <ø> (ø)
3.13 83.39% <ø> (ø)
3.13.0 84.09% <ø> (ø)
3.14 79.53% <ø> (ø)
3.9 89.53% <ø> (ø)
3.9.12 89.53% <ø> (ø)
pypy3.10 88.68% <ø> (ø)
pypy3.11 87.88% <ø> (ø)
pypy3.9 89.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! I still find some of this a bit confusing though (sorry, I'm a bit of a packaging noob).

In the original PR that added this policy, there was some talk of not having to manually do these bumps at all, and instead have this kind of thing be done automatically. I guess nothing came of that in the end?

Comment thread CONTRIBUTING.md Outdated
Comment on lines +27 to +32
## 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To be honest, I'm not sure we need this separate section? When putting out the releases over the last few weeks, I found it confusing that the Release instructions section at the bottom linked to this section, when this section didn't actually give any additional useful information compared to the release instructions.

Does anybody except the release manager really care what our development versioning policy is?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree, I also found it confusing. I'll revert this change (mostly).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Actually, I'll just remove it.

Comment thread CONTRIBUTING.md Outdated
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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the "next planned release" language here is a bit confusing, no? We never plan to do a patch release; we only make a patch release if there was a bug in the latest minor release. But as your helpful example later on makes clear, we should really bump the version from 4.1.0 -> 4.1.1.dev0 rather than 4.1.0 -> 4.2.0.dev0.

Also, what do we do for rc releases? After 4.17.0rc1 is released, does the version bump to 4.17.0.dev? What if we then make an rc2 release the next day? That might lead us to go from 4.17.0rc1 -> 4.17.0.dev0 -> 4.17.0rc2 -> 4.17.0.dev0 -> 4.17.0... so I guess after rc1 is released, we should actually bump the version to 4.17.0rc2.dev0, even if we don't plan for an rc2 release? Then the sequence would go 4.17.0rc1 -> 4.17.0rc2.dev0 -> 4.17.0rc2 -> 4.17.0rc3.dev0 -> 4.17.0 -> 4.17.0.dev0.

It would be really helpful to have explicit examples for what to do after an rc release, and what to do between rc releases, in my opinion. We always do rc releases these days, so it's pretty relevant to the release process.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've added some more examples and guidance. This seems fairly complex, but it really isn't. Before a release: Make sure the version number makes sense. After a release: Bump patch and add .dev0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So if we just released 4.1.1, when would we go to 4.2dev0 instead of 4.1.2dev0?

@srittau srittau Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think we could (should?) bump the version to 4.2.0dev0 when adding the first new feature that would require a minor version bump. (That's how I do it for my projects.)

@srittau srittau Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Alternatively we could always bump the minor version after a release and use a separate branch from the last release when we need to do a patch release. (In my opinion the best solution for server projects with frequent changes, but probably a bit too complicated for typing-extensions).

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