Repository navigation
Commit 58f2c10
committed
gh-160427: Return None from TextIOWrapper.buffer when detached
gh-154523 turned the buffer member descriptor into a getter that raises
ValueError when the buffer is NULL, and the backport shipped in 3.14.9
and 3.15.1. That made hasattr(stream, "buffer") raise after detach().
Restore the old member descriptor result (None) while keeping the
critical section.1 parent 0e35313 commit 58f2c10
3 files changed
Lines changed: 10 additions & 4 deletions
File tree
- Lib/test/test_io
- Misc/NEWS.d/next/Library
- Modules/_io
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| 263 | + | |
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
| |||
1721 | 1723 | | |
1722 | 1724 | | |
1723 | 1725 | | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
| 1726 | + | |
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3474 | 3474 | | |
3475 | 3475 | | |
3476 | 3476 | | |
3477 | | - | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
3478 | 3482 | | |
3479 | 3483 | | |
3480 | 3484 | | |
| |||
0 commit comments