aio-libs / aio-libs/aiohttp

Expose `_RequestOptions` as a public member

Đang mở
#11,385 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

### Is your feature request related to a problem?

I'd like to add type annotations for functions that accept keyword arguments that are passed to the `ClientSession.request` method. aiohttp has a TypedDict for this already, `_Requestoptions` but it's a protected member of the aiohttp.client module (has a leading underscore and is not declared in `__all__`).

### Describe the solution you'd like

Remove the underscore for `_RequestOptions` and add it to the `__all__` list, or create a version of the typed dict that includes the kwargs that are part of the documented API.

### Describe alternatives you've considered

There's probably a good reason why it's private, but I didn't see a GitHub issue that addressed that question. If There's a good reason, document the answer here.

### Related component

Client

### Additional context

_No response_

### Code of Conduct

- [x] I agree to follow the aio-libs Code of Conduct

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

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

Đánh giá

Issue này chưa được đánh giá.

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.