Repository navigation
build: v0.5.8 packaging foundations - #591
Merged
Merged
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
yevheniidehtiar
force-pushed
the
build/v058-packaging-foundations
branch
from
October 9, 2026 22:10
de0f369 to
a81631b
Compare
dodjer88
previously approved these changes
Oct 9, 2026
yevheniidehtiar
force-pushed
the
build/v058-packaging-foundations
branch
from
October 9, 2026 22:57
a81631b to
268cc8f
Compare
added 13 commits
October 10, 2026 01:06
… failure - loadtest extra: asyncpg>=0.30. 0.29.0 has no CPython 3.13 wheels and fails to compile, breaking the 3.13 lowest-direct leg on develop. - test.yml: upload tests/e2e/snapshots/**/*.actual.png and *.diff.png when the push job fails, so drifted baselines (list-375px, 2.9% on every ubuntu leg) can be refreshed from the CI runner's own rendering.
The pre-commit ruff hook on develop runs with --fix-only, so poe lint never reported these; the CI workflow's plain `ruff check .` does. - N818: rename InlineRowNotOwned -> InlineRowNotOwnedError (unreleased). - PERF203: move the try/except around the inline save loop. - PLR0912: extract _parse_list_filters and _validate_inline_formsets from list_view and create_view (pure moves, no behaviour change).
- add pydantic-settings>=2.14.2 (imported by core/settings.py; bound includes the GHSA-4xgf-cpjx-pc3j fix, so the pip-audit ignore is dropped) - move aiosqlite to runtime (zero-config demo mode uses sqlite+aiosqlite) - add tzdata on win32 for zoneinfo - drop appnope; move uvicorn and httpx to dev; fastapi[standard] -> fastapi (dev keeps fastapi[standard] for the fastapi dev CLI used in docs) - dedupe python-multipart; bound argon2-cffi>=23.1.0 - justify non-obvious runtime deps inline (CONSTITUTION 6) - annotate loop var in core/introspection.py for mypy 2.4
- stop ignoring uv.lock (!uv.lock after the *.lock rule) and commit it - ci.yml: uv sync --locked; run on push and pull_request to master and develop (it targeted the non-existent main branch) - test.yml: uv lock --check in every job; highest rows use uv sync --locked, lowest-direct rows re-resolve (a lowest-direct install cannot be locked) - pages/qa/scheduled/release: uv sync --locked - dependabot: uv ecosystem so dev bumps update pyproject and uv.lock together - pre-commit: exclude uv.lock from check-added-large-files
…8-byoa-17) hyperadmin.auth now resolves its exports through PEP 562 __getattr__, so importing hyperadmin.auth or auth.middleware no longer imports auth.models and no longer registers hyperadmin_* tables. from hyperadmin.auth import User keeps working. auth.metadata() returns a MetaData copy holding only the hyperadmin_* tables for Alembic users of built-in auth.
…-v058-byoa-20) hyperadmin.db no longer creates an engine at import time. get_default_engine(settings) builds the demo-mode engine from settings.database_url on first use and caches it per URL. The module attribute engine still resolves through __getattr__, with a DeprecationWarning. core/app.py drops its top-level db import and only builds the default engine when no engine= is passed. Adds the DDL helpers the lifecycle work needs: create_tables(engine, tables), resolve_bind(session_factory) and is_sqlite_url(url).
Raise pydantic floor to 2.10.1 on Python < 3.13 (2.7-2.9 cannot resolve the InlineModelSpec forward ref; 2.10.0 breaks sqlmodel default factories) and add sqlalchemy>=2.0.31 on Python >= 3.13 (older releases fail to import there). SDD Open Question 1: pydantic-settings>=2.14.2 keeps Python 3.10 lowest-direct green once the pydantic floor is fixed (984 unit tests pass on a real lowest-direct env for 3.10 and 3.13). Guard an Optional inspect() result that basedpyright flags against the SQLAlchemy 2.0.14 stubs.
lowest-direct rows re-locked at highest on the first plain uv run, so lint, unit and e2e never ran on the declared floors. After the lowest-direct sync, restore the committed uv.lock and export UV_NO_SYNC=1 (nested uv run in pre-commit hooks included). poe deps:bump does the same, restoring the freshly upgraded lock from a backup. The security audit runs on the locked highest set only, since old floor releases carry known advisories by definition. Document the Dependabot uv dependency-type caveat (dependabot-core#13202).
SDD B.5: auth.metadata() logs a WARNING when an Admin in bridge mode has already been built in the process. The bridge story sets the flag through hyperadmin.auth._note_bridge_admin_constructed().
Demo mode now reads settings.database_url, which can point at the host's own database. Skip startup create_all there unless the URL is SQLite or create_tables was set explicitly, and log the SDD C.2 WARNING. Also drop the module-level db -> core.settings import (CONSTITUTION section 2 cycle); the settings default is resolved inside get_default_engine.
…from the lock (st-v058-byoa-12)
…8-byoa-12) The Python 3.10 lowest-direct leg hung in 'Test package' until GitHub's 6-hour limit (not reproducible locally: 993 tests in 39s on the same resolution). faulthandler_timeout makes the next hang print every thread's stack; timeout-minutes stops a hang from burning a runner.
yevheniidehtiar
force-pushed
the
build/v058-packaging-foundations
branch
from
October 10, 2026 06:57
268cc8f to
a6b79c1
Compare
…it (st-v058-byoa-11) aiosqlite 0.22 moved its worker off threading.Thread, so SQLAlchemy's `connection.daemon = True` no longer applies and a pooled connection keeps the interpreter alive after the last test (lowest-direct CI hung after '1127 passed' until the job timeout). SQLAlchemy 2.0.46 stops the worker via aiosqlite's stop() (sqlalchemy/sqlalchemy#13039). This also supersedes the separate 2.0.31 floor for Python 3.13.
dodjer88
approved these changes
Oct 10, 2026
This was referenced Oct 10, 2026
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.
Why
These are the packaging and foundation stories of v0.5.8 Bring Your Own App (SDD
docs/specs/bring-your-own-app.md, sections E, B.5 and C.3). Today a cleanpip install hyper-admincannot import the package: it creates an aiosqlite engine at import time and relies on undeclared transitive dependencies.hyperadmin.authregisters itshyperadmin_*tables as soon as anything under it is imported. CI installs whatever resolves on the day and does not run on PRs to develop.Changes
chore(deps): runtime dependency auditpydantic-settings>=2.14.2. It includes the GHSA-4xgf-cpjx-pc3j fix, so that pip-audit ignore is removed.aiosqliteto runtime (zero-config demo mode needs it) and addedtzdataon Windows.appnope. Moveduvicornandhttpxto dev.fastapi[standard]becamefastapi.python-multipart, addedargon2-cffi>=23.1.0, and commented each non-obvious dependency.build: committeduv.lockuv sync --locked.test.ymlrunsuv lock --checkin every job, and its lowest-direct rows re-resolve.ci.ymlruns on push and PR tomasteranddevelop(it pointed at a non-existentmain).uvecosystem, anduv.lockis excluded from the large-file hook.refactor(auth): lazy exportshyperadmin.authloads its exports lazily (PEP 562). Importinghyperadmin.authorhyperadmin.auth.middlewareno longer registershyperadmin_*tables.hyperadmin.auth.metadata()returns only thehyperadmin_*tables, for Alembic users of built-in auth.refactor(db): lazy default enginehyperadmin.dbcreates no engine.get_default_engine(settings)builds the engine fromsettings.database_urlon first use and caches it per URL.from hyperadmin.db import enginestill works and emits aDeprecationWarning.create_tables,resolve_bindandis_sqlite_url.Verification
uv run poe lint: pass.test_packaging_dependencies.py,test_ci_lockfile.py,test_auth_lazy_imports.py,test_db_lazy_engine.py.-n 4): 136 passed.poe vulnerability-check: clean.Admin; before this change it failed onaiosqlite.uv sync --lockedanduv lock --checkboth exit 1.pydantic_settingswas not installed). It now fails only on a fastapi 0.116.0 / pydantic 2.7.0InlineModelSpecannotation error, tracked as a follow-up.Manual test scenarios
uv build --wheel && pip install dist/hyper_admin-*.whl, thenpython -c "from hyperadmin import Admin". Expect exit 0.python -W error::DeprecationWarning -c "import hyperadmin". Expect no warning and no engine created.python -c "from hyperadmin.db import engine". Expect aDeprecationWarningnamingget_default_engine.python -c "import hyperadmin.auth.middleware; from sqlmodel import SQLModel; print([t for t in SQLModel.metadata.tables if t.startswith('hyperadmin_')])". Expect[].python -c "import hyperadmin.auth as a; print(sorted(a.metadata().tables))". Expect onlyhyperadmin_*tables.pyproject.tomlwithout re-locking, then runuv sync --locked. Expect it to fail with a hint to runuv lock.develop. Expect both the CI and Test workflows to run.🤖 Generated with Claude Code