python / python/cpython

Simplify Windows write I/O around consoles on Windows 8+

Đang mở
#121,940 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

OS-windows topic-IO type-feature
Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

Feature or enhancement

Proposal:

In bpo-11395 from 2011, Windows Python needed to check on every write if a write was to a tty / console object and limit the size of the write to avoid an OS error on write. With Windows 8 and above, the Windows subsystem has been updated and this check is no longer necessary. It is also not necessary to split the write into smaller pieces (which resulted in gh-110913 and gh-82052).

Based on PEP 11, the last Windows 8 support ended in 2023, so the isatty + limited write size is no longer needed on any currently supported Windows platform (Pipes are still limited write size).

That large writes work is tested in test_os, test_write_windows_console

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

https://github.com/python/cpython/issues/55604#issuecomment-1093537612

Linked PRs
  • gh-121941

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với phần bao phủ việc ghi vào console Windows trong test_os và test_write_windows_console, sau đó lần theo đường dẫn ghi Windows liên quan. Thay đổi được hoàn tất khi việc ghi vào console không còn yêu cầu các kiểm tra lỗi thời hoặc việc chia nhỏ trên các phiên bản Windows được hỗ trợ, các giới hạn ghi vào pipe vẫn được giữ nguyên và các bài kiểm thử ghi dữ liệu lớn hiện có đều vượt qua.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
operating-systems
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.