fix: Windows compatibility issues #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Windows compatibility issues: SIGHUP signal and winsound dependency
Issues Fixed
1. SIGHUP Signal Compatibility
Problem: The application crashes on Windows systems with an
AttributeErrorwhen trying to register a handler forSIGHUP, which is a Unix/Linux-specific signal that doesn't exist on Windows.Solution: Added a conditional check using
hasattr(signal, 'SIGHUP')to only register theSIGHUPhandler on systems where it's available.2. winsound Dependency Issue
Problem:
winsoundis incorrectly listed in requirements.txt, causing installation failures on non-Windows systems with the error "ERROR: No matching distribution found for winsound".Solution: Remove
winsoundfrom requirements.txt since it's part of Python's standard library on Windows and shouldn't be listed as an external dependency.Changes
start_chat()function to check for SIGHUP availabilitySIGHUPsignalwinsoundfrom requirements.txt (standard library module on Windows)Testing
Impact