gh-92345: Import rlcompleter before sys.path is extended (#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``.
C
Christian Heimes committed
8122e8d5017be9f0683a49bc20d3c82e8b5398d6
Parent: 1ed8d03
Committed by GitHub <noreply@github.com>
on 5/5/2022, 7:24:16 PM