cpython/Lib/test/support
Miss Islington (bot) 666a484d29
[3.11] gh-109981: Fix support.fd_count() on macOS 14 (GH-112797) (#112825)
gh-109981: Fix support.fd_count() on macOS 14 (GH-112797)

Use scanning "/dev/fd/" on macOS in support.fd_count(). That's both more efficient than scanning all possible file descriptors, and avoids crashing the interpreter when there are open "guarded" file descriptors.

"Guarded" file descriptors are a macOS feature where file descriptors used by system libraries are marked and cause hard crashes when used by "user" code.

(cherry picked from commit 953ee622b3)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-07 11:28:54 +01:00
..
__init__.py [3.11] gh-111881: Use lazy import in test.support (#111885) (#111890) (#111902) 2023-11-09 16:46:27 +00:00
bytecode_helper.py
hashlib_helper.py
import_helper.py [3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626) (#109718) 2023-09-22 12:34:46 +02:00
interpreters.py
logging_helper.py
os_helper.py [3.11] gh-109981: Fix support.fd_count() on macOS 14 (GH-112797) (#112825) 2023-12-07 11:28:54 +01:00
pty_helper.py [3.11] gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826) (GH-112025) 2023-11-14 13:25:38 +01:00
script_helper.py
socket_helper.py [3.11] gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) (#109042) 2023-09-07 00:34:16 +00:00
threading_helper.py [3.11] gh-111644: Fix support threading_cleanup() (GH-111714) (#111717) 2023-11-04 00:43:53 +00:00
warnings_helper.py gh-103109: Document ignore_warnings() test support helper (GH-103110) 2023-04-02 15:42:43 -07:00