Skip to content

bug(spec-tools): make t8n daemon module importable on Windows#3212

Open
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/daemon-windows-import
Open

bug(spec-tools): make t8n daemon module importable on Windows#3212
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/daemon-windows-import

Conversation

@Kumarutkarsh9470

Copy link
Copy Markdown

daemon.py defined _UnixSocketHttpServer by subclassing socketserver.UnixStreamServer, which does not exist on Windows. Since ethereum_spec_tools.evm_tools imports this module at load time, importing the tooling (and therefore collecting the test suite) crashed on Windows with AttributeError.

Select the base class per platform so the module stays importable everywhere, and reject running the daemon on Windows with a clear error, as it inherently relies on Unix domain sockets. Add a regression test for the platform guard.

Description

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

`daemon.py` defined `_UnixSocketHttpServer` by subclassing
`socketserver.UnixStreamServer`, which does not exist on Windows. Since
`ethereum_spec_tools.evm_tools` imports this module at load time,
importing the tooling (and therefore collecting the test suite) crashed
on Windows with `AttributeError`.

Select the base class per platform so the module stays importable
everywhere, and reject running the daemon on Windows with a clear error,
as it inherently relies on Unix domain sockets. Add a regression test
for the platform guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant