Skip to content

Commit

Permalink
Merge pull request #3171 from A5rocks/remove-explained-xfails
Browse files Browse the repository at this point in the history
Explain why our MacOS 14 runners failed with CPython 3.13.1
  • Loading branch information
A5rocks authored Dec 25, 2024
2 parents 2d87c0e + e7e7c4a commit 8a28c55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
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

0 comments on commit 8a28c55

Please sign in to comment.