Commit a356841
authored
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (pythonGH-13601)
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().1 parent df9b032 commit a356841
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
876 | 880 | | |
877 | 881 | | |
878 | 882 | | |
| |||
900 | 904 | | |
901 | 905 | | |
902 | 906 | | |
903 | | - | |
| 907 | + | |
| 908 | + | |
904 | 909 | | |
905 | 910 | | |
906 | 911 | | |
| |||
1970 | 1975 | | |
1971 | 1976 | | |
1972 | 1977 | | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
1973 | 1982 | | |
1974 | 1983 | | |
1975 | 1984 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments