Replace, fork or copy sharedmock

Đang mở
#549 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
45/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
Lĩnh vực
testing

Hướng nghiên cứu

Start with the dependency entry in requirements/local.in and its use in documentcloud/common/serverless/tests/test_error_handling.py. Inspect how sharedmock supports mocks across process boundaries, then compare the options in the issue: fork it, bring the helpers into the codebase, or find a replacement. Done means those tests no longer depend on the unmaintained third-party repository and still cover the expected behavior.

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

Mô tả

dependencies

sharedmock is installed from a third-party git repo (elritsch/python-sharedmock) that hasn't been updated since 2017.
https://github.com/MuckRock/documentcloud/blob/fe9be7f12d525eb90defbe7035a4bcd45aa2b6a1/requirements/local.in#L15

In my PR to get us to python 3.15, I've pinned it to a specific commit to keep the expected behavior in case a commit gets pushed down the road which breaks expected behavior out from underneath us as it is currently unpinned on master.
https://github.com/elritsch/python-sharedmock@f12c7beb770bc67cccd52a25631e2ceee462a34a#egg=sharedmock

I avoided the PyPi distributed sharedmock because although the author is listed as Elmar Ritsch, it was packaged by other developers who don't have a ton of history on PyPi: https://pypi.org/project/sharedmock/. It's also out of date.

sharedmock is only used in documentcloud/common/serverless/tests/test_error_handling.py, for mocks that work across process boundaries. I'm not sure how to fix this, so I've left it for follow up cleanup.

If we absolutely need it, we can fork it or if it's small enough we can include the helpers in the code base..otherwise look for a replacement.

This is good cleanup follow up after the Python upgrade.

Ngôn ngữ chính
Python
Star
55
Fork
10
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
13

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 MuckRock/documentcloud

Tất cả issue của MuckRock/documentcloud

Issue tương tự

Thêm issue về Python

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.