We do not have a standard way to get (programatically) informations 
about Python versions, this leads to having to commit to numerous places 
during each releases, and some other places never get the information 
(like old docs, see [1]).


Maybe we should provide an HTTP API listing Python versions, like:

{
     "current_stable": "3.8.3",
     "versions": [
         {
             "branch": "master",
             "status": "dev",
             "version": "3.10",
             "release_manager": "Łukasz Langa",
             "doc_languages": ["en", "es", "fr", "ja", "ko", "pt-br", 
"zh-cn"]
         },
         {
             "branch": "3.9",
             "latest": "3.9.0b1",
             "status": "features",
             "pep": 596,
             "version": "3.9",
             "release_manager": "Łukasz Langa",
             "doc_languages": ["en", "fr", "ja", "ko", "pt-br", "zh-cn"]
         },
         {
             "branch": "3.8",
             "latest": "3.8.3",
             "status": "bugfix",
             "pep": 569,
             "version": "3.8",
             "release_manager": "Łukasz Langa",
             "first_release": "2019-10-14",
             "end_life": "2024-10",
             "doc_languages": ["en", "fr", "ja", "ko", "pt-br", "zh-cn"]
         },
         {
             "branch": "3.7",
             "latest": "3.7.7",
             "status": "bugfix",
             "pep": 537,
             "version": "3.8",
             "release_manager": "Ned Deily",
             "first_release": "2018-06-27",
             "end_life": "2023-06-27",
             "doc_languages": ["en", "fr", "ja", "ko", "pt-br"]
         }
     ...

(Don't really mind this particular example, it's a random first though, 
the doc_languages should probably be a dict instead, with links to the 
actual docs, ...)

It could be used to (and maybe avoid a commit) to:
- build the documentation version switcher and languages switchers
- toggle the red deprecated banner (to be seen on [2] if you missed it)
- generate the versions table at https://devguide.python.org/
- generate the Docs by version menu
- generate the Download menu and download page of python.org
- list the documentations versions to be built by docsbuild-script
- probably many scripts could use it too, I can think of [3]
- ...

It could become more detailed about each minor versions, git tag, links 
to changelogs, links to the repositories, to the docs, download links, 
and so on.

Maybe this idea will just add a commit to do between the numerous 
commits to already do during a release... (à la https://xkcd.com/927/), 
and a SPOF.

What do you think?

[1]: 
https://mail.python.org/archives/list/d...@python.org/thread/L724YZXXHQZQP4HJYXCDCLYLBJB726D3/
[2]: https://docs.python.org/2.7/
[3]: https://gitlab.com/python-devs/ci-images/-/blob/master/Dockerfile#L19

-- 
[Julien Palard](https://mdk.fr)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Y35KK55BW7PTUIQKSNROLZGYVHBMHE7O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to