Commit 8e08bf8
committed
[3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding
There's an issue with the 3.11 backport commit e2421a3
The chane for the main branch was:
```diff
+ Py_INCREF(errors);
...
Py_SETREF(self->encoding, encoding);
- Py_SETREF(self->errors, Py_NewRef(errors));
+ Py_SETREF(self->errors, errors);
```
but in 3.11 this became:
```diff
+ Py_INCREF(errors);
...
Py_INCREF(errors);
Py_SETREF(self->encoding, encoding);
Py_SETREF(self->errors, errors);
```
i.e. there's an extra incref, but it looks -- at least to Git -- like the change
that removes `Py_NewRef` was already applied.
This was not caught because `test_io` refleaks tests were ineffective on 3.11
(see #126478 (comment)).
Remove the extraneous incref.1 parent 8c6885d commit 8e08bf8
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | | - | |
1317 | 1316 | | |
1318 | 1317 | | |
1319 | 1318 | | |
| |||
0 commit comments