bazel-contrib / bazel-contrib/rules_python

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

オープン
#1,708 コメント 10 件 リアクション 1 件 担当者 0 名 GitHub で見る
type: pip
主要言語
Starlark
スター
688
フォーク
721
平均マージ
15時間 7分
マージ済み PR(30日)
76

説明

# 🐞 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?**

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

391-398行目にある、ドキュメント化された python_version 属性の周辺を python/private/bzlmod/pip.bzl で確認してください。python_version を指定せずに pip.parse() を使用する最小限の MODULE.bazel 呼び出しを再現し、その後、呼び出しが成功し、ドキュメントに記載されたデフォルトの Python バージョンを使用することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
50/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。