Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Updated "Status of Python versions" page #1531

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

Merged
merged 32 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
87837ba
Python version status: show when bugfix releases become security rele…
nedbat Mar 12, 2025
0f24453
Make them look all the same
encukou Mar 13, 2025
2926a88
Show EOL ones as red
encukou Mar 13, 2025
dc4f279
Two graphs
encukou Mar 13, 2025
8850c25
Remove unacceptable newline
encukou Mar 13, 2025
223f178
Join an unacceptably split line
encukou Mar 13, 2025
5813c1c
Hide the starts of EOL versions
encukou Mar 13, 2025
2cc3a35
Special-case 2.7
encukou Mar 13, 2025
06ac26d
Remove 3.5
encukou Mar 13, 2025
d2e56e6
Format
encukou Mar 13, 2025
3a4fe83
Put labels on top, if the mask doesn't work
encukou Mar 13, 2025
df95f8f
simplify the svg paths
nedbat Mar 13, 2025
583f4c5
Add more explanation to the Python versions Status key
nedbat Mar 17, 2025
e43873f
clarify what a feature fix is.
nedbat Mar 17, 2025
2bb7cd8
Update _tools/generate_release_cycle.py
nedbat Mar 17, 2025
e769654
Update _tools/generate_release_cycle.py
nedbat Mar 17, 2025
73c7d45
Update _tools/generate_release_cycle.py
nedbat Mar 17, 2025
b2975bc
Update _tools/generate_release_cycle.py
nedbat Mar 17, 2025
45a454b
Update _tools/generate_release_cycle.py
nedbat Mar 17, 2025
33b5f37
Apply suggestions from code review
nedbat Mar 17, 2025
3f36d68
3.13 gets two years of bug fixes, earlier gets 1.5 years
nedbat Mar 17, 2025
47df7c4
last changes from the review
nedbat Mar 17, 2025
80a44b7
use a consistent anchor for the full chart
nedbat Mar 18, 2025
584d48a
more tweaking of the phase descriptions
nedbat Mar 18, 2025
213f5fc
Use `height` consistently
encukou Mar 18, 2025
6ae8f9f
Clean up the path code
encukou Mar 18, 2025
70a2fe5
Remove the "shade" rectangle, keep left+right+border or a single rect
encukou Mar 18, 2025
38ad862
Use the same radius everywhere
encukou Mar 18, 2025
2ae3700
Rearrange comments/assignments
encukou Mar 18, 2025
5eb9243
No mask for active branches
encukou Mar 18, 2025
a83cd0f
Restore bold red color
encukou Mar 18, 2025
eb054b2
Update _tools/release_cycle_template.svg.jinja
encukou Mar 18, 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
Two graphs
  • Loading branch information
encukou committed Mar 13, 2025
commit dc4f2792b0813df3af3949ff3506f5f5be380a2e
1 change: 1 addition & 0 deletions 1 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ celerybeat-schedule
include/branches.csv
include/end-of-life.csv
include/release-cycle.svg
include/release-cycle-all.svg
1 change: 1 addition & 0 deletions 1 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ REQUIREMENTS = requirements.txt
_ALL_SPHINX_OPTS = --jobs $(JOBS) $(SPHINXOPTS)
_RELEASE_CYCLE = include/branches.csv \
include/end-of-life.csv \
include/release-cycle-all.svg \
include/release-cycle.svg

.PHONY: help
Expand Down
27 changes: 23 additions & 4 deletions 27 _tools/generate_release_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def parse_date(date_str: str) -> dt.date:
class Versions:
"""For converting JSON to CSV and SVG."""

def __init__(self) -> None:
def __init__(self, limit_to_active=False) -> None:
with open("include/release-cycle.json", encoding="UTF-8") as in_file:
self.versions = json.load(in_file)

Expand All @@ -38,6 +38,20 @@ def __init__(self) -> None:
version["first_release_date"] = r1 = parse_date(version["first_release"])
version["start_security_date"] = r1 + dt.timedelta(days=2 * 365)
hugovk marked this conversation as resolved.
Show resolved Hide resolved
version["end_of_life_date"] = parse_date(version["end_of_life"])

if limit_to_active:
cutoff = min(
version["first_release_date"]
for version in self.versions.values()
if version["status"] != 'end-of-life'
nedbat marked this conversation as resolved.
Show resolved Hide resolved
)
self.versions = {
key: version
for key, version in self.versions.items()
if version["end_of_life_date"] >= cutoff
}


