Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning about reference interop for build numbers #1277

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

sethmlarson
Copy link
Contributor

Co-authored-by: Brett Cannon <brett@python.org>
@webknjaz
Copy link
Member

Thanks for the PR! It might be important to clarify cases where it makes sense to use build numbers, I think. For example, a wheel can be published early in the upcoming CPython release cycle but as things evolve and it enters beta/rc, it would probably be reasonable to rebuild a wheel under a newer runtime with zero changes to the source or its deps.

As for the security releases I agree that it's a good idea to bump the patch version number. But also, I'd rebuild the older wheels with a new build number in some cases, when it's possible, in addition to making the new release. This way, I feel like the security fix might reach a wider number of users incidentally. Though, in the announcements, I'd still refer to the new release to reduce possible confusion.

WDYT?

@sethmlarson
Copy link
Contributor Author

It might be important to clarify cases where it makes sense to use build numbers, I think. For example, a wheel can be published early in the upcoming CPython release cycle but as things evolve and it enters beta/rc, it would probably be reasonable to rebuild a wheel under a newer runtime with zero changes to the source or its deps.

Seems like a good idea to me, I can capture this in this PR!

As for the security releases I agree that it's a good idea to bump the patch version number. But also, I'd rebuild the older wheels with a new build number in some cases, when it's possible, in addition to making the new release. This way, I feel like the security fix might reach a wider number of users incidentally. Though, in the announcements, I'd still refer to the new release to reduce possible confusion.

I'm not sure about "backporting" a fix to an existing release using build numbers, has a few downsides:

  • Users seeing that fix being added in a previous version might be confused or think the advisory is incorrect/off-by-one. May incorrectly think they aren't vulnerable.
  • Downstream distributors may be confused about which patch/diff contains the fix.
  • Users that are consuming the library in apps correctly (ie lockfiles w/ hashes) don't receive the fix.
  • Unclear to me how this could work with a deployment pipeline, presumably you'd need to do this manually and potentially not committed to VCS?

In general I don't think we should recommend folks use build numbers this way, there might be some projects where this works for though?

@sethmlarson
Copy link
Contributor Author

@webknjaz I've updated with a quick blurb about a valid use-case, let me know if the phrasing makes sense or needs tweaking.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

Thanks! Love it! Sorry for the delay...

@webknjaz webknjaz enabled auto-merge August 3, 2023 17:30
@webknjaz webknjaz merged commit 94648bd into pypa:main Aug 3, 2023
2 checks passed
@sethmlarson sethmlarson deleted the build-number-interop branch August 3, 2023 17:47
@sethmlarson
Copy link
Contributor Author

Thanks @webknjaz, no worries on the timing! :)

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