Repository navigation
Conversation
A process that lives on (a cserver) runs a changed task with its changed helpers: utils.sys.load_module, which loads a module again when its file changes, first forgets the helper modules of the module's package, so that its "from . import <helper>" reads them again (before, a cserver ran the new module with the old helpers and failed with "module ... has no attribute ..."); a changed helper, also one imported inside a function, loads the module again, checked at most once a second per module (HELPER_CHECK_SECONDS). Tests: test_utils_sys_load_module.py; the benchmark has a module section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Grigori Fursin <gfursin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cMeta v0.37.1 (see CHANGELOG.md, section 0.37.1):
utils.sys.load_modulere-reads the helper modules of a module it loads again, and a changed helper (also one imported inside a function) loads the module again, checked at most once a second per module (HELPER_CHECK_SECONDS). Before, a cserver ran the new module with the old helpers and failed with "module ... has no attribute ..." until it was restarted.tests/core_tests/test_utils_sys_load_module.py;tests/benchmarks/benchmark_engine.pyhas a section on loaded modules.🤖 Generated with Claude Code