Skip to content
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

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

Merged
merged 2 commits into from Feb 23, 2022
Merged

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Feb 22, 2022

@corona10
Copy link
Member Author

@corona10 corona10 commented Feb 22, 2022

@hartwork Please take a look

@hroncok

This comment has been hidden.

@corona10
Copy link
Member Author

@corona10 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

@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 hroncok commented Feb 22, 2022

Note that CPython PRs are squashed when merged.

@hartwork
Copy link
Contributor

@hartwork hartwork commented Feb 22, 2022

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
12 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Feb 23, 2022

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

@bedevere-bot bedevere-bot commented Feb 23, 2022

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 issue Feb 23, 2022
(cherry picked from commit 1935e1c)

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

@bedevere-bot bedevere-bot commented Feb 23, 2022

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 issue 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 issue Feb 23, 2022
(cherry picked from commit 1935e1c)

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

@bedevere-bot bedevere-bot commented Feb 23, 2022

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

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Feb 23, 2022

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 issue 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 issue 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 issue 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 issue 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 issue Mar 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants