Install & Compatibility
Where this runs
tested against v2.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.004s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.004s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DefaultSelector
✓ from selectors2 import DefaultSelector
✗ from selectors2 import DefaultSelector
Create a DefaultSelector and register a listening socket for read events.
import selectors2
import socket
sel = selectors2.DefaultSelector()
sock = socket.socket()
sock.bind(('localhost', 1234))
sock.listen()
sel.register(sock, selectors2.EVENT_READ)
while True:
events = sel.select(timeout=1)
for key, mask in events:
conn, addr = key.fileobj.accept()
print(f'Connection from {addr}')
Upgrade
Version history
2.0.2latest on PyPI · released Jul 21, 2020
Audit
Dependencies
No dependency data recorded yet.