Commit 6b48e65
* bpo-36929: Modify io/re tests to allow for missing mod name
For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:
* Custom repr functions for those types (some of which ignore the
tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages
The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.
https://bugs.python.org/issue36929
(cherry picked from commit ccb7ca7)
Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
1 parent 3c9c2dc commit 6b48e65
3 files changed
Lines changed: 34 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
1108 | | - | |
| 1107 | + | |
| 1108 | + | |
1109 | 1109 | | |
1110 | | - | |
| 1110 | + | |
1111 | 1111 | | |
1112 | | - | |
| 1112 | + | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
| |||
2565 | 2565 | | |
2566 | 2566 | | |
2567 | 2567 | | |
2568 | | - | |
2569 | | - | |
| 2568 | + | |
| 2569 | + | |
2570 | 2570 | | |
2571 | | - | |
2572 | | - | |
| 2571 | + | |
| 2572 | + | |
2573 | 2573 | | |
2574 | | - | |
2575 | | - | |
| 2574 | + | |
| 2575 | + | |
2576 | 2576 | | |
2577 | | - | |
2578 | | - | |
| 2577 | + | |
| 2578 | + | |
2579 | 2579 | | |
2580 | 2580 | | |
2581 | 2581 | | |
| |||
4098 | 4098 | | |
4099 | 4099 | | |
4100 | 4100 | | |
4101 | | - | |
4102 | | - | |
4103 | | - | |
4104 | | - | |
4105 | | - | |
| 4101 | + | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
4106 | 4106 | | |
4107 | 4107 | | |
4108 | 4108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1736 | 1736 | | |
1737 | 1737 | | |
1738 | 1738 | | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1742 | 1743 | | |
1743 | 1744 | | |
1744 | 1745 | | |
1745 | 1746 | | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
1749 | 1751 | | |
1750 | 1752 | | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
1754 | | - | |
1755 | | - | |
1756 | | - | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
1757 | 1761 | | |
1758 | 1762 | | |
1759 | 1763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
0 commit comments