fix(pipstar): correctly handle complex self deps by aignas · Pull Request #3527 · bazel-contrib/rules_python

@aignas

It seems that with the `pipstar` port there was a typo and the initial
tests that we had for Python were insufficient to catch such a
regression.

The second if statement where we loop through packages again had a `req`
instead of `req_` in the `if` statement and the test coverage was not
sufficient.

I have abstracted the if statement into a function to easier spot such
issues and added an extra test to ensure that a regression would be
actually caught. With this the Starlark test suite is now officially
more robust than the Python version.

Fixes #3524

gemini-code-assist[bot]

rickeylev

@rickeylev rickeylev deleted the aignas.fix.pipstar_etils_and_tensorflow_datasets branch

January 20, 2026 16:38

aignas added a commit that referenced this pull request

Jan 21, 2026
It seems that with the `pipstar` port there was a typo and the initial
tests that we had for Python were insufficient to catch such a
regression.

The second if statement where we loop through packages again had a `req`
instead of `req_` in the `if` statement and the test coverage was not
sufficient.

I have abstracted the if statement into a function to easier spot such
issues and added an extra test to ensure that a regression would be
actually caught. With this the Starlark test suite is now officially
more robust than the Python version.

Fixes #3524

---------

Co-authored-by: Richard Levasseur <richardlev@gmail.com>
(cherry picked from commit c52aeaa)