Skip to content

More gating around the new Daemon for Windows compatability#3127

Open
ahopkins wants to merge 2 commits intomainfrom
windows-run-fix
Open

More gating around the new Daemon for Windows compatability#3127
ahopkins wants to merge 2 commits intomainfrom
windows-run-fix

Conversation

@ahopkins
Copy link
Member

@ahopkins ahopkins commented Jan 6, 2026

Fixes #3126

Copilot AI review requested due to automatic review settings January 6, 2026 21:17
@ahopkins ahopkins requested a review from a team as a code owner January 6, 2026 21:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Windows compatibility for the Sanic daemon functionality by adding proper import guards around Unix-specific modules and defensive attribute access.

  • Wrapped grp and pwd imports in a try-except block to handle platforms where these modules are unavailable
  • Added defensive getattr for the unix CLI argument which is only defined on non-Windows platforms
  • Bumped version from 25.12.0 to 25.12.1

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
sanic/worker/daemon.py Added try-except import guards for Unix-specific grp and pwd modules, following the pattern used for fcntl
sanic/cli/app.py Changed direct attribute access to getattr with default value for unix argument, which doesn't exist on Windows
sanic/version.py Version bump to 25.12.1 for this patch release

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.819%. Comparing base (785d77f) to head (282e1f2).

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #3127       +/-   ##
=============================================
+ Coverage   87.793%   87.819%   +0.026%     
=============================================
  Files          105       105               
  Lines         8143      8144        +1     
  Branches      1290      1290               
=============================================
+ Hits          7149      7152        +3     
+ Misses         687       686        -1     
+ Partials       307       306        -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicoddemus
Copy link
Contributor

Could you improve CI to catch this errors early, before a release?

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.

v25.12.0 no longer works on Windows

3 participants