Use glob patterns in native import whitelists#58
Conversation
… 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.
There was a problem hiding this comment.
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": { | |||
There was a problem hiding this comment.
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.
| "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": { |
There was a problem hiding this comment.
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.
| "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.
Summary
charset_normalizer,rpy2_rinterface, andnumbaacross all 26 whitelist filesrpy2_rinterfaceentries (3.6.3 + 3.6.4) into singlerpy2_rinterface-3.*.whlglobnumbamacOS arm64 pattern frommacosx_11_0tomacosx_*to match new wheel targetingmacosx_12_0scipy-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