bpo-30197: Enhance functions swap_attr() and swap_item() in test.supp…
…ort. (#1341)* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.They now work when delete replaced attribute or item inside the withstatement. The old value of the attribute or item (or None if it doesn'texist) now will be assigned to the target of the "as" clause, if there isone.* Update docstrings.
bpo-30104: Only use -fno-strict-aliasing on dtoa.c (#1340)
On clang, only compile dtoa.c with -fno-strict-aliasing, use strictaliasing to compile all other C files.
bpo-30174: Remove duplicate definition from pickletools (#1301)
There were two almost identical definitions of bytes1.
bpo-30175: Skip client cert tests of test_imaplib (#1320)
* bpo-30175: Skip client cert tests of test_imaplibThe IMAP server cyrus.andrew.cmu.edu doesn't accept our randomlygenerated client x509 certificate anymore.* bpo-30188: Catch EOFError in NetworkedNNTPTeststest_nntplib fails randomly with EOFError inNetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in thatcase.
bpo-30131: test_logging now joins queue threads (#1298)
QueueListenerTest of test_logging now closes the multiprocessingQueue and joins its thread to prevent leaking dangling threads tofollowing tests.Add also @support.reap_threads to detect earlier if a test leaksthreads (and try to "cleanup" these threads).
timemodule.c: Cast PyUnicode_AsUTF8() to char* (#1294)
bpo-28769 changed PyUnicode_AsUTF8() return type from const char* tochar* in Python 3.7, but tm_zone field type of the tm structure ischar* on FreeBSD.Cast PyUnicode_AsUTF8() to char* in gettmarg() to fix the warning: Modules/timemodule.c:443:20: warning: assigning to 'char *' from 'const char *' discards qualifiers
bpo-29974: Improve typing.TYPE_CHECKING example (GH-982)
* Fix PEP 8 (SomeType instead of some_type)* Add a function parameter annotation* Explain, using wording from PEP 484 and PEP 526, why one annotation is in quotes and another is not.Suggested by Ivan Levkevskyi.
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271
)Builtin container types have two potential link targets in the docs:- their entry in the list of builtin callables- their type documentationThis change brings `bytes` and `bytearray` into line with othercontainer types by having cross-references default to linking totheir type documentation, rather than their builtin callable entry.
bpo-30107: Make SuppressCrashReport quiet on macOS (#1279)
On macOS, SuppressCrashReport now redirects /usr/bin/defaults commandstderr into a pipe to not pollute stderr. It fixes atest_io.test_daemon_threads_shutdown_stderr_deadlock() failure whenthe CrashReporter domain doesn't exists. Message logged into stderr:2017-04-24 16:57:21.432 defaults[41046:2462851]The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926)
bpo-28851: Improve namedtuple documentation (GH-1274)
Clarify that a sequence of strings is the preferred value for 'field_names'.
bpo-30132: distutils test_build_ext() uses temp_cwd() (#1278)
test_build_ext() of test_distutils now uses support.temp_cwd() toprevent the creation of a pdb file in the current working directoryon Windows.
tmtotuple(): use time_t for gmtoff (#1276)
timegm() return type is time_t, not int. Use time_t to prevent thefollowing compiler warning on Windows:timemodule.c: warning C4244: '=': conversion from 'time_t' to 'int', possible loss of data
bpo-30131: Cleanup threads in test_logging (#1275)
* Use @support.reap_threads on unit tests creating threads* Call TestCase.fail() on thread.join(timeout) failure
bpo-29822: Make inspect.isabstract() work during __init_subclass__. (#…
…678)At the time when an abstract base class' __init_subclass__ runs,ABCMeta.__new__ has not yet finished running, so in the presence of__init_subclass__, inspect.isabstract() can no longer depend only onTPFLAGS_IS_ABSTRACT.
bpo-30144: Import collections ABC from collections.abc rather than co…
…llections. (#1263)
Remove outdated note about constraining of the bit shift right operan…
…d. (#1258)The constrain was removed in bpo-29816.
Remove unneeded Misc/NEWS entry for bpo-29802. (#1251)
The bug was added in still not released version.
bpo-29960 _random.Random corrupted on exception in setstate(). (#1019)
bpo-29867: Add asserts in PyTuple_GET_SIZE, PyList_GET_SIZE and PySet…
…_GET_SIZE. (#751)
bpo-30125: disable faulthandler in ctypes test_SEH (#1237)
Disable faulthandler to run test_SEH() of test_ctypes to prevent thefollowing log with a traceback: Windows fatal exception: access violationAdd support.disable_faulthandler() context manager.