This is on top of #2225. The goal is to be able to skip specific tests. Many core test sets have just one test that uses subprocess or threads. Others have a few tests that are failing due to upstream problems in emscripten. I went through and switched to skipping specific tests in as many cases as I could. In modules where most or all tests use threading or subprocess, I gave up and put a comment saying something like 35/50 tests fork and I didn't want to bother to salvage the remaining ones.

In order to accommodate using patterns to skip specific tests (and also extra comments) I switched the format of `python_tests` to a yaml file. This gives us significantly more flexibility in the structure of the file and allows us to use `ruamel.yaml` to update it. We gain a lot flexibility while reducing the length of `make_test_lists.py` modestly from 108 to 78 loc.

In the future, hopefully we should be able to make fixes by deleting one skip pattern and looking into why that particular test fails.

Rework core tests. This is on top of #2225. The goal is to be able to skip specific tests. Many core test sets have just one test that uses subprocess or threads. Others have a few tests that are failing due to upstream problems in emscripten. I went through and switched to skipping specific tests in as many cases as I could. In modules where most or all tests use threading or subprocess, I gave up and put a comment saying something like 35/50 tests fork and I didn't want to bother to salvage the remaining ones.

In order to accommodate using patterns to skip specific tests (and also extra comments) I switched the format of `python_tests` to a yaml file. This gives us significantly more flexibility in the structure of the file and allows us to use `ruamel.yaml` to update it. We gain a lot flexibility while reducing the length of `make_test_lists.py` modestly from 108 to 78 loc.

In the future, hopefully we should be able to make fixes by deleting one skip pattern and looking into why that particular test fails.

# This file gets copied into the Modules/ folder when building
# newlib configurations which do not support dynamic library
# loading.
#
# See build/Python-*/Modules/Setup for more details

*static*

array arraymodule.c	# array objects
audioop audioop.c	# Operations on audio samples
math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
cmath cmathmodule.c # complex math functions
_contextvars _contextvarsmodule.c
_struct _struct.c	# binary structure packing/unpacking
_random _randommodule.c	# Random number generator
_bisect _bisectmodule.c	# Bisection algorithms
_datetime _datetimemodule.c
_heapq _heapqmodule.c
_json _json.c
_csv _csv.c

CTYPES_FLAGS=-DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/stgdict.c $(CTYPES_FLAGS)
_ctypes_test _ctypes/_ctypes_test.c

unicodedata unicodedata.c
_pickle _pickle.c

_socket socketmodule.c
select selectmodule.c
_posixsubprocess _posixsubprocess.c
binascii binascii.c

zlib zlibmodule.c

pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI -DXML_POOR_ENTROPY

_sha1 sha1module.c
_sha256 sha256module.c
_sha512 sha512module.c
_sha3 _sha3/sha3module.c
_md5 md5module.c
_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c

# If we put this directly in the next line, makesetup incorrectly views the
# line as a definition line, instead of specifying a module. We bypass this
# problem by defining an extra variable that contains the =, and this line is
# correctly viewed as a definition line. We need extra quotes to make gcc think
# we want to define MODULE_NAME to be the string "sqlite" instead of the
# abstract symbol sqlite.
SQLITEMODULENAME=MODULE_NAME=\'"sqlite"\'
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -D$(SQLITEMODULENAME) -lsqlite3
_crypt _cryptmodule.c
_bz2 _bz2module.c -lbz2

_queue _queuemodule.c

#future_builtins future_builtins.c

_multibytecodec cjkcodecs/multibytecodec.c

_codecs_cn cjkcodecs/_codecs_cn.c
_codecs_hk cjkcodecs/_codecs_hk.c
_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
_codecs_jp cjkcodecs/_codecs_jp.c
_codecs_kr cjkcodecs/_codecs_kr.c
_codecs_tw cjkcodecs/_codecs_tw.c

_lsprof _lsprof.c rotatingtree.c

_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/mpalloc.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -I$(srcdir)/Modules/_decimal/libmpdec
mmap mmapmodule.c
_xxsubinterpreters _xxsubinterpretersmodule.c

# This file gets copied into the Modules/ folder when building
# newlib configurations which do not support dynamic library
# loading.
#
# See build/Python-*/Modules/Setup for more details

*static*

array arraymodule.c	# array objects
audioop audioop.c	# Operations on audio samples
math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
cmath cmathmodule.c # complex math functions
_contextvars _contextvarsmodule.c
_struct _struct.c	# binary structure packing/unpacking
_random _randommodule.c	# Random number generator
_bisect _bisectmodule.c	# Bisection algorithms
_datetime _datetimemodule.c
_heapq _heapqmodule.c
_json _json.c
_csv _csv.c

CTYPES_FLAGS=-DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/stgdict.c $(CTYPES_FLAGS)

unicodedata unicodedata.c
_pickle _pickle.c

_socket socketmodule.c
select selectmodule.c
_posixsubprocess _posixsubprocess.c
binascii binascii.c

zlib zlibmodule.c

pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI -DXML_POOR_ENTROPY

_sha1 sha1module.c
_sha256 sha256module.c
_sha512 sha512module.c
_sha3 _sha3/sha3module.c
_md5 md5module.c
_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c

# If we put this directly in the next line, makesetup incorrectly views the
# line as a definition line, instead of specifying a module. We bypass this
# problem by defining an extra variable that contains the =, and this line is
# correctly viewed as a definition line. We need extra quotes to make gcc think
# we want to define MODULE_NAME to be the string "sqlite" instead of the
# abstract symbol sqlite.
SQLITEMODULENAME=MODULE_NAME=\'"sqlite"\'
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -D$(SQLITEMODULENAME) -lsqlite3
_crypt _cryptmodule.c
_bz2 _bz2module.c -lbz2

_queue _queuemodule.c

#future_builtins future_builtins.c

_multibytecodec cjkcodecs/multibytecodec.c

_codecs_cn cjkcodecs/_codecs_cn.c
_codecs_hk cjkcodecs/_codecs_hk.c
_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
_codecs_jp cjkcodecs/_codecs_jp.c
_codecs_kr cjkcodecs/_codecs_kr.c
_codecs_tw cjkcodecs/_codecs_tw.c

_lsprof _lsprof.c rotatingtree.c

_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/mpalloc.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -I$(srcdir)/Modules/_decimal/libmpdec
mmap mmapmodule.c
_xxsubinterpreters _xxsubinterpretersmodule.c
