/usr/share/doc/python-releases-doc/html/concepts.html is in python-releases-doc 1.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Concepts — Releases documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Releases documentation" href="index.html"/>
<link rel="next" title="Usage" href="usage.html"/>
<link rel="prev" title="Releases" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Releases
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Concepts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#issue-and-release-types">Issue and release types</a></li>
<li class="toctree-l2"><a class="reference internal" href="#release-organization">Release organization</a></li>
<li class="toctree-l2"><a class="reference internal" href="#major-releases">Major releases</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#rolling-releases">“Rolling” releases</a></li>
<li class="toctree-l3"><a class="reference internal" href="#mostly-compatible-2-0-with-continued-maint-for-1-x">Mostly-compatible 2.0 with continued maint for 1.x</a></li>
<li class="toctree-l3"><a class="reference internal" href="#some-issues-forward-ported-others-not">Some issues forward-ported, others not</a></li>
<li class="toctree-l3"><a class="reference internal" href="#mixed-but-exclusive-features-prior-to-a-new-major-release">Mixed-but-exclusive features prior to a new major release</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#unstable-prehistory-mode">“Unstable prehistory” mode</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#example">Example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#crossing-the-1-0-boundary">Crossing the 1.0 boundary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Releases</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Concepts</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/concepts.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="concepts">
<h1>Concepts<a class="headerlink" href="#concepts" title="Permalink to this headline">¶</a></h1>
<p>This page contains conceptual info about how Releases organizes and thinks
about issues and releases. For details on formatting/config options/etc (e.g.
so you can interpret the examples below), see <a class="reference internal" href="usage.html"><span class="doc">Usage</span></a>.</p>
<div class="section" id="issue-and-release-types">
<h2>Issue and release types<a class="headerlink" href="#issue-and-release-types" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p class="first">Issues are always one of three types: <strong>features</strong>, <strong>bug fixes</strong> or
<strong>support items</strong>.</p>
<blockquote>
<div><ul class="simple">
<li><strong>Features</strong> are (typically larger) changes adding new behavior.</li>
<li><strong>Bug fixes</strong> are (typically minor) changes addressing incorrect
behavior, crashes, etc.</li>
<li><strong>Support items</strong> vary in size but are usually non-code-related changes,
such as documentation or packaging updates.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first">Releases also happen to come in three flavors:</p>
<blockquote>
<div><ul>
<li><p class="first"><strong>Major releases</strong> are backwards incompatible releases, often with
large/sweeping changes to a codebase.</p>
<blockquote>
<div><ul class="simple">
<li>They increment the first version number only, e.g. <code class="docutils literal"><span class="pre">1.0.0</span></code>.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Feature releases</strong> (sometimes called <strong>minor</strong> or <strong>secondary</strong>) are
backwards compatible with the previous major release, and focus on adding
new functionality (code, or support, or both.) They sometimes include
major/complex bug fixes which are too risky to include in a bugfix
release.</p>
<blockquote>
<div><ul class="simple">
<li>The second version number is incremented for these, e.g. <code class="docutils literal"><span class="pre">1.1.0</span></code>.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Bugfix releases</strong> (sometimes called <strong>tertiary</strong>) focus on fixing
incorrect behavior while minimizing the risk of creating more bugs.
Rarely, they will include small new features deemed important enough to
backport from their ‘native’ feature release.</p>
<blockquote>
<div><ul class="simple">
<li>These releases increment the third/final version number, e.g.
<code class="docutils literal"><span class="pre">1.1.1</span></code>.</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
</ul>
</div>
<div class="section" id="release-organization">
<h2>Release organization<a class="headerlink" href="#release-organization" title="Permalink to this headline">¶</a></h2>
<p>We parse changelog timelines so the resulting per-release issue lists honor the
above descriptions. Here are the core rules, with examples. See <a class="reference internal" href="usage.html"><span class="doc">Usage</span></a>
for details on formatting/etc.</p>
<ul>
<li><p class="first"><strong>By default, bugfixes go into bugfix releases, features and support items go
into feature releases.</strong></p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :support:`4` Updated our test runner
* :bug:`3` Another bugfix
* :feature:`2` Implemented new feature
* :bug:`1` Fixed a bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2, support #4</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #3</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Bugfixes are assumed to backport to all stable release lines by default,
and are displayed as such.</strong> However, this can be overridden on a per-release
and/or per-bug basis - see later bullet points.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.1 <date>`
* :release:`1.0.2 <date>`
* :bug:`3` Fixed another bug, onoes
* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`2` Implemented new feature
* :bug:`1` Fixed a bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.1</span></code>: bug #3</li>
<li><code class="docutils literal"><span class="pre">1.0.2</span></code>: bug #3</li>
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Bugfixes marked ‘major’ go into feature releases instead.</strong> In other words,
they’re displayed as bugs, but organized as features.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :bug:`3 major` Big bugfix with lots of changes
* :feature:`2` Implemented new feature
* :bug:`1` Fixed a bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2, bug #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Features or support items marked ‘backported’ appear in both bugfix and
feature releases.</strong> In other words, they’re displayed as feature/support
items, but organized as a combination feature/support <em>and</em> bug item.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :bug:`4` Fixed another bug
* :feature:`3` Regular feature
* :feature:`2 backported` Small new feature worth backporting
* :bug:`1` Fixed a bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2, feature #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, feature #2, bug #4</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Releases implicitly include all issues from their own, and prior, release
lines.</strong> (Again, unless the release explicitly states otherwise - see below.)</p>
<blockquote>
<div><ul>
<li><p class="first">For example, in the below changelog (remembering that changelogs are
written in descending order from newest to oldest entry) the code
released as <code class="docutils literal"><span class="pre">1.1.0</span></code> includes the changes from bugs #1 and #3, in
addition to its explicitly stated contents of feature #2:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :bug:`3` Another bugfix
* :feature:`2` Implemented new feature
* :bug:`1` Fixed a bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Again, to be explicit, the rendered changelog displays this breakdown:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #3</li>
</ul>
</div></blockquote>
<p>But it’s <em>implied</em> that <code class="docutils literal"><span class="pre">1.1.0</span></code> includes the contents of <code class="docutils literal"><span class="pre">1.0.1</span></code>
because it released afterwards/simultaneously and is a higher release
line.</p>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Releases may be told explicitly which issues to include</strong> (using a
comma-separated list.) This is useful for the rare bugfix that gets
backported beyond the actively supported release lines.</p>
<p>For example, below shows a project whose lifecycle is “release 1.0; release
1.1 and drop active support for 1.0; put out a special 1.0.x release.”
Without the explicit issue list for 1.0.1, Releases would roll up all
bugfixes, including the two that didn’t actually apply to the 1.0 line.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.0.1 <date>` 1, 5
* :release:`1.1.1 <date>`
* :bug:`5` Bugfix that applied back to 1.0.
* :bug:`4` Bugfix that didn't apply to 1.0, only 1.1
* :bug:`3` Bugfix that didn't apply to 1.0, only 1.1
* :release:`1.1.0 <date>`
* :feature:`2` Implemented new feature
* :bug:`1` Fixed a 1.0.0 bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #2</li>
<li><code class="docutils literal"><span class="pre">1.1.1</span></code>: bugs #3, #4 and #5</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bugs #1 and #5 only</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Bugfix issues may be told explicitly which release line they ‘start’ in.</strong>
This is useful for bugs that don’t go back all the way to the oldest actively
supported line - it keeps them from showing up in “too-old” releases.</p>
<p>The below example includes a project actively supporting 1.5, 1.6 and 1.7
release lines, with a couple of bugfixes that only applied to 1.6+.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.7.1 <date>`
* :release:`1.6.2 <date>`
* :release:`1.5.3 <date>`
* :bug:`50` Bug applying to all lines
* :bug:`42 (1.6+)` A bug only applying to the new feature in 1.6
* :release:`1.7.0 <date>`
* :release:`1.6.1 <date>`
* :release:`1.5.2 <date>`
* :feature:`25` Another new feature
* :bug:`35` Bug that applies to all lines
* :bug:`34` Bug that applies to all lines
* :release:`1.6.0 <date>`
* :release:`1.5.1 <date>`
* :feature:`22` Some new feature
* :bug:`20` Bugfix
* :release:`1.5.0 <date>`
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">1.7.1</span></code>: bugs #50 and #42</li>
<li><code class="docutils literal"><span class="pre">1.6.2</span></code>: bugs #50 and #42</li>
<li><code class="docutils literal"><span class="pre">1.5.3</span></code>: bug #50 only</li>
<li><code class="docutils literal"><span class="pre">1.7.0</span></code>: feature #25</li>
<li><code class="docutils literal"><span class="pre">1.6.1</span></code>: bugs #34, #35</li>
<li><code class="docutils literal"><span class="pre">1.5.2</span></code>: bugs #34, #35</li>
<li><code class="docutils literal"><span class="pre">1.6.0</span></code>: feature #22</li>
<li><code class="docutils literal"><span class="pre">1.5.1</span></code>: bug #20</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><strong>Bugs listed before the first release are treated as though they have the
‘major’ keyword.</strong> This is chiefly because it makes no sense to have a
“bugfix release” as one’s first-ever release - you can’t fix something that’s
not public! Then once the changelog parser passes that initial release,
normal rules start to apply again.</p>
<blockquote>
<div><ul>
<li><p class="first">Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`0.1.1`
* :bug:`3` The feature had bugs :(
* :release:`0.1.0 <date>`
* :feature:`2` Our first ever feature
* :bug:`1` Explicitly marked bug, even though that is silly
* Implicit issue/entry here (becomes a bug by default)
</pre></div>
</div>
</li>
<li><p class="first">Result:</p>
<blockquote>
<div><ul class="simple">
<li><code class="docutils literal"><span class="pre">0.1.1</span></code>: bug #3 only, since it’s the only bug after the first
release.</li>
<li><code class="docutils literal"><span class="pre">0.1.0</span></code>: everything else - the implicit bug, the explicit bug #1,
and the feature #2.</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
</ul>
</div>
<div class="section" id="major-releases">
<h2>Major releases<a class="headerlink" href="#major-releases" title="Permalink to this headline">¶</a></h2>
<p>Major releases introduce additional concerns to changelog organization on top
of those above. Users whose software tends to just “roll forwards” without
keeping older stable branches alive for bugfix releases, will likely not need
to do much.</p>
<p>However, when your support window stretches across major version
boundaries, telling Releases which issues belong to which major version (or
versions plural) becomes a bit more work.</p>
<p>There are two main rules to keep in mind when dealing with “mixed” major
versions:</p>
<ul class="simple">
<li><strong>All issues encountered after a major release</strong> are considered associated
with that major release line <strong>by default</strong>.</li>
<li><strong>All feature-like items (features, support, major bugs) encountered just
prior to a major release</strong> are considered part of the major release itself.</li>
<li>To force association with a <strong>different major release</strong> (or set of major
releases), issues may <strong>specify a ‘version spec’</strong> annotation.</li>
</ul>
<p>Here’s some examples to clarify.</p>
<div class="section" id="rolling-releases">
<h3>“Rolling” releases<a class="headerlink" href="#rolling-releases" title="Permalink to this headline">¶</a></h3>
<p>This example has no mixing of release lines, just moving from 1.x to 2.x. 1.x
is effectively abandoned. (Hope 2.x is an easy upgrade…) Note how features 4
and 5, because they are encountered prior to 2.0.0, are attached to it
automatically.</p>
<p>Input:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`2.1.0 <date>`
* :release:`2.0.1 <date>`
* :feature:`7` Yet another new feature
* :bug:`6` A bug :(
* :release:`2.0.0 <date>`
* :feature:`5` Another (backwards incompatible) feature!
* :feature:`4` A (backwards incompatible) feature!
* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`3` New feature
* :bug:`2` Another bug
* :bug:`1` An bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
<p>Result:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">2.1.0</span></code>: feature #7</li>
<li><code class="docutils literal"><span class="pre">2.0.1</span></code>: bug #6</li>
<li><code class="docutils literal"><span class="pre">2.0.0</span></code>: feature #4, feature #5</li>
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #2</li>
</ul>
<p>Pretty simple, nothing actually new here.</p>
</div>
<div class="section" id="mostly-compatible-2-0-with-continued-maint-for-1-x">
<h3>Mostly-compatible 2.0 with continued maint for 1.x<a class="headerlink" href="#mostly-compatible-2-0-with-continued-maint-for-1-x" title="Permalink to this headline">¶</a></h3>
<p>This maintainer is a bit more conscientious/masochistic and wants to keep users
of 1.x happy for a while after 2.0 launches.</p>
<p>The timeline is very similar to the previous example, but in this scenario, all
issues developed on the 1.x branch are forward-ported to 2.x, because 2.x
wasn’t a huge departure from 1.x.</p>
<p>To signify this, post-2.0 issues that were developed initially for 1.x, are
annotated with <code class="docutils literal"><span class="pre">(1.0+)</span></code>, telling Releases to add them to all releases above
1.0, instead of just the most recent major release (2.0):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`2.1.0 <date>`
* :release:`2.0.1 <date>`
* :release:`1.2.0 <date>`
* :release:`1.1.1 <date>`
* :release:`1.0.2 <date>`
* :bug:`9` A 2.0-only bugfix.
* :feature:`8` A 2.0-only feature.
* :feature:`7 (1.0+)` Yet another new feature
* :bug:`6 (1.0+)` A bug :(
* :release:`2.0.0 <date>`
* :feature:`5` Another (backwards incompatible) feature!
* :feature:`4` A (backwards incompatible) feature!
* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`3` New feature
* :bug:`2` Another bug
* :bug:`1` An bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
<p>Result:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">2.1.0</span></code>: feature #7, feature #8</li>
<li><code class="docutils literal"><span class="pre">2.0.1</span></code>: bug #6, bug #9</li>
<li><code class="docutils literal"><span class="pre">1.2.0</span></code>: feature #7, but not feature #8</li>
<li><code class="docutils literal"><span class="pre">1.1.1</span></code>: bug #6, but not bug #9</li>
<li><code class="docutils literal"><span class="pre">1.0.2</span></code>: bug #6, but not bug #9</li>
<li><code class="docutils literal"><span class="pre">2.0.0</span></code>: feature #4, feature #5</li>
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #2</li>
</ul>
</div>
<div class="section" id="some-issues-forward-ported-others-not">
<h3>Some issues forward-ported, others not<a class="headerlink" href="#some-issues-forward-ported-others-not" title="Permalink to this headline">¶</a></h3>
<p>This time, some issues remain 1.x-specific as they don’t apply to 2.x for
whatever reason. The simple “X.Y+” format doesn’t let us declare this, so we
use one you’re familiar with from packaging systems like
<code class="docutils literal"><span class="pre">setuptools</span></code>/<code class="docutils literal"><span class="pre">pip</span></code>:</p>
<ul>
<li><p class="first"><code class="docutils literal"><span class="pre">(<2.0)</span></code> signifies “only included in releases lower than 2.0”</p>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">(>=2.0)</span></code> says “only include in release lines 2.0 and higher” (thus
applying to 2.1, 2.2, 3.0, 4.0 etc).</p>
<blockquote>
<div><ul class="simple">
<li>This is identical to saying <code class="docutils literal"><span class="pre">(2.0+)</span></code>; the <code class="docutils literal"><span class="pre">+</span></code> version is just a
convenient / backwards compatible shorthand.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">(>=2.0,<3.0)</span></code> limits an issue to <em>just</em> the 2.x line, preventing its
inclusion in 1.x, 3.x or anything else.</p>
</li>
<li><p class="first">And so on; see the documentation for the <code class="docutils literal"><span class="pre">Spec</span></code> class at
<a class="reference external" href="https://python-semanticversion.readthedocs.io">https://python-semanticversion.readthedocs.io</a> for details.</p>
</li>
<li><p class="first">To be clear, <strong>you may put any combination of major+minor version number in
these annotations</strong>, just as with the simpler <code class="docutils literal"><span class="pre">(1.5+)</span></code> style format.</p>
<blockquote>
<div><ul class="simple">
<li>This is mostly applicable to bugs or backported issues. Features, support
items and major bugs only need to inform Releases about major release
lines.</li>
</ul>
</div></blockquote>
</li>
</ul>
<p>Armed with this more powerful syntax, we can limit some issues just to the 1.x
line:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`2.1.0 <date>`
* :release:`2.0.1 <date>`
* :release:`1.2.0 <date>`
* :release:`1.1.1 <date>`
* :release:`1.0.2 <date>`
* :feature:`9 (>=1.0)` A new feature that works with both versions (using
the more explicit version of "1.0+")
* :feature:`8` A new feature that only works on 2.x (no annotation needed)
* :bug:`7 (<2.0)` A bug only affecting 1.x
* :bug:`6 (1.0+)` A bug affecting all versions
* :release:`2.0.0 <date>`
* :feature:`5` Another (backwards incompatible) feature!
* :feature:`4` A (backwards incompatible) feature!
* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`3` New feature
* :bug:`2` Another bug
* :bug:`1` An bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
<p>Result:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">2.1.0</span></code>: feature #8, feature #9</li>
<li><code class="docutils literal"><span class="pre">2.0.1</span></code>: bug #6 (but not #7)</li>
<li><code class="docutils literal"><span class="pre">1.2.0</span></code>: feature #9 (but not #8)</li>
<li><code class="docutils literal"><span class="pre">1.1.1</span></code>: bug #6, bug #7</li>
<li><code class="docutils literal"><span class="pre">1.0.2</span></code>: bug #6, bug #7</li>
<li><code class="docutils literal"><span class="pre">2.0.0</span></code>: feature #4, feature #5</li>
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #2</li>
</ul>
</div>
<div class="section" id="mixed-but-exclusive-features-prior-to-a-new-major-release">
<h3>Mixed-but-exclusive features prior to a new major release<a class="headerlink" href="#mixed-but-exclusive-features-prior-to-a-new-major-release" title="Permalink to this headline">¶</a></h3>
<p>This example illustrates a corner case where one is actively maintaining a
“current” 1.x line at the same time as releasing the new 2.x line. Unlike the
earlier examples, this one has both “2.0-only” <em>and</em> “1.0-only” features in the
run-up to 2.0.0 (plus bugs).</p>
<p>In this scenario, the non-annotated features are automatically assigned to the
2.0 major version, even though the 1.2.0 release technically came out “before”
2.0.0.</p>
<p>As long as no non-release line items appear between 1.2.0 and 2.0.0, the system
will behave as if 2.0.0 was the “primary” next release, with 1.2.0 only
capturing features explicitly annotated as being “<2.0” (or similar).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This behavior holds true even if the adjacent release line-items have
different dates; the heuristic is solely about their placement in the
changelog list.</p>
</div>
<p>Note also how bugs found in this window just prior to 2.0.0, remain associated
with the 1.x line that they are fixing; it wouldn’t make sense to publish a
bugfix for unreleased functionality.</p>
<p>Changelog:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`2.0.0 <date>`
* :release:`1.2.0 <date>`
* :release:`1.1.1 <date>`
* :bug:`6` A bug found after 1.1.0 came out
* :feature:`5 (<2.0)` A 1.0-only feature!
* :feature:`4` A (backwards incompatible) feature!
* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`3` New feature
* :bug:`2` Another bug
* :bug:`1` An bug
* :release:`1.0.0 <date>`
</pre></div>
</div>
<p>Result:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">2.0.0</span></code>: feature #4 (but not feature #5)</li>
<li><code class="docutils literal"><span class="pre">1.2.0</span></code>: feature #5 (but not feature #4)</li>
<li><code class="docutils literal"><span class="pre">1.1.1</span></code>: bug 6</li>
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: feature #3</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: bug #1, bug #2</li>
</ul>
</div>
</div>
<div class="section" id="unstable-prehistory-mode">
<span id="unstable-prehistory"></span><h2>“Unstable prehistory” mode<a class="headerlink" href="#unstable-prehistory-mode" title="Permalink to this headline">¶</a></h2>
<p>All of the above assumes a mature, semantic-versioning-enabled project, where
you have stable release lines as well as a feature development ‘trunk’ branch.
This doesn’t always describe young projects, however - before one’s 1.0.0,
semantic versioning may not apply strongly or at all.</p>
<p>When the <code class="docutils literal"><span class="pre">releases_unstable_prehistory</span></code> option is enabled (it’s off by
default for backwards compatibility reasons), changelog parsing/organizing
behaves differently, until releases other than <code class="docutils literal"><span class="pre">0.x.x</span></code> are encountered:</p>
<ul>
<li><p class="first">All issues, regardless of type, are assigned to the very next release;
there’s no organizing along minor release lines, no ‘major’ bugs are
necessary, nor are ‘backported’ features.</p>
</li>
<li><p class="first">Unmarked line-items - which are normally considered to be bugs - are
displayed without any classification (i.e. they don’t get a ‘Bug’ prefix).</p>
<blockquote>
<div><ul class="simple">
<li>This is mostly to enable the types of “pre-Releases” changelogs wherein
<em>all</em> line items lack issue-type role prefixes.</li>
<li>If your changelog <em>does</em> include explicit role prefixes (<code class="docutils literal"><span class="pre">:bug:</span></code>,
<code class="docutils literal"><span class="pre">:feature:</span></code> etc) they are left untouched & will still visually appear
as the indicated type.</li>
</ul>
</div></blockquote>
</li>
</ul>
<div class="section" id="example">
<h3>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h3>
<p>Here’s an example of what this option means. Take the following changelog:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`0.2.1 <date>`
* Bugfix #7
* Feature #6, but meh, we arbitrarily are gonna call the next release a
tertiary one anyways
* Bugfix #5
* :release:`0.2.0 <date>`
* Medium bugfix #4
* Tiny bugfix #3
* Feature #2
* :release:`0.1.0 <date>`
* It works! First public release.
</pre></div>
</div>
<p>Under normal Releases behavior this wouldn’t match what the author clearly
intends - all of these line items lack roles, so they’d all be “bugs”, and then
none of them would get inserted into 0.1.0 or 0.2.0 which are feature releases.</p>
<p>With <code class="docutils literal"><span class="pre">releases_unstable_prehistory</span></code> enabled, we instead get:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">0.2.1</span></code>: bugfix 5, feature 6, bugfix 7</li>
<li><code class="docutils literal"><span class="pre">0.2.0</span></code>: feature 2, bugfix 3, bugfix 4</li>
<li><code class="docutils literal"><span class="pre">0.1.0</span></code>: the beginning-of-time “it works!” note</li>
</ul>
</div>
<div class="section" id="crossing-the-1-0-boundary">
<h3>Crossing the 1.0 boundary<a class="headerlink" href="#crossing-the-1-0-boundary" title="Permalink to this headline">¶</a></h3>
<p>As mentioned, even when this option is enabled, the 1.0.0 release (or
whichever release is the first not beginning with <code class="docutils literal"><span class="pre">0.</span></code>) implicitly
deactivates this behavior. All subsequent issues then follow the behavior
outlined in the rest of the document: bugfixes only go in tertiary releases,
features only go in minor releases, etc.</p>
<p>Another explicit example - this changelog (which is even more arbitrary with
its versioning prior to 1.0):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>* :release:`1.1.0 <date>`
* :release:`1.0.1 <date>`
* :feature:`8` A new, backwards compatible feature, hooray
* :bug:`7` First post-1.0 bugfix!
* :release:`1.0.0 <date>`
* Bug #6
* Feature #5
* `0.5.0`
* Feature #4
* Bug #3
* Bug #2
* `0.1.0`
* Feature #1
</pre></div>
</div>
<p>The resulting changelog is organized like so:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">1.1.0</span></code>: Feature #8</li>
<li><code class="docutils literal"><span class="pre">1.0.1</span></code>: Bug #7 - no features, this is the first “real” bugfix release</li>
<li><code class="docutils literal"><span class="pre">1.0.0</span></code>: Bug #6, feature #5 - this is the last “unstable” release rolling
up all prior issues.</li>
<li><code class="docutils literal"><span class="pre">0.5.0</span></code>: Bug #2, bug #3, feature #4</li>
<li><code class="docutils literal"><span class="pre">0.1.0</span></code>: Feature #1</li>
</ul>
</div>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral" title="Releases" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2018 Jeff Forcier.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|