Replace or slim the unmaintained pyautogui stack and its unused dependencies
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read autoclicker/core/click_engine.py, autoclicker/core/safety.py, and docs/PERFORMANCE.md to understand current input and safety behavior. The issue proposes lazy importing as a short-term change and replacing the dependency with a Win32 backend or maintained alternative as a longer-term plan. Start with the engine tests and real-input CI job; done means agreeing on the backend plan or replacement and meeting the listed import acceptance criterion.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
pyautogui (latest release 0.9.54) and its helpers (pygetwindow, mouseinfo, pymsgbox, pyrect, pyperclip) see little maintenance, and the app uses only a handful of input and pixel calls. Most of the transitive packages are dead weight in the exe and cost startup time.
Where
pyproject.toml:34requirements-lock.txt(pyautogui, pygetwindow, mouseinfo, pymsgbox, pyrect, pyperclip, pyscreeze, pytweening)autoclicker/core/click_engine.py:16(import pyautogui)autoclicker/core/safety.py
Details
The code already calls Win32 directly through pywin32 and ctypes (core/safety.py, core/screen.py). Importing pyautogui pulls in mouseinfo (which calls SetProcessDPIAware and GetDC(0) at import), pyscreeze and pyrect (which imports doctest). python -X importtime -c "import autoclicker.main" shows import pyautogui taking 0.5 to 1.1 s of a cold start.
Impact
Upstream fixes for new Python versions (CI tests 3.14) are unlikely, the bundled code widens the license surface, and every launch and headless run pays the import cost.
Suggested fix
Short term: exclude unused modules in the spec and import pyautogui lazily inside the click engine so the window appears first. Medium term: replace pyautogui with a thin ctypes SendInput/GetPixel wrapper (the deferred Win32 backend in docs/PERFORMANCE.md), reimplementing FAILSAFE semantics, with the engine tests and the real-input CI job as the safety net.
Acceptance criteria
- The click engine no longer imports pyautogui at module import
- Plan agreed for the SendInput backend, or a maintained replacement chosen
Getting started
- Relevant files:
autoclicker/core/click_engine.py,autoclicker/core/safety.py,docs/PERFORMANCE.md - How to run tests:
make check(Git Bash) ortasks.bat lint,tasks.bat typecheck,tasks.bat test(cmd). Single test:python -m pytest tests/test_x.py::TestClass::test_name --no-cov - Related docs:
CONTRIBUTING.md,docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 9968dc8. Severity: medium. Effort: L. audit-key: dependencies|pyproject.toml|pyautogui
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 2
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/autoclicker
-
maintenance priority: low
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 56/100
TMHSDigital/autoclicker#202 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug priority: low
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
TMHSDigital/autoclicker#201 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
marketing packaging priority: low
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
TMHSDigital/autoclicker#118 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
documentation marketing priority: medium
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
TMHSDigital/autoclicker#117 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
ci packaging priority: medium
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 47/100
TMHSDigital/autoclicker#91 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của TMHSDigital/autoclicker
Issue tương tự
-
hive size:simple
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
painted-porch/marcus#977 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FAIRmat-NFDI/sand#239 ·
Maintainer thường phản hồi trong vòng 1 ngày