Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
96058cc
Start a discussion on helping downstream packaging
mgorny Jan 27, 2025
b4cb7d2
Add a section on Internet access
mgorny Jan 27, 2025
df7081c
Also suggest the option of splitting test data into separate archive
mgorny Jan 27, 2025
cff76df
Add a section on system dependencies
mgorny Jan 28, 2025
be242a8
Add a section on downstream testing
mgorny Jan 28, 2025
9f9af53
Expand on downstream testing, and add emphasis for readability
mgorny Jan 29, 2025
00f39e5
Reorganize into why/how sections, and add emphasis
mgorny Jan 29, 2025
08c70e8
Elaborate a bit more on why it's good to help downstreams
mgorny Jan 29, 2025
24f552e
Correct "pytest" capitalization
mgorny Jan 29, 2025
24b0346
Apply suggestions from code review
mgorny Jan 30, 2025
16288af
Apply more suggestions from code review
mgorny Jan 30, 2025
b4c7485
Attempt addressing the remaining review comments
mgorny Jan 30, 2025
df0c91a
Add a section on stable channels
mgorny Jan 30, 2025
fc72a38
Retitle as "Supporting downstream packaging"
mgorny Jan 31, 2025
24462f4
Add a "not all-or-nothing" sentence
mgorny Jan 31, 2025
29cc38a
Add a note that downstreams can send patches to fix these issues
mgorny Jan 31, 2025
9d5fbe6
Capitalize Git, per @pawamoy
mgorny Feb 1, 2025
4d95da2
Fix inconsistent case in bullet points and remove duplicate
mgorny Feb 1, 2025
6f55709
Apply typo fixes, thanks to @pawamoy
mgorny Feb 1, 2025
548ab34
Clarify that source distribution needs only package's files
mgorny Feb 1, 2025
e925da1
Fix inconsistent whitespace between sentences
mgorny Feb 1, 2025
0eb407c
Make the point of reusing source distribution lighter
mgorny Feb 1, 2025
94743f9
Clarify the Internet part
mgorny Feb 1, 2025
704d1a5
Apply suggestions from code review
mgorny Feb 1, 2025
e596609
Remove duplicate paragraph
mgorny Feb 1, 2025
169281d
Clarify source distributions
mgorny Feb 1, 2025
bb8ac35
Add non-reproducibility argument for changing resources
mgorny Feb 1, 2025
addf891
Mention removing duplication of patches and inconsistency
mgorny Feb 2, 2025
8a3a56c
Reword installing tests to make it clearer
mgorny Feb 2, 2025
58eaf85
Give an example of "catastrophic failure"
mgorny Feb 2, 2025
76aaf79
Indicate that some distributions require building from sources
mgorny Feb 22, 2025
4f97860
Merge branch 'main' into discussion-downstream
ncoghlan Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a section on stable channels
  • Loading branch information
mgorny committed Jan 30, 2025
commit df0c91a6f379ef4139b632c3f5aebdcb46e8ea58
66 changes: 66 additions & 0 deletions source/discussions/downstream-packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,76 @@ Some specific suggestions are:
test discovery.


.. _aim-for-stable-releases:

Aim for stable releases
-----------------------

Why?
~~~~

Many downstreams provide stable release channels in addition to the main
package streams. The goal of these channels is to provide more conservative
upgrades to users with higher stability needs. These users often prefer
to trade having the newest features available for lower risk of issues.

While the exact policies differ, an important criterion for including a new
package version in a stable release channel is for it to be available in testing
for some time already, and have no known major regressions. For example,
in Gentoo Linux a package is usually marked stable after being available
in testing for a month, and being tested against the versions of its
dependencies that are marked stable at the time.

However, there are circumstances which demand more prompt action. For example,
if a security vulnerability or a major bug is found in the version that is
currently available in the stable channel, the downstream is facing a need
to resolve it. In this case, they need to consider various options, such as:

- putting a new version in the stable channel early,

- adding patches to the version currently published,

- or even downgrading the stable channel to an earlier release.

Each of these options involves certain risks and a certain amount of work,
and packagers needs to weigh them to determine the course of action.

How?
~~~~

There are some things that upstreams can do to tailor their workflow to stable
release channels. These actions often are beneficial to the package's users
as well. Some specific suggestions are:

- Adjust the release frequency to the rate of code changes. Packages that
are released rarely often bring significant changes with every release,
and a higher risk of accidental regressions.

- Avoid mixing bug fixes and new features, if possible. In particular, if there
are known bug fixes merged already, consider making a new release before
merging feature branches.

- Consider making prereleases after major changes, to provide more testing
opportunities for users and downstreams willing to opt-in.

- If your project is subject to very intense development, consider splitting
one or more branches that include a more conservative subset of commits,
and are released separately. For example, Django_ currently maintains three
release branches in addition to main.

- Even if you don't wish to maintain additional branches permanently, consider
making additional patch releases with minimal changes to the previous
version, especially when a security vulnerability is discovered.

- Split your changes into focused commits that address one problem at a time,
to make it easier to cherry-pick changes to earlier releases when necessary.


.. _responses: https://pypi.org/project/responses/
.. _vcrpy: https://pypi.org/project/vcrpy/
.. _pytest-socket: https://pypi.org/project/pytest-socket/
.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
.. _pytest: https://pytest.org/
.. _pytest-rerunfailures: https://pypi.org/project/pytest-rerunfailures/
.. _pytest-timeout: https://pypi.org/project/pytest-timeout/
.. _Django: https://www.djangoproject.com/