This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Travis can't build the 3.8 branch right now
Type: Stage: resolved
Components: Build Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, brandtbucher, pablogsal
Priority: normal Keywords: patch

Created on 2020-12-05 06:30 by brandtbucher, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23652 brandtbucher, 2020-12-05 06:32
PR 23685 merged pablogsal, 2020-12-07 20:13
Messages (9)
msg382555 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-12-05 06:30
Travis seems to be using the wrong Python executable for (at least) the "make -j4 regen-all" step on the 3.8 branch. I have a hunch it's using the system python3 executable (3.5?). It causes the following failure when building:

...
python3 ./Tools/scripts/update_file.py ./Include/graminit.h ./Include/graminit.h.new
  File "./Tools/clinic/clinic.py", line 1772
    filename_new = f"{filename}.new"
                                   ^
SyntaxError: invalid syntax
Makefile:574: recipe for target 'clinic' failed
make: *** [clinic] Error 1

Recent examples:

https://travis-ci.com/github/python/cpython/jobs/454447280
https://travis-ci.com/github/python/cpython/jobs/454551266
https://travis-ci.com/github/python/cpython/jobs/454650029
https://travis-ci.com/github/python/cpython/jobs/454907763

I know Travis has been fairly problematic for us in the past.
msg382659 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-12-07 17:25
Pablo, maybe you can shed some light on this. It looks like the PEG parser PR explicitly sets PYTHON_FOR_REGEN=python3.8 using pyenv in .travis.yml for the master (and now 3.9) branches. The change was made in the we-like-parsers repo here:

https://github.com/we-like-parsers/cpython/pull/88

Should we be doing this in the other branches as well?
msg382670 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-07 18:36
I am a bit confused....why is this failing now?
msg382671 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-12-07 18:49
It has been failing for some time. It's just not a required check, so it's easy to miss on a backport branch.

I think the addition of an f-string in PR 23371 a few weeks ago is what started making this fail (since the system python can't run clinic anymore). It looks like it has been failing ever since.
msg382672 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-12-07 18:56
So I suppose we can either:

- set PYTHON_FOR_REGEN to something 3.6+ on these backport branches
- use some other string formatting for that one line

I sort of prefer the second, since I *think* this is the only thing keeping older Pythons from working here.
msg382673 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2020-12-07 19:01
From a quick glance at https://github.com/python/cpython/pulls?page=2&q=base%3A3.8+-label%3Atype-documentation

It looks like travis on 3.8 last passed at https://github.com/python/cpython/pull/23364 around 19 days ago

The culprit commit is likely https://github.com/python/cpython/commit/66dd5338a1ca98921c8e6c51228541ef8ed8076a from 19 days ago since it added the first bit of f-string syntax to clinic.py, it was committed directly without a PR which is likely why this wasn't caught.
msg382674 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2020-12-07 19:03
Oh whoops, got sniped by Brandt while investigating :)
msg382680 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-07 20:11
I would suggest to use some other string formatting for that one line. The reason is that technically (although very unlikely) downstream consumers could be relying on some old PYTHON_FOR_REGEN in the Makefile for 3.8 and I would not like to change that in a patch release.
msg382698 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-07 23:45
New changeset b6d6f5367da1f2e3f749c358ae8563c56a0cc395 by Pablo Galindo in branch '3.8':
bpo-42574: Use format() instead of f-string in Tools/clinic/clinic.py to allow using older Python versions (GH-23685)
https://github.com/python/cpython/commit/b6d6f5367da1f2e3f749c358ae8563c56a0cc395
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86740
2020-12-07 23:45:38pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-12-07 23:45:27pablogsalsetmessages: + msg382698
2020-12-07 20:13:23pablogsalsetpull_requests: + pull_request22548
2020-12-07 20:11:00pablogsalsetmessages: + msg382680
2020-12-07 19:03:14ammar2setmessages: + msg382674
2020-12-07 19:01:17ammar2setnosy: + ammar2
messages: + msg382673
2020-12-07 18:56:12brandtbuchersetmessages: + msg382672
2020-12-07 18:49:09brandtbuchersetmessages: + msg382671
2020-12-07 18:36:02pablogsalsetmessages: + msg382670
2020-12-07 17:25:13brandtbuchersetnosy: + pablogsal
messages: + msg382659
2020-12-05 06:32:11brandtbuchersetkeywords: + patch
stage: patch review
pull_requests: + pull_request22522
2020-12-05 06:30:39brandtbuchercreate