diff options
author | Christian Heimes <christian@python.org> | 2022-05-05 19:24:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 19:24:16 (GMT) |
commit | 8122e8d5017be9f0683a49bc20d3c82e8b5398d6 (patch) | |
tree | 4072244bc4219c6cc02d5919af62b0c4aa0c96d2 /Misc/NEWS.d/next/Core and Builtins | |
parent | 1ed8d035f1edfaec34016b9f8d615df9e9fe9414 (diff) | |
download | cpython-8122e8d5017be9f0683a49bc20d3c82e8b5398d6.zip cpython-8122e8d5017be9f0683a49bc20d3c82e8b5398d6.tar.gz cpython-8122e8d5017be9f0683a49bc20d3c82e8b5398d6.tar.bz2 |
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``.
Diffstat (limited to 'Misc/NEWS.d/next/Core and Builtins')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-05-05-20-05-41.gh-issue-92345.lnN_RA.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-05-05-20-05-41.gh-issue-92345.lnN_RA.rst b/Misc/NEWS.d/next/Core and Builtins/2022-05-05-20-05-41.gh-issue-92345.lnN_RA.rst new file mode 100644 index 0000000..2e2a608 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-05-05-20-05-41.gh-issue-92345.lnN_RA.rst @@ -0,0 +1,3 @@ +``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. |