Use one generic type for Rust data that becomes a Python object

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, rust
Lĩnh vực
databases

Hướng nghiên cứu

Start by finding the PendingRequestResult, PendingPage and PendingQueryTrace types and their separate IntoPyObject impls. Read how the GIL-bound conversion works, then design the Resolve trait and the generic Pending<T: Resolve> wrapper with one IntoPyObject impl. Done when the three types use the wrapper and the duplicate impls are gone, with tests still passing.

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

Mô tả

From the review of #234: https://github.com/scylladb/python-rs-driver/pull/234#discussion_r4273542277

Some types keep only Rust data. Later, with the GIL, they become a Python object. Examples: PendingRequestResult, PendingPage and PendingQueryTrace. Each type has its own IntoPyObject impl.

Make one generic type for this, like WithOriginalPyObject. For example: a Resolve trait and a Pending<T: Resolve> wrapper that implements IntoPyObject one time.

Ngôn ngữ chính
Rust
Star
6
Fork
8
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có 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.

Issue khác của scylladb/python-rs-driver

Tất cả issue của scylladb/python-rs-driver

Issue tương tự

Thêm issue về Rust

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.