GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-156363: Speed up import of rlcompleter by deferring inspect and re by maxday · Pull Request #156364 · python/cpython Conversation
|
|
I believe the macOS failing test can be rerun, looks like it's a network error issue, from the log: "The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error." |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
If we decide to do this, we can use the lazy import syntax introduced in https://peps.python.org/pep-0810/ to resolve it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…pleter Address review feedback: replace deferred in-function imports of `inspect` and `re` with `lazy import` statements at the top of the module, keeping them alongside the regular imports.
| import __main__ | ||
| import warnings | ||
| import types | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lazy imports shouldn't be separate.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Speed up ``import rlcompleter`` by deferring the imports of :mod:`inspect` | ||
| and :mod:`re` into the completion methods that use them. They are only | ||
| needed while computing completions, so importing :mod:`rlcompleter` (for | ||
| example when setting up interactive completion) no longer pays their import | ||
| cost. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Speed up ``import rlcompleter`` by deferring the imports of :mod:`inspect` | |
| and :mod:`re` into the completion methods that use them. They are only | |
| needed while computing completions, so importing :mod:`rlcompleter` (for | |
| example when setting up interactive completion) no longer pays their import | |
| cost. | |
| Speed up the :mod:`rlcompleter` module's import time. |
The rest is implementation details.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…pleter Address review feedback
|
Thanks for the review @StanFromIreland I've addressed both of your comments :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…lzImp.rst Co-authored-by: Stan Ulbrych <[email protected]>
95578c1 to
fd0a08f
Compare
There was an error while loading. Please reload this page.
|
Hi @maxday, please avoid force push in the future, see https://devguide.python.org/getting-started/pull-request-lifecycle/#don-t-force-push And for the reviewers, I made a comment on the original issue: #156363 (comment):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sorry @aisk I didn't know, I won't do it again for sure :) thanks for the link |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm going to close, this does not seem worth it to me. If another core developer wishes to take this on, I won't block. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Speed up import rlcompleter by deferring inspect and re
There was an error while loading. Please reload this page.