bazel-contrib / bazel-contrib/rules_python

`pip.parse(python_version=)` should not be mandatory

Đang mở
#1,708 10 bình luận 1 reaction 0 người được giao Xem trên GitHub
type: pip
Ngôn ngữ chính
Starlark
Star
688
Fork
721
Merge trung bình
15 giờ 7 phút
Pull request đã merge (30 ngày)
76

Mô tả

# 🐞 bug report

### Affected Rule

Bzlmod `pip.parse()`

### Is this a regression?

Yes, was not a problem in WORKSPACE.

### Description

The arg documentation says the following:
https://github.com/bazelbuild/rules_python/blob/711186f144af06b431bd416b2d742874de3a2dea/python/private/bzlmod/pip.bzl#L391-L398

It specifically describes `If not specified, then the default Python version (as set by the root module or rules_python) will be used`. So this attribute should be optional but currently is mandatory.

## 🔬 Minimal Reproduction

`pip.parse()` without `python_version`.

## 🔥 Exception or Error

```
ERROR: in tag at /MODULE.bazel:42:10, mandatory attribute python_version isn't being specified
```

## 🌍 Your Environment

**Operating System:**

  

Linux

**Output of `bazel version`:**

  

2024/01/19 15:28:42 Warning: used fallback version "6.3.2"
Bazelisk version: v1.19.0
INFO: Running bazel wrapper (see //tools/bazel for details), bazel version 6.1.2 will be used instead of system-wide bazel installation.
Build label: 6.1.2
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 18 15:29:54 2023 (1681831794)
Build timestamp: 1681831794
Build timestamp as int: 1681831794

**Rules_python version:**

  

0.27.1

**Anything else relevant?**

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

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

Hướng nghiên cứu

Đọc python/private/bzlmod/pip.bzl quanh thuộc tính python_version được ghi nhận trong tài liệu ở các dòng 391-398. Tái tạo lệnh gọi MODULE.bazel tối thiểu sử dụng pip.parse() mà không có python_version, sau đó xác minh rằng lệnh gọi thành công và sử dụng phiên bản Python mặc định được ghi nhận trong tài liệu.

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
build-system
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
50/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.