bpo-40280: select: Use NULL for empty fdset (GH-31865)#31865
Merged
tiran merged 1 commit intopython:mainfrom Mar 14, 2022
Merged
bpo-40280: select: Use NULL for empty fdset (GH-31865)#31865tiran merged 1 commit intopython:mainfrom
tiran merged 1 commit intopython:mainfrom
Conversation
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. Signed-off-by: Christian Heimes <christian@python.org>
Member
Author
|
https://man7.org/linux/man-pages/man2/select.2.html
|
asvetlov
approved these changes
Mar 14, 2022
Member
|
Post-merge review: LGTM :-) If tomorrow we discover a platform which really requires a non-NULL pointer, we can fix that platform but keep the new behavior on most platforms. IMO passing NULL is perfectly fine. |
carljm
pushed a commit
to carljm/cpython
that referenced
this pull request
Mar 14, 2022
* main: (94 commits) Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (pythonGH-31820)" (pythonGH-31879) bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (pythonGH-31548) git ignore Lib/site-packages (pythonGH-31862) bpo-31415: importtime was made by Inada Naoki (pythonGH-31875) bpo-46920: Remove code that has explainers why it was disabled (pythonGH-31813) bpo-46920: Remove disabled debug code added decades ago and likely unnecessary (pythonGH-31812) bpo-46920: Remove code that has no explainer why it was disabled (pythonGH-31814) bpo-46906: Mention native endian in PyFloat_Pack8() doc (pythonGH-31866) bpo-40280: select: Use NULL for empty fdset (pythonGH-31865) CI: Fix patchcheck (pythonGH-31708) bpo-46987: Remove _PySys_GetObjectId / _PySys_GetObjectId (pythonGH-31835) bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API (pythonGH-31837) bpo-39829: Fix `__len__()` is called twice in list() constructor (pythonGH-31816) bpo-47003: Cleanup _overlapped module (pythonGH-31848) bpo-47004: Sync with importlib_metadata 4.11.3. (python#31854) bpo-46986: Upgrade bundled setuptools to 60.9.3 (pythonGH-31820) bpo-46985: Upgrade bundled pip to 22.0.4 (pythonGH-31819) bpo-46805: Add low level UDP socket functions to asyncio (pythonGH-31455) bpo-46995: Deprecate missing asyncio.Task.set_name() for third-party task implementations (pythonGH-31838) bpo-43215: Document Happy Eyeballs args of asyncio.open_connection (pythonGH-24525) ...
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue40280