From d4f26e9b414b354dd2b84611219e04419521ebe2 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 4 Mar 2017 06:00:37 -0500 Subject: [PATCH 1/2] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. (#462) * bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS Skip some tests of select.poll when running on macOS due to unresolved issues with the underlying system poll function on some macOS versions. (cherry picked from commit de04644627f82d9dc48b3423def7ff5b4aa1926a) --- Lib/test/eintrdata/eintr_tester.py | 2 ++ Lib/test/test_asyncore.py | 3 +++ Misc/NEWS | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py index d194e775eaeb8f..c619b3d6c38a59 100644 --- a/Lib/test/eintrdata/eintr_tester.py +++ b/Lib/test/eintrdata/eintr_tester.py @@ -437,6 +437,8 @@ def test_select(self): self.stop_alarm() self.assertGreaterEqual(dt, self.sleep_time) + @unittest.skipIf(sys.platform == "darwin", + "poll may fail on macOS; see issue #28087") @unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll') def test_poll(self): poller = select.poll() diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 51c65737a441de..d05462b7efce35 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -661,6 +661,9 @@ def test_handle_expt(self): if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX: self.skipTest("Not applicable to AF_UNIX sockets.") + if sys.platform == "darwin" and self.use_poll: + self.skipTest("poll may fail on macOS; see issue #28087") + class TestClient(BaseClient): def handle_expt(self): self.socket.recv(1024, socket.MSG_OOB) diff --git a/Misc/NEWS b/Misc/NEWS index debadc1e54c141..32579f4d507bbb 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -109,6 +109,14 @@ Library - bpo-29532: Altering a kwarg dictionary passed to functools.partial() no longer affects a partial object after creation. +- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. + Skip some tests of select.poll when running on macOS due to unresolved + issues with the underlying system poll function on some macOS versions. + +- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag, + test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to + determine the candidate encoding for the test regex (allowing it to correctly + skip the test when the default locale encoding is a multi-byte encoding) - bpo-29110: Fix file object leak in aifc.open() when file is given as a filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. From 970753aaf8a0448efe361aac5e355d29467dc322 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 4 Mar 2017 06:07:51 -0500 Subject: [PATCH 2/2] Fix Misc/NEWS --- Misc/NEWS | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 32579f4d507bbb..9aee4974344e10 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -109,14 +109,6 @@ Library - bpo-29532: Altering a kwarg dictionary passed to functools.partial() no longer affects a partial object after creation. -- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. - Skip some tests of select.poll when running on macOS due to unresolved - issues with the underlying system poll function on some macOS versions. - -- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag, - test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to - determine the candidate encoding for the test regex (allowing it to correctly - skip the test when the default locale encoding is a multi-byte encoding) - bpo-29110: Fix file object leak in aifc.open() when file is given as a filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. @@ -269,6 +261,10 @@ Documentation Tests ----- +- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. + Skip some tests of select.poll when running on macOS due to unresolved + issues with the underlying system poll function on some macOS versions. + - Issue #29571: to match the behaviour of the ``re.LOCALE`` flag, test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to determine the candidate encoding for the test regex (allowing it to correctly