Commit b3d25df
authored
When I added _PyInterpreterState_IsRunningMain() and friends last year, I tried to accommodate applications that embed Python but don't call _PyInterpreterState_SetRunningMain() (not that they're expected to). That mostly worked fine until my recent changes in gh-117049, where the subtleties with the fallback code led to failures; the change ended up breaking test_tools.test_freeze, which exercises a basic embedding situation.
The simplest fix is to drop the fallback code I originally added to _PyInterpreterState_IsRunningMain() (and later to _PyThreadState_IsRunningMain()). I've kept the fallback in the _xxsubinterpreters module though. I've also updated Py_FrozenMain() to call _PyInterpreterState_SetRunningMain().
1 parent c4bf58a commit b3d25df
File tree
3 files changed
+39
-22
lines changed- Modules
- Python
3 files changed
+39
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
| |||
509 | 527 | | |
510 | 528 | | |
511 | 529 | | |
512 | | - | |
| 530 | + | |
513 | 531 | | |
514 | 532 | | |
515 | 533 | | |
| |||
977 | 995 | | |
978 | 996 | | |
979 | 997 | | |
980 | | - | |
| 998 | + | |
981 | 999 | | |
982 | 1000 | | |
983 | 1001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1049 | 1051 | | |
1050 | 1052 | | |
1051 | 1053 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | 1054 | | |
1064 | 1055 | | |
1065 | 1056 | | |
1066 | 1057 | | |
1067 | 1058 | | |
1068 | 1059 | | |
1069 | 1060 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
| 1061 | + | |
| 1062 | + | |
1073 | 1063 | | |
1074 | 1064 | | |
1075 | 1065 | | |
| |||
1571 | 1561 | | |
1572 | 1562 | | |
1573 | 1563 | | |
1574 | | - | |
| 1564 | + | |
1575 | 1565 | | |
1576 | 1566 | | |
1577 | 1567 | | |
| |||
1670 | 1660 | | |
1671 | 1661 | | |
1672 | 1662 | | |
1673 | | - | |
| 1663 | + | |
1674 | 1664 | | |
1675 | 1665 | | |
1676 | 1666 | | |
| |||
0 commit comments