MAINT: remove undocumented __buffer__ attribute lookup#13049
MAINT: remove undocumented __buffer__ attribute lookup#13049charris merged 1 commit intonumpy:masterfrom
Conversation
|
It seems very reasonable to remove it; I guess a check on the mailing list is a good idea, just in case. |
|
Should probably put something in the release notes too, maybe in |
doc/release/1.17.0-notes.rst
Outdated
There was a problem hiding this comment.
@charris is this appropriate? Should it be in a different section?
There was a problem hiding this comment.
I would put it in the Compatibility notes section and just say that it was non-functional and removed. We don't expect anyone to notice in practice, but if they do, there it is.
c8dd886 to
acecd26
Compare
|
In it goes. Thanks Matti. |
If a python-level class defined the
__buffer__attribute,frombuffer(buf, ...)would assume it returns the instance as a buffer. This was undocumented and flaky: if the__buffer__attribute was a method it would not be called. I tried to search for where this was ever used and got back to the originalnumericcode, where once it was a method to be called, but elsewhere an attribute. This second use was preserved until today.Since it is undocumented I do not think we need a deprecation cycle. Should this hit the mailing list?