feat: add Windows compatibility for uvloop dependency (#155)

Fixes chainstacklabs/pumpfun-bonkfun-bot#152

Changes:
- Make uvloop optional with platform-specific markers (Unix only)
- Add winloop as Windows alternative for performance optimization
- Update code to gracefully fall back to standard asyncio when event loop
  libraries are unavailable
- Both bot_runner.py and universal_trader.py now detect platform and use
  appropriate event loop implementation

This resolves the blocking installation issue for Windows users while
maintaining performance benefits on all platforms. Windows users can now
install and run the bot with winloop for improved performance, or use
standard asyncio as fallback.

Related: https://github.com/smypmsa/gh-triage-reports/blob/main/issues/chainstacklabs-pumpfun-bonkfun-bot/issue-152-2026-02-08.md

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Anton Sauchyk
2026-02-09 13:58:24 +01:00
committed by GitHub
parent 9d93d859a8
commit 31955103dc
4 changed files with 67 additions and 7 deletions
+2 -1
View File
@@ -19,7 +19,8 @@ dependencies = [
"grpcio-tools>=1.71.0",
"protobuf>=5.29.4",
"pyyaml>=6.0.2",
"uvloop>=0.21.0",
"uvloop>=0.21.0; sys_platform != 'win32'",
"winloop>=0.1.0; sys_platform == 'win32'",
]
[project.optional-dependencies]