Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ All notable changes to this project are documented in this file. The format is b
- The SQLite expression-index warning is no longer printed on every migration. The revision hook now re-emits the indexes of new tables first and then names only expression indexes that the database does not have and the revision does not create (SQLite records index names even though it cannot reflect their definitions), so a fresh app's initial schema (which creates `ix_users_user_email_lower`) and an unrelated revision print nothing, while an expression index added to an existing table is still reported. The warning, `SM026` and the `migrate` note point to `make migrations-roundtrip-pg` only where the Makefile has it; elsewhere they say to run `make migrate` and `alembic check` against a PostgreSQL `SM_DATABASE_URL` and link the docs. `smpy new` shows the output of `uv sync`, `npm install` and alembic only when a step fails, stops after a failed initial migration, and prints "Next steps" once, at the end, listing the steps still to run (#917).
- The `Browse`, `Create` and `Edit` pages `smpy create-module` (and `smpy new`'s sample `hello` module) generates now read their text from the module's `locales/en.json` through `t(keys.<module>.…)`, like the bundled modules, so editing the catalog or adding `de.json` takes effect; delete errors use `useApiErrorToast`. The host's `gen-i18n` adds the module to `keys` (`make install` and every dev boot run it); `make build` now runs `gen-pages` and `gen-i18n` first, and the app Dockerfiles run `gen-i18n` before `npm run build`, because a bundle built without the app's keys crashes those pages at runtime. An existing app should add the same `gen-i18n` step to its Dockerfile before switching its pages. A `--standalone` module repo keeps literal English pages, since it has no host to generate keys (#918).

### Removed

- **Behaviour change:** the module-layout compatibility aliases that were due in 0.0.46 are gone, so the old import paths now raise `ModuleNotFoundError`; import from the area paths each module's layout entry under [0.0.45] and earlier lists. Removed: `api_tokens.constants`, `api_tokens.resolver`, `api_tokens.service`, `api_tokens.tokens`; `auth.constants`, `auth.deps`, `auth.middleware`, `auth.state`; `background_tasks.celery_app`, `background_tasks.config_guards`, `background_tasks.outbox_transport`, `background_tasks.outbox_worker`, `background_tasks.runner`, `background_tasks.settings`, `background_tasks.sync_db`, `background_tasks.task_routing`, `background_tasks.tenant_context`, `background_tasks.worker_settings`; `branding.constants`, `branding.endpoints.assets`, `branding.images`, `branding.services`, `branding.settings`, `branding.tenant_branding`; `feature_flags.constants`; `file_storage.deps`, `file_storage.downloads`, `file_storage.scope`, `file_storage.service`, `file_storage.settings`, `file_storage.tenant_deletion`, `file_storage.upload_support`; `keycloak.constants`, `keycloak.jwks`, `keycloak.provider`, `keycloak.settings`, `keycloak.tokens`; `mail.constants`, `mail.settings`; `oidc.jwks`, `oidc.provider`, `oidc.settings`; `permissions.deps`, `permissions.group_labels`; `settings.deps`, `settings.endpoints.module_api`, `settings.reload`, `settings.service`, `settings.tenant_scope`, `settings.tenant_view`; `sharing.constants`, `sharing.endpoints.api`, `sharing.policy`; `site_lock.settings`; `tenants.constants`, `tenants.deps`, `tenants.errors`, `tenants.host_resolver`, `tenants.resolver`, `tenants.service`; `users.bootstrap`, `users.constants`, `users.deps`, `users.directory`, `users.middleware`, `users.settings`, `users.state`. The release's deprecation expiry gate refused to build 0.0.46 while they remained.

## [0.0.45] — 2026-11-11

### Fixed
Expand Down
9 changes: 5 additions & 4 deletions docs/module-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ JS tests stay in `tests-js/`, not in package `ui/`.

Inventory old import paths used outside the module, both in this repository
and downstream. Every such old path becomes a shim using
`simple_module_core.deprecation.deprecated_module`, with `remove_in="0.0.46"`.
`simple_module_core.deprecation.deprecated_module`, with `remove_in` set two
releases ahead of the one that ships the move.
Update internal imports to the new path; do not make new code depend on shims.
A shim built as the `sys.modules` alias below is discovered automatically by
`host/tests/test_deprecation_expiry.py` (`_layout_shims()`), so it needs no manual
Expand All @@ -148,7 +149,7 @@ For example, after moving `orders.service` to `orders.web.service`, leave this
at `orders/service.py` if external callers use that old path:

```python
"""Moved to :mod:`orders.web.service`; this alias goes in 0.0.46 (module layout)."""
"""Moved to :mod:`orders.web.service`; this alias goes in 0.0.48 (module layout)."""

from __future__ import annotations

Expand All @@ -157,7 +158,7 @@ import sys

from simple_module_core.deprecation import deprecated_module

deprecated_module("orders.service", remove_in="0.0.46", use="orders.web.service")
deprecated_module("orders.service", remove_in="0.0.48", use="orders.web.service")
sys.modules[__name__] = importlib.import_module("orders.web.service")
```

Expand Down Expand Up @@ -210,7 +211,7 @@ One module per PR; no logic changes in a move PR.
3. Move tests to matching areas/features, keep root `conftest.py`, remove test
package initializers and prefix each basename with the module name.
JS tests remain in `tests-js/`.
4. Add external-import shims with removal release `0.0.46`, alias shims are
4. Add external-import shims with a removal release two releases ahead; alias shims are
auto-discovered by the expiry test (re-export shims are registered by hand),
drop the shim's `DEPRECATED_ROOT` entry once it expires, and update the
status table below. Domain areas must be named in `DOMAIN_AREAS`.
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Helpers: `has_role(role)` / `has_any_role(roles)` for in-handler role checks; `h
from auth.web.deps import CurrentUser, get_current_user, require_permission
```

The old `auth.deps` import path still works, with a `DeprecationWarning`, until 0.0.46 (as do `auth.constants`, `auth.state` and `auth.middleware`).
The old `auth.deps`, `auth.constants`, `auth.state` and `auth.middleware` import paths were removed in 0.0.46; import from `auth.web.deps`, `auth.core.*` and `auth.web.middleware`.

| Dependency | What it does |
|---|---|
Expand Down
11 changes: 0 additions & 11 deletions modules/api_tokens/api_tokens/constants.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/api_tokens/api_tokens/resolver.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/api_tokens/api_tokens/service.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/api_tokens/api_tokens/tokens.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/auth/auth/constants.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/auth/auth/deps.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/auth/auth/middleware.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/auth/auth/state.py

This file was deleted.

13 changes: 0 additions & 13 deletions modules/background_tasks/background_tasks/celery_app.py

This file was deleted.

17 changes: 0 additions & 17 deletions modules/background_tasks/background_tasks/config_guards.py

This file was deleted.

15 changes: 0 additions & 15 deletions modules/background_tasks/background_tasks/outbox_transport.py

This file was deleted.

15 changes: 0 additions & 15 deletions modules/background_tasks/background_tasks/outbox_worker.py

This file was deleted.

13 changes: 0 additions & 13 deletions modules/background_tasks/background_tasks/runner.py

This file was deleted.

15 changes: 0 additions & 15 deletions modules/background_tasks/background_tasks/settings.py

This file was deleted.

15 changes: 0 additions & 15 deletions modules/background_tasks/background_tasks/sync_db.py

This file was deleted.

17 changes: 0 additions & 17 deletions modules/background_tasks/background_tasks/task_routing.py

This file was deleted.

17 changes: 0 additions & 17 deletions modules/background_tasks/background_tasks/tenant_context.py

This file was deleted.

15 changes: 0 additions & 15 deletions modules/background_tasks/background_tasks/worker_settings.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/branding/branding/constants.py

This file was deleted.

1 change: 0 additions & 1 deletion modules/branding/branding/endpoints/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions modules/branding/branding/endpoints/assets.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/branding/branding/images.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/branding/branding/services.py

This file was deleted.

11 changes: 0 additions & 11 deletions modules/branding/branding/settings.py

This file was deleted.

13 changes: 0 additions & 13 deletions modules/branding/branding/tenant_branding.py

This file was deleted.

Loading
Loading