Commit 0c922ce
authored
Recognize buffer protocol special methods (#19581)
The special methods `__buffer__` and `__release_buffer__` were [added in
Python
3.12](https://docs.python.org/3/reference/datamodel.html#emulating-buffer-types).
Both are [implemented with slot
descriptors](https://docs.python.org/3/c-api/typeobj.html#:~:text=__buffer__),
and so should be treated as being implicitly positional-only like other
slot special methods.1 parent 555edf3 commit 0c922ce
File tree
1 file changed
+2
-0
lines changed- mypy
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments