From 38ecaab89e9a07864186913bbd31d6d90043fef4 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Tue, 16 Jan 2018 20:50:08 +1000 Subject: [PATCH 1/3] [3.5] bpo-32563: Get expat to compile under C89 expat: Add artificial scopes in xmltok.c utf8_toUtf8() to fix c89 compilation. Cherry-picked from libexpat commit e0b290eb3d8f4c4b45137a7d7f4f8db812145bd2 --- Modules/expat/xmltok.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index 007aed0640a2ef3..70663ce9d4b8b10 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -405,16 +405,20 @@ utf8_toUtf8(const ENCODING *UNUSED_P(enc), } /* Avoid copying partial characters (from incomplete input). */ - const char * const fromLimBefore = fromLim; - align_limit_to_full_utf8_characters(*fromP, &fromLim); - if (fromLim < fromLimBefore) { - input_incomplete = true; + { + const char * const fromLimBefore = fromLim; + align_limit_to_full_utf8_characters(*fromP, &fromLim); + if (fromLim < fromLimBefore) { + input_incomplete = true; + } } - const ptrdiff_t bytesToCopy = fromLim - *fromP; - memcpy((void *)*toP, (const void *)*fromP, (size_t)bytesToCopy); - *fromP += bytesToCopy; - *toP += bytesToCopy; + { + const ptrdiff_t bytesToCopy = fromLim - *fromP; + memcpy((void *)*toP, (const void *)*fromP, (size_t)bytesToCopy); + *fromP += bytesToCopy; + *toP += bytesToCopy; + } if (output_exhausted) // needs to go first return XML_CONVERT_OUTPUT_EXHAUSTED; From f3023f0a29e3871b95c6caea491ef40d95be2bd4 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sat, 20 Jan 2018 12:31:36 +1000 Subject: [PATCH 2/3] Backport XML RPC test skip to 3.5 The buildbot service upgrade removed the XML-RPC interface, so this test no longer works (through no fault of the standard library). --- Lib/test/test_xmlrpc_net.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_xmlrpc_net.py b/Lib/test/test_xmlrpc_net.py index b60b82f3e232fa5..c9119b04eb9eace 100644 --- a/Lib/test/test_xmlrpc_net.py +++ b/Lib/test/test_xmlrpc_net.py @@ -7,6 +7,7 @@ import xmlrpc.client as xmlrpclib +@unittest.skip('XXX: buildbot.python.org/all/xmlrpc/ is gone') class PythonBuildersTest(unittest.TestCase): def test_python_builders(self): From 77aa45903da46a426a5f668b7cebd479add9f5eb Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Tue, 23 Jan 2018 10:04:30 +1000 Subject: [PATCH 3/3] Don't configure a nonexistent Python --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fed0052b54a6e02..eb98a657b27064c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,6 @@ matrix: # compiler here and the other to run the coverage build. Clang is preferred # in this instance for its better error messages. env: TESTING=cpython - before_install: - # work around https://github.com/travis-ci/travis-ci/issues/8363 - - pyenv global system 3.5 - os: osx language: c compiler: clang