Conversation
| if branch.name == "3.13": | ||
| self.py313_setup(branch, *args, **kwargs) |
There was a problem hiding this comment.
Branching on name smells, but I kept it here to match the py313_setup name.
vstinner
left a comment
There was a problem hiding this comment.
This change makes the value more readable and easier to maintain, thanks! Here are some suggestions.
| class BranchInfo: | ||
| name: str | ||
| version_tuple: tuple[int, int] | None | ||
| git_ref: str | None |
There was a problem hiding this comment.
I'm a little bit confused by "git_ref" name. You may rename it to "git_branch".
There was a problem hiding this comment.
OK, I guess Git terminology isn't commonly known.
Reusing “branch” for something else is confusing too, though.
|
|
||
| # Branch features. | ||
| # Defaults are for main (and PR), overrides are in _maintenance_branch. | ||
| gil_only: bool = False |
There was a problem hiding this comment.
Nowadays, Free Threading term is more common. You may replace gil_only with its opposite value: "free_threading = True".
There was a problem hiding this comment.
But, the opposite would be both_free_threading_and_gil = True :)
Let's use free_threading_only = True when the GIL builds are dropped.
There was a problem hiding this comment.
Instead of if 'nogil' in tags and branch.gil_only: continue, I would expect something like if 'nogil' in tags and not branch.support_free_threading: continue. But it's not a big deal, I'm fine with gil_only if you prefer to keep it.
There was a problem hiding this comment.
I'm fine with gil_only here for now, especially since we're still using the nogil tag for FT. We should probably migrate both towards 'free-threading' verbiage at some point, but I'm not in a rush for it.
|
|
||
| # Branch features. | ||
| # Defaults are for main (and PR), overrides are in _maintenance_branch. | ||
| gil_only: bool = False |
There was a problem hiding this comment.
Instead of if 'nogil' in tags and branch.gil_only: continue, I would expect something like if 'nogil' in tags and not branch.support_free_threading: continue. But it's not a big deal, I'm fine with gil_only if you prefer to keep it.
| name=buildername, | ||
| workernames=[worker.name], | ||
| builddir="%s.%s%s" % (branchname, worker.name, getattr(f, "buildersuffix", "")), | ||
| builddir=f"{branch.builddir_name}.{worker.name}{f.buildersuffix}", |
There was a problem hiding this comment.
Sidenote: I'd really like to get us switched to using the builder name rather than the worker name for build directories, but it's probably going to require coordination with owners since there may be a bunch of (very large, due to the size of the checkout) dead directories left sitting around after such a switch.
It occurs to me that you may be introducing a nice way to do that progressively with this PR; we can set name_builddir_after_builder = True on new branches and use that to choose the builddir name here.
This is all just musing for the future, though, not actually related to this PR :)
|
|
||
| # Branch features. | ||
| # Defaults are for main (and PR), overrides are in _maintenance_branch. | ||
| gil_only: bool = False |
There was a problem hiding this comment.
I'm fine with gil_only here for now, especially since we're still using the nogil tag for FT. We should probably migrate both towards 'free-threading' verbiage at some point, but I'm not in a rush for it.
We treat the main branch specially, and we use a pseudo-branch for the Pull Request buildbots.
We currently to pass
brancharound as a string, and it's not clear what for the string is in ('main'vs.'3.15';'PR'vs.'3').This PR moves to a dataclass, and gives names for the properties and conditions. For example:
not branch.is_prinstead ofif branch not in ("3",)branch.wasm_tier == 2instead ofbranchname in {"3.11", "3.12"}branch.version_tupleinstead of anifladder starting withif branch == MAIN_BRANCH_NAME: branch = MAIN_BRANCH_VERSIONFor maintainer convenience, running
branches.pyin a terminal will dump all the branch info:This change makes regular builder setup very similar to PR builder setup. This PR stops short of merging them, let's do that later in a separate commit.
Also: add
buildersuffixandtagstoBaseBuild, instead of accessing them throughgetattr.