diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f4c60b4b3..3c71f7e860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,8 +88,6 @@ Unreleased changes template. `python_version` attribute is still used to specify the Python version. * (pypi) Updated versions of packages: `pip` to 24.3.1 and `packaging` to 24.2. -* (pypi) For pypi-generated targets, `*.pyi` files are included in the - `pyi_srcs` attribute instead of the `data` attribute. {#v1-1-0-deprecations} #### Deprecations diff --git a/python/private/pypi/whl_library_targets.bzl b/python/private/pypi/whl_library_targets.bzl index 461a75cac3..c390da2613 100644 --- a/python/private/pypi/whl_library_targets.bzl +++ b/python/private/pypi/whl_library_targets.bzl @@ -222,11 +222,13 @@ def whl_library_targets( ) if hasattr(rules, "py_library"): + # NOTE: pyi files should probably be excluded because they're carried + # by the pyi_srcs attribute. However, historical behavior included + # them in data and some tools currently rely on that. _data_exclude = [ "**/*.py", "**/*.pyc", "**/*.pyc.*", # During pyc creation, temp files named *.pyc.NNNN are created - "**/*.pyi", # RECORD is known to contain sha256 checksums of files which might include the checksums # of generated files produced when wheels are installed. The file is ignored to avoid # Bazel caching issues. diff --git a/tests/pypi/whl_library_targets/whl_library_targets_tests.bzl b/tests/pypi/whl_library_targets/whl_library_targets_tests.bzl index 5d10cf0a5a..ba04e1d887 100644 --- a/tests/pypi/whl_library_targets/whl_library_targets_tests.bzl +++ b/tests/pypi/whl_library_targets/whl_library_targets_tests.bzl @@ -252,7 +252,6 @@ def _test_whl_and_library_deps(env): "**/*.py", "**/*.pyc", "**/*.pyc.*", - "**/*.pyi", "**/*.dist-info/RECORD", ] + glob_excludes.version_dependent_exclusions(), ), @@ -325,7 +324,6 @@ def _test_group(env): "**/*.py", "**/*.pyc", "**/*.pyc.*", - "**/*.pyi", "**/*.dist-info/RECORD", ] + glob_excludes.version_dependent_exclusions(), ),