List of commits:
Subject Hash Author Date (UTC)
bpo-30131: test_logging now joins queue threads (#1298) 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf Victor Stinner 2017-04-26 13:56:25
timemodule.c: Cast PyUnicode_AsUTF8() to char* (#1294) 6e676954de7c4f3f06dd5b56842c9a2c931a1cab Victor Stinner 2017-04-26 11:51:48
bpo-29974: Improve typing.TYPE_CHECKING example (GH-982) 87c07fe9d908d0a2143fcc8369255c6ff3241503 Mathias Rav 2017-04-26 10:49:45
bpo-28698: Fix c_wchar_p doc example (GH-1160) 0d637e236d7099f7b724026c8cb7bd83d8e12e6b Louie Lu 2017-04-26 08:15:05
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) c6db4811f9ea3aeff0e1fafe1c60a22835ef359e csabella 2017-04-26 05:47:01
bpo-30107: Make SuppressCrashReport quiet on macOS (#1279) d819ad9832292d854e9710493ecdf959b69802e3 Victor Stinner 2017-04-25 22:55:08
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926) 08c16016e2a2d1368d001ddebfe9ca92465773c4 Jim Fasarakis-Hilliard 2017-04-25 18:26:36
bpo-28851: Improve namedtuple documentation (GH-1274) 97bf722fcd1de1236824377e052369dc7686b644 csabella 2017-04-25 16:14:45
bpo-29617: Remove Python 3.3 support from asyncio (GH-232) 3e2ad8ec61a322370a6fbdfb2209cf74546f5e08 INADA Naoki 2017-04-25 01:57:18
bpo-30132: distutils test_build_ext() uses temp_cwd() (#1278) f6448e5d65c349576df6e83b8324b9c208e77615 Victor Stinner 2017-04-25 00:11:09
tmtotuple(): use time_t for gmtoff (#1276) 0d659e5614cad512a1940125135b443b3eecb5d7 Victor Stinner 2017-04-24 23:22:42
bpo-30131: Cleanup threads in test_logging (#1275) 4bcfa3a2363c30d406c6826e291b30c33a649d18 Victor Stinner 2017-04-24 22:41:36
bpo-29822: Make inspect.isabstract() work during __init_subclass__. (#678) fcfe80ec2592fed8b3941c79056a8737abef7d3b Nate 2017-04-24 17:06:15
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263) 2e576f5aec1f8f23f07001e2eb3db9276851a4fc Serhiy Storchaka 2017-04-24 06:05:00
bpo-29751: add Cheryl Sabella to Misc/ACKS (GH-1268) 9eb5ca0774f94215be48442100c829db2484e146 Mariatta 2017-04-24 04:05:19
bpo-29751: Improve PyLong_FromString documentation (GH-915) 26896f2832324dde85cdd63d525571ca669f6f0b csabella 2017-04-24 03:54:08
bpo-15718: Document the upper bound constrain on the __len__ return value. (#1256) 85157cd89a6edac347a5b6871fcf20c500c6fbbf Serhiy Storchaka 2017-04-23 05:37:58
Remove outdated note about constraining of the bit shift right operand. (#1258) 997a4adea606069e01beac6269920709db3994d1 Serhiy Storchaka 2017-04-22 18:50:09
Fix trailing colon and newline in test.rst (#1250) 7fae81e1672d0b4110d31ea6a765b54f63a2e54b Louie Lu 2017-04-22 06:46:18
Remove unneeded Misc/NEWS entry for bpo-29802. (#1251) 7bfd740e3d484e6fdf3f5c2d4640450957f9d89c Serhiy Storchaka 2017-04-22 06:24:59
Commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf - bpo-30131: test_logging now joins queue threads (#1298)
QueueListenerTest of test_logging now closes the multiprocessing
Queue and joins its thread to prevent leaking dangling threads to
following tests.

Add also @support.reap_threads to detect earlier if a test leaks
threads (and try to "cleanup" these threads).
Author: Victor Stinner
Author date (UTC): 2017-04-26 13:56
Committer name: GitHub
Committer date (UTC): 2017-04-26 13:56
Parent(s): 6e676954de7c4f3f06dd5b56842c9a2c931a1cab
Signer:
Signing key:
Signing status: N
Tree: 69eac526d6e7846dc365809d8ee8225817935ce6
File Lines added Lines deleted
Lib/test/test_logging.py 8 0
File Lib/test/test_logging.py changed (mode: 100644) (index ca7a774d23..85c82251e9)
... ... if hasattr(logging.handlers, 'QueueListener'):
3184 3184 handler.close() handler.close()
3185 3185
3186 3186 @patch.object(logging.handlers.QueueListener, 'handle') @patch.object(logging.handlers.QueueListener, 'handle')
3187 @support.reap_threads
3187 3188 def test_handle_called_with_queue_queue(self, mock_handle): def test_handle_called_with_queue_queue(self, mock_handle):
3188 3189 for i in range(self.repeat): for i in range(self.repeat):
3189 3190 log_queue = queue.Queue() log_queue = queue.Queue()
 
... ... if hasattr(logging.handlers, 'QueueListener'):
3193 3194
3194 3195 @support.requires_multiprocessing_queue @support.requires_multiprocessing_queue
3195 3196 @patch.object(logging.handlers.QueueListener, 'handle') @patch.object(logging.handlers.QueueListener, 'handle')
3197 @support.reap_threads
3196 3198 def test_handle_called_with_mp_queue(self, mock_handle): def test_handle_called_with_mp_queue(self, mock_handle):
3197 3199 for i in range(self.repeat): for i in range(self.repeat):
3198 3200 log_queue = multiprocessing.Queue() log_queue = multiprocessing.Queue()
3199 3201 self.setup_and_log(log_queue, '%s_%s' % (self.id(), i)) self.setup_and_log(log_queue, '%s_%s' % (self.id(), i))
3202 log_queue.close()
3203 log_queue.join_thread()
3200 3204 self.assertEqual(mock_handle.call_count, 5 * self.repeat, self.assertEqual(mock_handle.call_count, 5 * self.repeat,
3201 3205 'correct number of handled log messages') 'correct number of handled log messages')
3202 3206
 
... ... if hasattr(logging.handlers, 'QueueListener'):
3209 3213 return [] return []
3210 3214
3211 3215 @support.requires_multiprocessing_queue @support.requires_multiprocessing_queue
3216 @support.reap_threads
3212 3217 def test_no_messages_in_queue_after_stop(self): def test_no_messages_in_queue_after_stop(self):
3213 3218 """ """
3214 3219 Five messages are logged then the QueueListener is stopped. This Five messages are logged then the QueueListener is stopped. This
 
... ... if hasattr(logging.handlers, 'QueueListener'):
3221 3226 self.setup_and_log(queue, '%s_%s' %(self.id(), i)) self.setup_and_log(queue, '%s_%s' %(self.id(), i))
3222 3227 # time.sleep(1) # time.sleep(1)
3223 3228 items = list(self.get_all_from_queue(queue)) items = list(self.get_all_from_queue(queue))
3229 queue.close()
3230 queue.join_thread()
3231
3224 3232 expected = [[], [logging.handlers.QueueListener._sentinel]] expected = [[], [logging.handlers.QueueListener._sentinel]]
3225 3233 self.assertIn(items, expected, self.assertIn(items, expected,
3226 3234 'Found unexpected messages in queue: %s' % ( 'Found unexpected messages in queue: %s' % (
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using git:
git clone git://git.rocketgit.com/user/benf_wspdigital/cpython

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main