Commit 8122e8d
authored
pythongh-92345: Import rlcompleter before sys.path is extended (python#92346)
``pymain_run_python()`` now imports ``readline`` and ``rlcompleter``
before sys.path is extended to include the current working directory of
an interactive interpreter. Non-interactive interpreters are not
affected.
Also move imports of ``re`` and ``keyword`` module to top level so they
are materialized early, too. The ``keyword`` module is trivial and the
``re`` is already imported via ``inspect`` -> ``linecache``.1 parent 1ed8d03 commit 8122e8d
File tree
3 files changed
+15
-3
lines changed- Lib
- Misc/NEWS.d/next/Core and Builtins
- Modules
3 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
555 | 562 | | |
556 | 563 | | |
557 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
558 | 568 | | |
559 | 569 | | |
560 | 570 | | |
| |||
577 | 587 | | |
578 | 588 | | |
579 | 589 | | |
580 | | - | |
581 | 590 | | |
582 | 591 | | |
583 | 592 | | |
| |||
0 commit comments