Skip to content

Tags: clawdney/rules_python

Tags

1.9.0

Toggle 1.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(pypi): make whl_library reproducible under pipstar (bazel-contri…

…b#3589) (bazel-contrib#3632)

This is testing the new API to make use of remote caching mechanisms.

Needs: bazelbuild/bazel#27634

---------

(cherry picked from commit 06aa36d)

Co-authored-by: Ignas Anikevicius <[email protected]>

1.9.0-rc1

Toggle 1.9.0-rc1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(pypi): make whl_library reproducible under pipstar (bazel-contri…

…b#3589) (bazel-contrib#3632)

This is testing the new API to make use of remote caching mechanisms.

Needs: bazelbuild/bazel#27634

---------

(cherry picked from commit 06aa36d)

Co-authored-by: Ignas Anikevicius <[email protected]>

1.9.0-rc0

Toggle 1.9.0-rc0's commit message
chore: repleace version marker in features.bzl

(cherry picked from commit 3ddb601)

1.8.5

Toggle 1.8.5's commit message
fix(pypi): normalize extras in requirement strings per PEP 685 (bazel…

…-contrib#3588)

## Summary

Extras parsed from requirement strings (e.g., from `requirements.txt`)
were not being normalized, causing mismatches when evaluating PEP 508
marker expressions. For example, `sqlalchemy[postgresql-psycopg2binary]`
would fail to resolve `psycopg2-binary` as a transitive dependency
because the wheel METADATA marker expression `extra ==
"postgresql_psycopg2binary"` uses the underscore-normalized form (per
PEP 685), while the extras set retained the original hyphenated form
from the requirement string.

## Before

```
# requirements.txt
sqlalchemy[postgresql-psycopg2binary]==2.0.36

# Parsed extras: ["postgresql-psycopg2binary"]
# Marker evaluation: "postgresql-psycopg2binary" != "postgresql_psycopg2binary" -> MISS
# Result: psycopg2-binary NOT included as a dependency
```

## After

```
# requirements.txt
sqlalchemy[postgresql-psycopg2binary]==2.0.36

# Parsed extras: ["postgresql_psycopg2binary"]  (normalized)
# Marker evaluation: "postgresql_psycopg2binary" == "postgresql_psycopg2binary" -> MATCH
# Result: psycopg2-binary correctly included as a dependency
```

## Changes

- **`python/private/pypi/pep508_requirement.bzl`**: Apply
`normalize_name()` to each extra during requirement parsing, consistent
with how the package name is already normalized.
- **`tests/pypi/pep508/requirement_tests.bzl`**: Updated existing test
expectation for case normalization and added test case for hyphenated
extras
(`sqlalchemy[asyncio,postgresql-psycopg2binary,postgresql-asyncpg]`).
- **`tests/pypi/pep508/deps_tests.bzl`**: Added
`test_extras_with_hyphens_are_normalized` integration test confirming
that dependencies gated behind hyphenated extras are correctly resolved.
- **`CHANGELOG.md`**: Added entry under Unreleased > Fixed.

Fixes bazel-contrib#3587

---------

Co-authored-by: Ignas Anikevicius <[email protected]>
(cherry picked from commit 9fe42b1)

1.8.4

Toggle 1.8.4's commit message
fix(pipstar): handle a corner case for compatible version evaluation (b…

…azel-contrib#3583)

It seems that there was one corner case that was left unhandled.
In theory we should also handle `3 ~= 3.0.0`, but the fix for that may
be a little more involved and I want to leave it for later. However,
that case is unlikely to occur in reality because `LHS` for our cases
will most likely have 2 components.

Whilst at it prepare for the patch release (bazel-contrib#3584).

Fixes bazel-contrib#3580

(cherry picked from commit a32c744)

1.8.3

Toggle 1.8.3's commit message
fix(pip): simply extract whl contents to the current directory (bazel…

…-contrib#3549)

Before we would try to get the whl path and extract to the sibling
directory. Whilst this is not failing right now, technically this is not
the best behaviour because the whl itself may come from elsewhere. This
PR is simplifying code to see if it helps solve an issue on Windows.

Fixes bazel-contrib#3543

(cherry picked from commit abe2699)

1.8.2

Toggle 1.8.2's commit message
fix: explicitly symlink all .so files, not just ones with lib prefix (b…

…azel-contrib#3538)

Some packages, such as tensorflow, have regular C libraries that don't
use
a `lib*` suffix. The symlink optimization logic wouldn't link these
directly,
which made the dynamic linker unable to find their dependencies.

To fix, explicitly symlink all `.so` files, since we can't determine
which
are Python C modules and regular C libraries.

Fixes bazel-contrib#3529

(cherry picked from commit b4ec825)

1.8.1

Toggle 1.8.1's commit message
fix(pipstar): correctly handle complex self deps (bazel-contrib#3527)

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 bazel-contrib#3524

---------

Co-authored-by: Richard Levasseur <[email protected]>
(cherry picked from commit c52aeaa)

1.8.0

Toggle 1.8.0's commit message
fix(pipstar): Handle dep appearing in extra both conditionally and un…

…conditionally (bazel-contrib#3513)

Fixes bazel-contrib#3511

(cherry picked from commit 5fe50fb)

1.8.0-rc4

Toggle 1.8.0-rc4's commit message
fix(pipstar): Handle dep appearing in extra both conditionally and un…

…conditionally (bazel-contrib#3513)

Fixes bazel-contrib#3511

(cherry picked from commit 5fe50fb)