bpo-29591: Upgrade Modules/expat to libexpat 2.2#2164
bpo-29591: Upgrade Modules/expat to libexpat 2.2#2164vstinner merged 4 commits intopython:masterfrom vstinner:expat_22
Conversation
Modules/expat/expat.h
Outdated
There was a problem hiding this comment.
wait, superseded is the right spelling no?
There was a problem hiding this comment.
it is... but lets not correct spelling in third party code.
There was a problem hiding this comment.
oh, i see, this was a python tree only change? weird. keep it as superseded.
There was a problem hiding this comment.
it is... but lets not correct spelling in third party code.
Right, I prefer to reduce the downstream changes: so I reverted this change as well.
Modules/expat/amigaconfig.h
Outdated
There was a problem hiding this comment.
I don't understand this change, I just tried to reduce the changes.
There was a problem hiding this comment.
we don't even need to carry this file around given the #elif defined(__amigaos__) it is included under.
There was a problem hiding this comment.
I'm not sure that I understood. Do you want to remove amigaconfig.h?
There was a problem hiding this comment.
In the meanwhile, I reverted this change.
Modules/expat/expat_external.h
Outdated
There was a problem hiding this comment.
I would be nice to upstream pyexpatns.h namespace, it seems useful to build a clean DLL on Windows.
gpshead
left a comment
There was a problem hiding this comment.
I believe we can drop amigaconfig.h, watcomconfig.h, and macconfig.h (used for MacOS classic on PPC32).
|
Duplicate of #2021 ? |
|
@matrixise: "Duplicate of #2021 ?" I chose a different approach. I wanted to recreate Modules/expat/ directory "from scratch", so I wrote a shell script that I attached http://bugs.python.org/issue29591 I tried to restore Python changes reverted by my approach, to more easily identify downstream (Python) changes. I compare my PR with your (rebased) PR:
|
|
FWIW I agree with recreating the directory from scratch and applying the few actually relevant local changes on top as you have done. |
|
We can remove the XML_HAS_SET_HASH_SALT define and remove that from the ifdef in Modules/pyexpat.c as that was a custom Python tree only addition I did back when I backported those changes to the old version of expat we had at the time. |
Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom
The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0).
|
@gpshead: "We can remove the XML_HAS_SET_HASH_SALT define and remove that from the ifdef in Modules/pyexpat.c (...)" Right, done. |
" I believe we can drop amigaconfig.h, watcomconfig.h, and macconfig.h (used for MacOS classic on PPC32)." => done
|
Does it look good to you now @gpshead? |
tiran
left a comment
There was a problem hiding this comment.
Your patch on top of expat upstream looks good to me. I don't have enough resources to properly verify all changes in expat, though.
* bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5)
…2164) (#2203) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5) * bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132) * bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses a winconfig.h configuration file which already defines: * XML_NS * XML_DTD * BYTEORDER=1234 * XML_CONTEXT_BYTES=1024 * HAVE_MEMMOVE Remove these defines from PCbuild/_elementtree.vcxproj to prevent compiler warnings. Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com> (cherry picked from commit c8fb58b) * bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319) * bpo-30726: Fix elementtree warnings on Windows Caused by usage of `getenv` which should be safe. And a few integer truncations which should also be ok. * bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream (cherry picked from commit 87c6555)
…2164) (#2204) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5) * bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132) * bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses a winconfig.h configuration file which already defines: * XML_NS * XML_DTD * BYTEORDER=1234 * XML_CONTEXT_BYTES=1024 * HAVE_MEMMOVE Remove these defines from PCbuild/_elementtree.vcxproj to prevent compiler warnings. Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com> (cherry picked from commit c8fb58b) * bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319) * bpo-30726: Fix elementtree warnings on Windows Caused by usage of `getenv` which should be safe. And a few integer truncations which should also be ok. * bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream (cherry picked from commit 87c6555)
[Security] bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of CVE-2016-0718 and CVE-2016-4472. See https://sourceforge.net/p/expat/bugs/537/ for more information.