-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
BUG: Fix ob_shash deprecation warning on Python 3.11 #21317
Copy link
Copy link
Closed
Labels
Description
Describe the issue:
ob_shash is deprecated on Python 3.11:
numpy/core/src/multiarray/scalarapi.c:709:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]
This looks unnecessary 🤔, cached hash value for obj should not be computed yet:
numpy/numpy/core/src/multiarray/scalarapi.c
Line 709 in 28e624d
((PyBytesObject *)obj)->ob_shash = -1;
Reproduce the code example:
Run tests on Python 3.11.Error message:
numpy/core/src/multiarray/scalarapi.c:709:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]NumPy/Python version information:
1.23.0.dev0+1020.g08569fcf0 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0]
Reactions are currently unavailable