docs: say the per-job child is built open, not unopened - #26
Merged
Merged
Conversation
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.
setup_di's docstring saidon_job_start"builds an unopenedScope.REQUESTchild". The inline comment in_wrap_job_start, a few lines away, says the opposite: "modern-di already returns the child open, soopen()there is a no-op re-entry". The comment is right and the docstring was wrong. This rewords the docstring; no behaviour changes.Evidence
Checked against modern-di in the lockfile.
Container.__init__setsself.closed = False,build_child_containeronly constructs the child, and the class docstring says "A container is open from construction — no separate startup step is required".The new wording says the child is built open, that
@inject's reference-counted wrapper is what narrows its lifetime to the task body, and thaton_job_endcloses it only as a safety net. That matches_wrap_job_start,_wrap_job_endanddocs/adr/0003-per-job-child-teardown-is-reference-counted.mdas rewritten in #25. A repo-wide grep finds no other "unopened".Gates
pytest -q(29 passed; Redis was reachable, so the burst-worker tests ran),ruff format --check,ruff check --no-fix. The 9 warnings are arq's own deprecatedpool.close()call, python-arq/arq#418, and are unrelated.