bazel-contrib / bazel-contrib/rules_python
`pip.parse(python_version=)` should not be mandatory
- Lenguaje dominante
- Starlark
- Estrellas
- 688
- Forks
- 721
- Merge medio
- 15 h 7 min
- PR fusionados (30 d)
- 76
Descripción
# 🐞 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?**
Guía de contribución
Línea de trabajo
Lee python/private/bzlmod/pip.bzl alrededor del atributo python_version documentado en las líneas 391-398. Reproduce la llamada mínima de MODULE.bazel usando pip.parse() sin python_version y, a continuación, verifica que la llamada se realiza correctamente y utiliza la versión de Python predeterminada documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 50/100