-
-
Notifications
You must be signed in to change notification settings - Fork 610
Comparing changes
Open a pull request
base repository: bazel-contrib/rules_python
base: main
head repository: bazel-contrib/rules_python
compare: release/1.4
- 11 commits
- 53 files changed
- 3 contributors
Commits on Apr 20, 2025
-
fix: load target_platforms through the hub (#2781)
This PR moves the parsing of `Requires-Dist` to the loading phase within the `whl_library_targets_from_requires` macro. The original `whl_library_targets` macro has been left unchanged so that I don't have to reinvent the unit tests - it is well covered under tests. Before this PR we had to wire the `target_platforms` via the `experimental_target_platforms` attr in the `whl_library`, which means that whenever this would change (e.g. the minor Python version changes), the wheel would be re-extracted even though the final result may be the same. This refactor uncovered that the dependency graph creation was incorrect if we had multiple target Python versions due to various heuristics that this had. In hindsight I had them to make the generated `BUILD.bazel` files more readable when the unit test coverage was not great. Now this is unnecessary and since everything is happening in Starlark I thought that having a simpler algorithm that does the right thing always is the best way. This also cleans up the code by removing left over TODO notes or code that no longer make sense. Work towards #260, #2319 (cherry picked from commit a19e1e4)
Configuration menu - View commit details
-
Copy full SHA for 079bea3 - Browse repository at this point
Copy the full SHA 079bea3View commit details
Commits on Apr 22, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 7dd901c - Browse repository at this point
Copy the full SHA 7dd901cView commit details -
fix: parsing metadata with inline licenses (#2806)
The wheel `METADATA` parsing implemented in 1.4 missed the fact that whitespace is significant and sometimes License is included inline in the `METADATA` file itself. This change ensures that we stop parsing the `METADATA` file only on first completely empty line. Fixes #2796 --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com> (cherry picked from commit 1d69ad6)
Configuration menu - View commit details
-
Copy full SHA for f3fb481 - Browse repository at this point
Copy the full SHA f3fb481View commit details
Commits on Apr 24, 2025
-
fix: use the python micro version to parse whl metadata in bzlmod (#2793
) Add `<micro>` version to the target platform. Instead of `cpxy_os_cpu` the target platform string format becomes `cpxy.z_os_cpu`. This is a temporary measure until we get a better API for defining target platforms. Summary: - [x] test `select_whls` function needs to be tested to ensure that the whl selection is not impacted when we have the full version in the target platform. - [ ] `download_only` legacy whl code path in `bzlmod` needs further testing. - [x] test `whl_config_setting` handling and config setting creation. The config settings in the hub repo should not use the full version, because from the outside, the whl is compatible with all `micro` versions of a given `3.<minor_version>` of the Python interpreter. This means that the already documented config setting do not need to be changed. - [x] `pep508_deps` tests for handling the `full_python_version` correctly. - [x] `pep508_deps` tests for ensuring the `default_abi` is being handled correctly. Fixes #2319 (cherry picked from commit 1e21dbd)
Configuration menu - View commit details
-
Copy full SHA for be79b5e - Browse repository at this point
Copy the full SHA be79b5eView commit details -
fix(pypi): call python --version before marker eval (#2819)
`bzlmod` has the full python version information statically and we don't need to call Python to get its version, but for `WORKSPACE` that is not the case and we have to call it before evaluating the markers in universal requirements files. This also fixes transitions in the `compile_pip_requirements` macro where the `.update` target would not transition correctly based on the `python_version` parameter. Fixes #2818 (cherry picked from commit ee34409)
Configuration menu - View commit details
-
Copy full SHA for 5605215 - Browse repository at this point
Copy the full SHA 5605215View commit details -
chore: remove a stray file (#2795)
Remove a stray file (cherry picked from commit c981569)
Configuration menu - View commit details
-
Copy full SHA for 6a7ef8b - Browse repository at this point
Copy the full SHA 6a7ef8bView commit details
Commits on Apr 29, 2025
-
revert(pypi): bring back Python PEP508 code with tests (#2831)
This just adds the code back at the original state before the following PRs have been made to remove them: #2629, #2781. This has not been hooked up yet in `evaluate_markers` and `whl_library` yet and I'll need extra PRs to do that. No CHANGELOG entries for now, will be done once the integration is back. Work towards #2830 (cherry picked from commit 61c91fe)
Configuration menu - View commit details
-
Copy full SHA for 3209c66 - Browse repository at this point
Copy the full SHA 3209c66View commit details -
fix(pypi) backport python_full_version fix to Python (#2833)
Handling of `python_full_version` correctly has been fixed in the Starlark implementation in #2793 and in this PR I am backporting the changes to handle the full python version target platform strings so that we can have the same behaviour for now. At the same time I have simplified and got rid of the specialization handling in the Python algorithm just like I did in the starlark, which simplifies the tests and makes the algorithm more correct. Summary: * Handle `cp3x.y_os_arch` strings in the `platform.py` * Produce correct strings when the `micro_version` is unset. Note, that we use version `0` in evaluating but we use the default version in the config setting. This is to keep compatibility with the current behaviour when the target platform is not fully specified (which would be the case for WORKSPACE users). * Adjust the tests and the code to be more similar to the starlark impl. Work towards #2830 (cherry picked from commit 9e613d5)
Configuration menu - View commit details
-
Copy full SHA for 46ff357 - Browse repository at this point
Copy the full SHA 46ff357View commit details -
revert(pypi): use Python for marker eval and METADATA parsing (#2834)
Configuration menu - View commit details
-
Copy full SHA for 4dc0665 - Browse repository at this point
Copy the full SHA 4dc0665View commit details -
fix(pypi): handle more URL patterns for requirement sources (#2843)
Configuration menu - View commit details
-
Copy full SHA for f2b6747 - Browse repository at this point
Copy the full SHA f2b6747View commit details
Commits on May 8, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 4f5a693 - Browse repository at this point
Copy the full SHA 4f5a693View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...release/1.4