From 4cb249a4344ebf56bd3a1b6c0a6c83debea3548c Mon Sep 17 00:00:00 2001 From: Misha Zharov <8266317+mishazharov@users.noreply.github.com> Date: Thu, 30 Nov 2023 08:26:01 -0800 Subject: [PATCH] docs(pip_parse): Update docs about `experimental_requirement_cycles` (#1588) This PR updates the docs for https://github.com/bazelbuild/rules_python/pull/1166 since there were some inconsistencies about the naming (`experimental_requirement_cycles` vs `requirement_cycles`). Also moved the entry in the changelog from `0.27` to `Unreleased` since it missed `0.27`. Can't wait for this feature to land! --- CHANGELOG.md | 11 ++++++----- docs/sphinx/pypi-dependencies.md | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96b86707d8..04e3beb6cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ A brief description of the categories of changes: rules_python Starlark implementation, not the one built into Bazel. NOTE: This only applies to Bazel 6+; Bazel 5 still uses the builtin implementation. +* (pip_parse) The parameter `experimental_requirement_cycles` may be provided a + map of names to lists of requirements which form a dependency + cycle. `pip_parse` will break the cycle for you transparently. This behavior + is also available under bzlmod as + `pip.parse(experimental_requirement_cycles={})`. + [0.XX.0]: https://github.com/bazelbuild/rules_python/releases/tag/0.XX.0 ## [0.27.0] - 2023-11-16 @@ -59,11 +65,6 @@ A brief description of the categories of changes: `data`. Note, that the `@pypi_foo//:pkg` labels are still present for backwards compatibility. -* (pip_parse) The parameter `requirement_cycles` may be provided a map of names - to lists of requirements which form a dependency cycle. `pip_parse` will break - the cycle for you transparently. This behavior is also available under bzlmod - as `pip.parse(requirement_cycles={})`. - * (gazelle) The flag `use_pip_repository_aliases` is now set to `True` by default, which will cause `gazelle` to change third-party dependency labels from `@pip_foo//:pkg` to `@pip//foo` by default. diff --git a/docs/sphinx/pypi-dependencies.md b/docs/sphinx/pypi-dependencies.md index ab3260988c..598aadebd7 100644 --- a/docs/sphinx/pypi-dependencies.md +++ b/docs/sphinx/pypi-dependencies.md @@ -161,14 +161,15 @@ ERROR: .../external/pypi_sphinxcontrib_serializinghtml/BUILD.bazel:44:6: in alia `-- @pypi_sphinxcontrib_serializinghtml//:pkg (...) ``` -The `requirement_cycles` argument allows you to work around these issues by -specifying groups of packages which form cycles. `pip_parse` will transparently -fix the cycles for you and provide the cyclic dependencies simultaneously. +The `experimental_requirement_cycles` argument allows you to work around these +issues by specifying groups of packages which form cycles. `pip_parse` will +transparently fix the cycles for you and provide the cyclic dependencies +simultaneously. ``` pip_parse( ... - requirement_cycles = { + experimental_requirement_cycles = { "sphinx": [ "sphinx", "sphinxcontrib-serializinghtml", @@ -185,7 +186,7 @@ be a part of the `airflow` cycle. For instance -- ``` pip_parse( ... - requirement_cycles = { + experimental_requirement_cycles = { "airflow": [ "apache-airflow", "apache-airflow-providers-common-sql",