bpo-40280: select: Use NULL for empty fdset (GH-31865)

wasm32-emscripten does not support exceptfds and requires NULL. Python
now passes NULL instead of a fdset pointer when the input list is empty.
This works fine on all platforms and might even be a tiny bit faster.
This commit is contained in:
Christian Heimes 2022-03-14 15:40:28 +02:00 committed by GitHub
parent 23abae621f
commit f00ced8396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -46,7 +46,7 @@ class SelectTestCase(unittest.TestCase):
self.assertIsNot(r, x)
self.assertIsNot(w, x)
@unittest.skipUnless(hasattr(os, 'popen'), "need os.popen()")
@support.requires_fork()
def test_select(self):
code = textwrap.dedent('''
import time