Skip to content

Conversation

@tiran
Copy link
Member

@tiran tiran commented May 5, 2022

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.

Signed-off-by: Christian Heimes christian@python.org

``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``.

Signed-off-by: Christian Heimes <christian@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants