Skip to content

Use glob patterns in native import whitelists#58

Merged
julenmendieta merged 2 commits intomainfrom
fix/use-glob-patterns-in-whitelists
Apr 10, 2026
Merged

Use glob patterns in native import whitelists#58
julenmendieta merged 2 commits intomainfrom
fix/use-glob-patterns-in-whitelists

Conversation

@blackcat
Copy link
Copy Markdown

@blackcat blackcat commented Apr 9, 2026

Summary

  • Replace exact version strings with glob patterns for charset_normalizer, rpy2_rinterface, and numba across all 26 whitelist files
  • Merges duplicate rpy2_rinterface entries (3.6.3 + 3.6.4) into single rpy2_rinterface-3.*.whl glob
  • Broadens numba macOS arm64 pattern from macosx_11_0 to macosx_* to match new wheel targeting macosx_12_0
  • Follows the approach already used for scipy-1.*.whl, numba-0.*-win_amd64.whl, etc.

Fixes native import checker failures caused by dependency version bumps (charset_normalizer 3.4.5→3.4.7, rpy2 3.6.4→3.6.6, numba macosx_11→macosx_12).

Test plan

  • CI prebuild jobs pass on all platforms (linux-x64, linux-aarch64, macosx-x64, macosx-aarch64, windows-x64)
  • No new "unused whitelist entries" warnings

… breakage

charset_normalizer, rpy2_rinterface, and numba whitelists used exact version
strings that broke on every patch bump. Replaced with glob patterns matching
the approach already used for scipy, numba (linux/windows), and torch.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces specific wheel filenames with glob patterns across multiple package whitelist files for charset_normalizer, numba, and rpy2_rinterface. The review feedback highlights that the proposed glob patterns are overly broad and lose essential platform and Python version specificity, which could result in incorrect whitelisting. It is recommended to refine these patterns to be more specific while maintaining version flexibility.

@@ -1,5 +1,5 @@
{
"charset_normalizer-3.4.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": {
"charset_normalizer-3.*.whl": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The glob pattern charset_normalizer-3.*.whl is very broad and loses platform and Python version specificity. While this may work with the current CI setup, it's less robust and could lead to incorrect whitelisting if wheels for other platforms or Python versions are present in the test environment. It would be safer to use a more specific pattern that retains this information.

For example, for this linux-x64 whitelist, a better pattern would be:
"charset_normalizer-3.*-cp312-*-manylinux*x86_64*.whl"

This comment applies to all similar changes for charset_normalizer across all whitelist files in this PR.

Suggested change
"charset_normalizer-3.*.whl": {
"charset_normalizer-3.*-cp312-*-manylinux*x86_64*.whl": {

"scipy.stats._unuran.unuran_wrapper": "module 'numpy.random.bit_generator' has no attribute 'SeedlessSequence'"
},
"rpy2_rinterface-3.6.4-cp312-cp312-win_amd64.whl": {
"rpy2_rinterface-3.*.whl": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the charset_normalizer changes, this glob pattern rpy2_rinterface-3.*.whl is too broad. It loses platform and Python version specificity, which can make the whitelist fragile.

Please use a more specific pattern that includes platform and Python version information, for example:
"rpy2_rinterface-3.*-cp312-*-win_amd64.whl"

This feedback applies to all rpy2_rinterface glob changes in this pull request.

Suggested change
"rpy2_rinterface-3.*.whl": {
"rpy2_rinterface-3.*-cp312-*-win_amd64.whl": {

Replace version-pinned tensorflow wheel names with tensorflow-2.*.whl
globs across python-3.12.10 and python-3.12.10-sccoda whitelists.
Merges duplicate entries (2.19.0 + 2.19.1) in linux-x64 into single glob.

Fixes tensorflow 2.20→2.21 version bump causing checker failures.
@julenmendieta julenmendieta merged commit 32e030b into main Apr 10, 2026
73 of 76 checks passed
@julenmendieta julenmendieta deleted the fix/use-glob-patterns-in-whitelists branch April 10, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants