From fa27d5f2297b4f3a91b1fe350e760cd4f701d916 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 20 Oct 2016 00:48:23 +0000 Subject: Issue #28480: Avoid label at end of compound statement --without-threads Based on patch by Masayuki Yamamoto. --- Misc/NEWS | 3 +++ Modules/socketmodule.c | 1 + 2 files changed, 4 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 04e353c..2936e3a 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -20,6 +20,9 @@ Core and Builtins Library ------- +- Issue #28480: Fix error building socket module when multithreading is + disabled. + - Issue #24452: Make webbrowser support Chrome on Mac OS X. - Issue #20766: Fix references leaked by pdb in the handling of SIGINT diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index f53eade..2620d56 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -664,6 +664,7 @@ internal_setblocking(PySocketSockObject *s, int block) result = 0; done: + ; /* necessary for --without-threads flag */ Py_END_ALLOW_THREADS if (result) { -- cgit v0.12 From 94332cba0f0a020f35590f1c2da23a579e3e9f3a Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 20 Oct 2016 05:10:44 +0000 Subject: Issue #28480: Adjust or skip tests if multithreading is disabled --- Lib/test/test_asyncgen.py | 4 +++- Lib/test/test_logging.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_asyncgen.py b/Lib/test/test_asyncgen.py index 41b1b4f..c24fbea 100644 --- a/Lib/test/test_asyncgen.py +++ b/Lib/test/test_asyncgen.py @@ -1,4 +1,3 @@ -import asyncio import inspect import sys import types @@ -6,6 +5,9 @@ import unittest from unittest import mock +from test.support import import_module +asyncio = import_module("asyncio") + class AwaitException(Exception): pass diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index e45a982..078a86b 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -4304,7 +4304,7 @@ class MiscTestCase(unittest.TestCase): 'logProcesses', 'currentframe', 'PercentStyle', 'StrFormatStyle', 'StringTemplateStyle', 'Filterer', 'PlaceHolder', 'Manager', 'RootLogger', - 'root'} + 'root', 'threading'} support.check__all__(self, logging, blacklist=blacklist) -- cgit v0.12