Skip to content

bpo-46794: Bump up the libexpat version into 2.4.6 #31487

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 2 commits into from
Feb 23, 2022

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Feb 22, 2022

@corona10
Copy link
Member Author

@hartwork Please take a look

@hroncok

This comment was marked as resolved.

@corona10
Copy link
Member Author

corona10 commented Feb 22, 2022

@hroncok Thanks for double-checking.
I created the PR when I noticed that @hartwork fix the issue :)

Copy link
Contributor

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@hartwork Please take a look

Hi @corona10, I had a look at it now. I used an approach similar to #31022 (comment) except with Docker automation, details below.

Technically, the first commit bpo-46794: Bump up the libexpat version into 2.4.6 drops the pyexpatns.h integration, so it does more than advertized (and would fail in git bisect context), and then that "regression" is reverted in a new commit. While that's likely considered picky, I would suggest to either

  • a) squash the two commits together to resolve the semantic mismatch and bisect failure situation or
  • b) turn it into a 3-commit sandwich where first pyexpatns.h integration is dropped to yield vanilla Expat 2.4.4, then an update to 2.4.6, and then bringing pyexpatns.h integration back.

Just my 2 cents. For my Dockerfile, it's this:

# Copyright (c) 2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the Apache license version 2.0

FROM alpine
RUN apk add --update \
            diffutils \
            git \
            sed \
        && \
    git clone --depth 1 https://github.com/python/cpython cpython-main \
        && \
    ( cd cpython-main && git rev-parse HEAD ) \
        && \
    git clone --depth 1 --branch bpo-46794 https://github.com/corona10/cpython corona10-bpo-46794 \
        && \
    ( cd corona10-bpo-46794 && git rev-parse HEAD ) \
        && \
    git config --global advice.detachedHead false \
        && \
    git clone --depth 1 --branch R_2_4_4 https://github.com/libexpat/libexpat libexpat_2_4_4 \
        && \
    git clone --depth 1 --branch R_2_4_6 https://github.com/libexpat/libexpat libexpat_2_4_6 \
        && \
    diff -r -u libexpat_2_4_4/expat/lib/ cpython-main/Modules/expat/ | tee 2-4-4.diff \
        && \
    diff -r -u libexpat_2_4_6/expat/lib/ corona10-bpo-46794/Modules/expat/ | tee 2-4-6.diff \
        && \
    sed -e '/^Only in /d' -e '/^\(+++\|---\) /d' -e '/^diff /d' -i 2-4-4.diff 2-4-6.diff \
        && \
    diff -u 2-4-4.diff 2-4-6.diff \
        && \
    echo 'Diff is good.'

Best, Sebastian

@hroncok
Copy link
Contributor

hroncok commented Feb 22, 2022

Note that CPython PRs are squashed when merged.

@hartwork
Copy link
Contributor

Note that CPython PRs are squashed when merged.

@hroncok I assume that's an "always" then. Excellent point 👍

@corona10 corona10 merged commit 1935e1c into python:main Feb 23, 2022
@miss-islington
Copy link
Contributor

Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8, 3.9, 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-31518 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Feb 23, 2022
@bedevere-bot
Copy link

GH-31519 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
@bedevere-bot
Copy link

GH-31520 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-31521 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
miss-islington added a commit that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
miss-islington added a commit that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
ned-deily pushed a commit that referenced this pull request Feb 23, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
ambv pushed a commit that referenced this pull request Mar 2, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
(cherry picked from commit 1935e1c)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants