Repository navigation
fix(types): Generator annotations for @contextmanager (ty 0.0.85 deprecation) - #411
Merged
Merged
Conversation
…ator ty 0.0.85 (unpinned, uv.lock is not committed) reports the Iterator overload of contextmanager/asynccontextmanager as deprecated, and exits non-zero on those warnings, so Python typecheck fails on main and every PR. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
651bb85
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b8477abf.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-ty-contextmanager-genera.simple-module-python.pages.dev |
antosubash
added a commit
that referenced
this pull request
Oct 7, 2026
…uilder line cap) Merging main brought #408's middleware wiring into app_builder.py (302 lines); move project-root resolution to _project_root.py. #409's new contextmanager used the Iterator annotation that ty 0.0.85 flags (see #411). Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
antosubash
added a commit
that referenced
this pull request
Oct 7, 2026
* feat(hosting): ship the /setup wizard with the framework (#351) SetupMiddleware redirected a fresh install to /setup, but the route and page lived only in this repo's unpublished host, so any other host got / -> /setup -> 404. - simple_module_hosting.setup_wizard: GET /setup, POST /setup/test-connections and POST /setup/steps/<id>, mounted by create_app. Router-level gates: 404 outside setup mode, then the session CSRF token. - SetupStep.action (SetupAction/SetupField in core): a module hands the wizard a form spec and a handler; the wizard runs it only while that step is pending (409 otherwise). host.migrations uses it for alembic upgrade. - users ships the first-administrator action: password policy, then a DB lock (pg_advisory_xact_lock / SQLite write lock) plus an in-process lock, re-check and insert in one transaction, so concurrent POSTs mint one admin. - The wizard page ships from the wheel: gen-pages registers it as Setup/Wizard in modules.generated.ts/.assets.json/.css like a module's pages. Strings live in a new "hosting" catalog. - Required steps without an action are logged at boot; the gate logs once when it starts redirecting. - host/ no longer carries setup code; the UI-less /setup/site-basics is gone. Fixes #351 Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix(setup): don't echo migration errors to the anonymous caller The migrations action is reachable without auth while the step is pending, and an alembic failure routinely carries the database URL, SQL or paths. Log the error with the correlation id; return a generic detail. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * refactor(optimize): drop duplicate constant, redundant filter and import in setup wizard Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix(setup): mark the wizard document no-store (embeds CSRF token) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix(setup): review fixes - keep app loggers alive after in-process migrations, share admin-exists query Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix(setup): boot an unmigrated first-run install to the wizard QA found a fresh unmigrated database crashed the boot in Users/Permissions on_startup (no such table), so /setup was unreachable and the migrations step useless. A failing on_startup on a behind-head first run is now deferred and replayed after the wizard applies the migrations. Also add the missing sqlmodel import to the scaffolded alembic script template. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix(setup): replay deferred startup from the gate too, serialise migrations, keep app logging Review findings: any worker that observes the schema at head now finishes the deferred on_startup hooks (not only the one that ran the migrations); replay is locked and never raises after migrations committed; concurrent migration runs are serialised; in-process alembic no longer clobbers the app's logging. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4 * fix: reconcile setup wizard with main (ty Generator annotation, app_builder line cap) Merging main brought #408's middleware wiring into app_builder.py (302 lines); move project-root resolution to _project_root.py. #409's new contextmanager used the Iterator annotation that ty 0.0.85 flags (see #411). Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
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.
ty 0.0.85 (CI installs the latest;
uv.lockis not committed) reports-> Iterator[...]on@contextmanager/@asynccontextmanagerfunctions as deprecated, andty checkexits non-zero on it, so Python typecheck fails on main and on every open PR. This changes the 9 sites toGenerator/AsyncGenerator; no behaviour change.Verified:
uv run ty checkclean, ruff format/check clean, 524 tests in framework/db, background_tasks, file_storage, tenants owner-race pass.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4