Skip to content

gh-151365: Temporarily downgrade Git to prevent fatal error - #155495

Merged
hugovk merged 2 commits into
python:mainfrom
hugovk:3.16-downgrade-git
Aug 11, 2026
Merged

gh-151365: Temporarily downgrade Git to prevent fatal error#155495
hugovk merged 2 commits into
python:mainfrom
hugovk:3.16-downgrade-git

Conversation

@hugovk

@hugovk hugovk commented Aug 10, 2026

Copy link
Copy Markdown
Member

Downgrading takes 7 seconds.

Upgrading via build from source (+cache) or Homebrew are likely to take longer.

@webknjaz

Copy link
Copy Markdown
Member

Is it possible to explicitly declare the version limit in the command, plz?

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

It works as expected. For example, I see "git version 2.43.0" in the "Downgrade Git" step of Docs/Docs CI job.

# to avoid "fatal: shallow file has changed since we read it" bug.
# See https://github.com/python/cpython/issues/151365.
run: |
sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't know this /noble-updates syntax. I understand that it's a way to request the git version of Ubuntu 24.04.

@hugovk

hugovk commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

Is it possible to explicitly declare the version limit in the command, plz?

Something like this?

sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'

@webknjaz

webknjaz commented Aug 10, 2026

Copy link
Copy Markdown
Member

@hugovk yep, something along those lines. I was hoping for a <= broken_version.

@webknjaz webknjaz added the 3.15 pre-release feature fixes, bugs and security fixes label Aug 10, 2026
@vstinner

Copy link
Copy Markdown
Member

I suppose that this change should be backported to stable branches (3.13 to 3.15).

@webknjaz

webknjaz commented Aug 10, 2026

Copy link
Copy Markdown
Member

@vstinner I've already labeled it for 3.15, but one of the workflow files doesn't exist in 3.14 so automatic backporting will fail farther back. Once it's ported into 3.15, somebody needs to look into picking it back into older branches manually.

@vstinner vstinner added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 10, 2026
@vstinner

Copy link
Copy Markdown
Member

I've already labeled it for 3.15

The "needs backport to 3.15" label is better for that: it backports automatically the change to 3.15.

@hugovk
hugovk merged commit 6d2b551 into python:main Aug 11, 2026
55 checks passed
@hugovk
hugovk deleted the 3.16-downgrade-git branch August 11, 2026 04:53
@miss-islington-app

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

GH-155532 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 11, 2026
hugovk added a commit that referenced this pull request Aug 11, 2026
…H-155495) (#155532)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Aug 11, 2026
…H-155495) (GH-155532) (#155533)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
hugovk added a commit that referenced this pull request Aug 11, 2026
…H-155495) (GH-155532) (GH-155533) (#155535)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Aug 11, 2026
…H-155495) (GH-155532) (GH-155533) (GH-155535) (#155537)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@webknjaz

Copy link
Copy Markdown
Member

@vstinner oops, for some reason I thought I did that but confused the two labels 🤦‍♂️ sry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants