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

gh-116472: Fix invalid newlines in XML attr #116473

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

DanAlbert
Copy link
Contributor

@DanAlbert DanAlbert commented Mar 7, 2024

Compliant XML readers normalize newlines in attributes to spaces (https://www.w3.org/TR/2006/REC-xml11-20060816/#AVNormalize). MSBuild apparently doesn't do that, but Python's minidom parser does. Android modifies this file with minidom (to include additional license texts from the dependencies we use) so the resulting file is re-written without the newlines, which breaks the build.

Compliant XML readers normalize newlines in attributes to spaces
(https://www.w3.org/TR/2006/REC-xml11-20060816/#AVNormalize). MSBuild
apparently doesn't do that, but Python's minidom parser does. Android
modifies this file with minidom (to include additional license texts
from the dependencies we use) so the resulting file is re-written
without the newlines, which breaks the build.
@DanAlbert DanAlbert requested a review from a team as a code owner March 7, 2024 20:42
Copy link

cpython-cla-bot bot commented Mar 7, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Mar 7, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@DanAlbert
Copy link
Contributor Author

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Expecting that this is the case since it's only a problem if you're building Python in an unusual way.

@zooba zooba added skip news needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Mar 7, 2024
@zooba
Copy link
Member

zooba commented Mar 7, 2024

Happy to take this change, but also happy to accept changes that would let you inject extra license files somewhere else (either in your own .props file - as we can do to override externals versions/paths - or from the command line/environment).

@zooba zooba merged commit 5d0cdfe into python:main Mar 7, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @DanAlbert for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 7, 2024
…SBuild files (pythonGH-116473)

(cherry picked from commit 5d0cdfe)

Co-authored-by: Dan Albert <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 7, 2024

GH-116474 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Mar 7, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 7, 2024
…SBuild files (pythonGH-116473)

(cherry picked from commit 5d0cdfe)

Co-authored-by: Dan Albert <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 7, 2024

GH-116475 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Mar 7, 2024
@DanAlbert
Copy link
Contributor Author

Happy to take this change, but also happy to accept changes that would let you inject extra license files somewhere else (either in your own .props file - as we can do to override externals versions/paths - or from the command line/environment).

Yeah, that'd be better, but I'm an msbuild noob :)

@DanAlbert DanAlbert deleted the fix-xml-newlines branch March 7, 2024 21:54
zooba pushed a commit that referenced this pull request Mar 7, 2024
… files (GH-116473)

(cherry picked from commit 5d0cdfe)

Co-authored-by: Dan Albert <[email protected]>
zooba pushed a commit that referenced this pull request Mar 7, 2024
… files (GH-116473)

(cherry picked from commit 5d0cdfe)

Co-authored-by: Dan Albert <[email protected]>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
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.

2 participants