_socket module has failed to compile with --without-threads flag since 554fb699af8c, because Py_END_ALLOW_THREADS macro exists behind the done label ( Modules/socketmodule.c:666 ). If --without-threads flag goes on, Py_END_ALLOW_THREADS macro replaces to just right curly bracket. Therefore, between label and end of block have no statements. There needs meaningless statement (e.g. result = result;) to avoid compile error. I wrote a one line patch as a test.
Thanks for the report and patch. I think an empty statement might be better than the dummy assignment. Let me know if the following would work and I will commit it: done: + ; /* necessary for --without-threads flag */ Py_END_ALLOW_THREADS
I also committed a similar but independent fix in Python 2.7 building Modules/_sqlite/connection.c, caused by revision 649937bb8f1c, and adjusted some tests to work when multithreading is disabled. For the record, I also opened Issue 28482, Issue 28484 and Issue 28485 about other test suite failures identified when multithreading is disabled.