Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain why our MacOS 14 runners failed with CPython 3.13.1 #3171

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/trio/_tests/test_highlevel_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
from collections.abc import Sequence


@pytest.mark.xfail(
sys.platform == "darwin" and sys.version_info[:3] == (3, 13, 1),
reason="TODO: This started failing in CI after 3.13.1",
raises=OSError,
strict=True,
)
async def test_SocketStream_basics() -> None:
# stdlib socket bad (even if connected)
stdlib_a, stdlib_b = stdlib_socket.socketpair()
Expand Down
15 changes: 8 additions & 7 deletions src/trio/_tests/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,6 @@ async def test_SocketType_basics() -> None:
sock.close()


@pytest.mark.xfail(
sys.platform == "darwin" and sys.version_info[:3] == (3, 13, 1),
reason="TODO: This started failing in CI after 3.13.1",
raises=OSError,
strict=True,
)
async def test_SocketType_setsockopt() -> None:
sock = tsocket.socket()
with sock as _:
Expand All @@ -473,7 +467,14 @@ def setsockopt_tests(sock: SocketType | SocketStream) -> None:
# specifying optlen. Not supported on pypy, and I couldn't find
# valid calls on darwin or win32.
if hasattr(tsocket, "SO_BINDTODEVICE"):
sock.setsockopt(tsocket.SOL_SOCKET, tsocket.SO_BINDTODEVICE, None, 0)
try:
sock.setsockopt(tsocket.SOL_SOCKET, tsocket.SO_BINDTODEVICE, None, 0)
except OSError as e:
# some versions of Python have the attribute yet can run on platforms
# that do not support it. For instance, MacOS 15 gained support for
# SO_BINDTODEVICE and CPython 3.13.1 was built on it (presumably), but
# our CI runners ran MacOS 14 and so failed.
assert e.errno == 42 # noqa: PT017

# specifying value
sock.setsockopt(tsocket.IPPROTO_TCP, tsocket.TCP_NODELAY, False)
Expand Down
Loading