self.sorted_versions = sorted(
self.versions.values(),
key=lambda v: [int(i) for i in v["key"].split(".")],
Expand Down Expand Up @@ -69,7 +83,7 @@ def write_csv(self) -> None:
csv_file.writeheader()
csv_file.writerows(versions.values())

def write_svg(self, today: str) -> None:
def write_svg(self, today: str, out_path: str) -> None:
"""Output SVG file."""
env = jinja2.Environment(
loader=jinja2.FileSystemLoader("_tools/"),
Expand Down Expand Up @@ -117,7 +131,7 @@ def format_year(year: int) -> str:
return f"'{year % 100:02}"

with open(
"include/release-cycle.svg", "w", encoding="UTF-8", newline="\n"
out_path, "w", encoding="UTF-8", newline="\n"
) as f:
template.stream(
SCALE=SCALE,
Expand Down Expand Up @@ -146,8 +160,13 @@ def main() -> None:
args = parser.parse_args()

versions = Versions()
print(versions.versions.keys())
nedbat marked this conversation as resolved.
Show resolved Hide resolved
assert len(versions.versions) > 10
versions.write_csv()
versions.write_svg(args.today)
versions.write_svg(args.today, "include/release-cycle-all.svg")

versions = Versions(limit_to_active=True)
versions.write_svg(args.today, "include/release-cycle.svg")


if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion 3 make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ if ($target -Eq "clean") {
$ToClean = @(
$BUILDDIR,
$_VENV_DIR,
"include/branches.csv", "include/end-of-life.csv", "include/release-cycle.svg"
"include/branches.csv", "include/end-of-life.csv",
"include/release-cycle.svg", "include/release-cycle-all.svg"
nedbat marked this conversation as resolved.
Show resolved Hide resolved
)
foreach ($item in $ToClean) {
if (Test-Path -Path $item) {
Expand Down
16 changes: 12 additions & 4 deletions 16 versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ branch that accepts new features. The latest release for each Python
version can be found on the `download page <https://www.python.org/downloads/>`_.


Python release cycle
====================

.. raw:: html
:file: include/release-cycle.svg

Another useful visualization is `endoflife.date/python <https://endoflife.date/python>`_.
(See :ref:`below <versions-chart-all>` for a chart with older versions.
nedbat marked this conversation as resolved.
Show resolved Hide resolved
Another useful visualization is `endoflife.date/python <https://endoflife.date/python>`_.)


Supported versions
==================
Expand All @@ -40,6 +39,15 @@ Unsupported versions
:file: include/end-of-life.csv


.. _versions-chart-all:

Full chart
==========

.. raw:: html
:file: include/release-cycle-all.svg
Comment on lines +44 to +48
Copy link
Member

Choose a reason for hiding this comment

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

I find the page structure a bit confusing, since it has two charts and two tables, with some level of overlapping between them but otherwise no further symmetry:

  • first there's the chart with 2.7 + 3.6-3.14
  • then there's a table with 3.9-3.14 (supported versions)
  • then there's another table with 2.6-2.7 + 3.0-3.8 (unsupported versions)
  • then there's the full chart with 2.6-2.7 + 3.0-3.14 (all versions)

In particular:

  • Is there a reason why the first chart includes 2.7/3.6-3.8 even though they are unsupported? Perhaps this could become the chart of supported versions only?
  • It might be less confusing if both tables were under the same header ("Version support"?), with either a <caption> or a colspanning <th> on top of each table for "supported"/"unsupported" (or even joined together, with the colspanning <th>s)

This can also be addressed in a separate PR if you prefer.

Copy link
Member

Choose a reason for hiding this comment

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

This structure is deliberate. It keeps the tables together, and the least-useful info (the full chart) at the end, and a heavy distinction between active and EOL branches.

Perhaps this could become the chart of supported versions only?

When we get tired of telling people that 2.7 is EOL, we set the special_py27 argument to False :)
That'll still show versions that went EOL during an active branch's lifetime. That should (for 3.8+) match the recommended deprecation period per PEP 387.

Copy link
Member

Choose a reason for hiding this comment

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

It keeps the tables together

This is good, since they complement each other -- that's why I suggested putting them in the same subsection too.

the least-useful info (the full chart) at the end, and a heavy distinction between active and EOL branches.

Removing EOL branches from the first chart would make the distinction even clearer IMHO.

When we get tired of telling people that 2.7 is EOL

I don't think we need it in the first chart for that -- the fact that it's not even included should give them a hint, and if that's not enough they can find 2.7 in the table and in the full chart.



Status key
==========

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.