diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-08 13:18:44 -0700 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-16 17:21:44 -0700 |
commit | 81cfd4726c2d441406b3f7bd78716d664377fee2 (patch) | |
tree | d804ceeb99c5884e2f27179ab4e9ab3c74c6c209 /numpy/core/setup_common.py | |
parent | 88021a568cc13ef7325a52e22573f027a2be9df7 (diff) | |
download | numpy-81cfd4726c2d441406b3f7bd78716d664377fee2.tar.gz |
DEP: Speed up WarnOnWrite deprecation in buffer interface
When a buffer interface does not request a writeable buffer,
simply pass a read-only one when the warn on write flag is set.
This is to give an easier way forward with avoiding the deprecation
warnings: Simply do not ask for a writeable buffer.
It will break code that expects writeable buffers but does not
ask for them specifically a bit harder than would be nice.
But since such code probably should ask for it specifically, this
is likely fine (an RC release has to find out).
The main reason for this is, that this way it plays very will with
cython, which requests writeable buffers explicitly and if declared
`const` is happy about read-only (so that using `const` is the best
way to avoid the warning and makes code cleaner).
Closes gh-13929, gh-13974
Diffstat (limited to 'numpy/core/setup_common.py')
0 files changed, 0 insertions, 0 deletions